Change actual duration after joining measures leads to crash
OS: Windows 7 SP 1 (6.1), Arch.: x86_64, MuseScore version (64-bit): 3.0.0, revision: 7f19224
1) Default "Untitled" score
2) Select and delete (Ctrl + Del) the first barline
3) Right-click on the "new" first measure -> Measure properties -> Change actual duration eg to 6/4 (instead 8/4) -> Ok
4) Undo twice
Result: crash
Comments
The crash happens while undoing an AddElement operation on an EndBarLine Segment. The Measure tries to remove the Segment from its SegmentList, and calls qFatal() when the Segment is not found. The AddElement operation is pushed onto the undo stack as a result of this line within Measure::createEndBarLines(). Modifying this line to call getSegmentR() rather than undoGetSegmentR() seems to take care of the problem.
sort of a patch...
In reply to sort of a patch... by Jojo-Schmitz
Where is the patch? :)
Mentioned in text form above.
Fix typo in issue title.
Lol :) Let's wait until someone proposes a PR... We need one more status like "solution proposed" and replace "patch (*)" with "PR needs review".
since https://musescore.org/en/node/275805#comment-851139 the code changed, so the line number mentioned there doesn't match anymore. If it is libmscore/measure.cpp, line 3363 now, indeed with the proposed change I don't see a crash, while without it I do, so see https://github.com/musescore/MuseScore/pull/4045
Fixed in branch master, commit 7b2f8b066c
fix #275805: Change actual duration after joining measures leads to crash
as per https://musescore.org/en/node/275805#comment-851139, adjusted to
a meanwhile changed line number
Fixed in branch master, commit 23710ffe51
Merge pull request #4045 from Jojo-Schmitz/measure-crash
fix #275805: Change actual duration after joining measures leads to crash
Automatically closed -- issue fixed for 2 weeks with no activity.
Automatically closed -- issue fixed for 2 weeks with no activity.
Automatically closed -- issue fixed for 2 weeks with no activity.