Change actual duration after joining measures leads to crash

• Sep 2, 2018 - 09:51
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

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.

Title Change actual duration after joining mesures leads to crash Change actual duration after joining measures leads to crash
Status

Fix typo in issue title.

Status (old) patch (code needs review) active
Status active

Lol :) Let's wait until someone proposes a PR... We need one more status like "solution proposed" and replace "patch (*)" with "PR needs review".