Remove Selected Range (Timewise Delete) of a partial note in another voice leads to crash
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.1.0.6214, revision: f2f8862
- Open the attached score. Click on the sixteenth A note at the start of measure 32 and press Ctrl + Delete.
Result: Crash. - Reopen the score. Select any of the notes in voice 1, at the beginning of measures 7, 19 or 26 (eighth notes). Press Ctrl + Delete.
Result: The layout is broken at the start of the system. - Undo the changes. Select any of the notes in voice 1, at the beginning of measure 13 (quarter notes). Press Ctrl + Delete.
Result: As expected.
Attachment | Size |
---|---|
remove_selected_range.mscz | 30.01 KB |
Fix version
3.1.0
Comments
I guess it crashes because of the dotted quarter in voice 2 (in measure 32)
And indeed shortening that to a 16th avoids the crash
I've found the cause. The crash happens if the note in voice 2 is split into multiple notes after deleting, and a tie is added between them, in Ms::Score::createCRSequence. The multiple notes' segments are not valid before undoAddCR() in
createCRSequence
is called. However, when adding the tie in undoAddElement(tie), the invalid segments are used.(in other cases, the note's duration in voice 2 can still be represented by a single note after deleting some duration, so no splits are required and no crash happens. )
I'll probably write a fix soon afterwards...
See https://github.com/musescore/MuseScore/pull/4870.
Fixed in branch master, commit 9a2249744f
fix #287102: Remove Selected Range (Timewise Delete) of a partial note in another voice leads to crash.
Fixed in branch master, commit 455de693bf
_Merge pull request #4870 from songchaow/fix-timewise-delete
fix #287102: Remove Selected Range (Timewise Delete) of a partial not…_
Automatically closed -- issue fixed for 2 weeks with no activity.