Crash when opening score with fermata
- Open attached score (produced in 2.3.1).
Result: Crash (see attached log).
Using MuseScore 3.0 Nightly 44debd7 - Mac 10.11.6.
Attachment | Size |
---|---|
Crash when opening score with fermata.mscz | 2.66 KB |
Crash when opening score with fermata [Log].txt | 79.97 KB |
Comments
I narrowed a large score down to this excerpt.
After some testing, it only seems to happen if there is a full voice 1 rest and fermata is multi-voice, though I stand open to correction.
Can you reproduce this issue from scratch ? (not from the "large score")
I cannot here with 44debd7 / Windows 10 and this sample, a duplicate (same content) of yours: test file.mscz
So, it might be useful to attach also this large score.
BTW, this file opens fine after export in MusicXml format: Crash when opening score with fermata.mxl
I can with a 2.3.1 score (attached one is from scratch), but not a 3.0 one, so it could just be an import issue.
It sees that on July 24, 2018 this code in Fermata::layout() was changed from
to
Which means that if e is NULL, it will always be dereferenced. I am not sure what was wrong with the way it was before, but it could be changed to
"I can with a 2.3.1 score [...] but not a 3.0 one"
Agreed with that.
The file opens fine with 182219a
But crashes with 5d1b354
So, I guess the most likely is here: https://github.com/musescore/MuseScore/commit/35265cd3581232adc1f68b3a9…
In the original score, the fermata was in voice 2. Upon import, it was changed to voice 1, which is why e was NULL in the first place. This is due to the following line at the end of readArticulation() in read206.cpp:
el->setTrack(cr->staffIdx() * VOICES);
It seems to me that instead the line should be:
el->setTrack(cr->track());
This would give the fermata the voice it had in the original score, and it would allow Fermata::layout() to find the element in the segment to which the fermata belongs.
Applied @mattmcclinch's solution which seems right in https://github.com/musescore/MuseScore/pull/3893
Fixed in branch master, commit 48bd45a6d3
fix #274754: Crash when opening score with fermata. Assign fermata to correct voice
Fixed in branch master, commit e44ec5aa96
Merge pull request #3893 from lasconic/fix-274754
fix #274754: Crash when opening score with fermata. Assign fermata to correct voice
Automatically closed -- issue fixed for 2 weeks with no activity.