Crash when adding tempo marking on multimeasure rest
Reported version
3.x-dev
Priority
P0 - Critical
Type
Development
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
- First two bars with and multimeasure rest on
- Add text - tempo marking
- Program crashes and sends report
Attachment | Size |
---|---|
Go_Down_Gamblin'.mscz | 54.58 KB |
Fix version
3.1.0
Comments
Confirmed, seems to crash both in master and in stable releases since the initial 3.0.0.
At first glance, this issue looks similar to #280775: Crash if inserting rehearsal mark on a multimeasure rest. This problem was common to many text-based elements and was fixed by this patch but, for some reason, tempo markings addition is handled by a separate function
MuseScore::addTempo
which was untouched by that patch. Maybe applying the same approach foraddTempo
or merging it tocmdAddText
can fix this issue.I tried this approach with
addTempo
(see 792633f) and it seemed to work. Then I tried adding a second Tempo Text to the same mmRest, and it crashed in the same place. And indeed the code suffers from the same problem when called fromcmdAddText
, which means that adding (for example) a Staff Text and an Expression Text to the same mmRest will cause a crash.Not sure if it actually fixes this, but see PR https://github.com/musescore/MuseScore/pull/4846, which fixes layout of multiple texts attached to the same rest.
https://github.com/musescore/MuseScore/pull/4846 combined with 792633f indeed fixes this. I can turn 792633f into a PR, and then hopefully both will be merged.
See https://github.com/musescore/MuseScore/pull/4952.
Fixed in branch master, commit 792633fc4d
fix #287841: Crash when adding tempo marking on multimeasure rest
Fixed in branch master, commit 79df480533
_Merge pull request #4952 from mattmcclinch/287841-tempotext-mmrest
fix #287841: Crash when adding tempo marking on multimeasure rest_
Automatically closed -- issue fixed for 2 weeks with no activity.