Copy-paste tied notes included in linked staves in a score with parts leads to crash
Reported version
3.0
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
Version 3.1 and current nightly/ Windows10
1) New score for 2 Guitar + Tablature template (Tablature, or second linked standard staff as in the test file - see below - no matter)
2) Add two tied whole note in the first linked staves
3) Generate parts (New all -> Ok)
(The test file at this step: test linked ties parts.mscz)
4) Copy staves 1+2 -> Paste in staff 3
Result: crash
- Other scenarios depending the selection.
-Crash with:
Copy staff 1 -> Paste in staff 4
Copy staff 2 -> Paste in staff4
-But works if:
Copy Staff 1, or 2, -> Paste in staff 3
Staff 4 seems to be the "weakest link"
Fix version
3.1.0
Comments
The crash happens here, while trying to dereference
c1
, which turns out to be NULL. This is because this function call returns 0 here. It is a bit disturbing thatl.isEmpty()
should evaluate totrue
at this point, but let’s set that aside for a second. If we replacewith
the crash is prevented, and the paste succeeds.
Now, why did this line return an empty list? Well, it turns out that even though
e.tracks()
is updated every time a<Tracklist>
tag is encountered, it doesn’t have any effect on the Excerpt’stracks()
map. If this line is moved down two lines so that it comes afters->read(e);
then the Excerpt’s
tracks()
map will be assigned properly upon load. But any existing scores that have been saved after being read with the buggy version ofScore::read()
will have already lost all of their<Tracklist>
tags.See https://github.com/musescore/MuseScore/pull/4960.
Fixed in branch master, commit 18e4f45f2e
fix #288227: Copy-paste tied notes included in linked staves in a score with parts leads to crash
Fixed in branch master, commit c8e8042418
_Merge pull request #4960 from mattmcclinch/288227-paste-linked-tie
fix #288227: Copy-paste tied notes included in linked staves in a score with parts leads to crash_
Automatically closed -- issue fixed for 2 weeks with no activity.