Insert measures of exactly one system leads to crash on Undo/Redo

• Mar 16, 2019 - 16:07
Reported version
3.0
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.0.5.5992, revision: 58dd23d

1) Default score
2) Select first measure -> Add -> Measures -> Insert Measures -> Type number "18" -> Ok
3) Undo -> Redo

---------> Crash

  • A bit curious: number 100, or 50, or 10 and so on works on Undo/Redo.
    17 or 19 too. But number 18 crashes? (or maybe due to the system layout change?)

Comments

Title Insert measures leads to crash on Undo/Redo Insert measures of exactly one system leads to crash on Undo/Redo
Status active PR created

FWIW, the magic number is 19 if your default page size is Letter, but same reason - the inserted measures exactly make up a new system, and somehow we aren't handling that correctly.

I can't get this to crash in my current build, which is based on master but includes my fix for #283177: Insert measure at beginning of system generates extra undeletable key signature.. If I revert my change and just build from master, I do get the crash - there is an assertion failure regarding a header clef segment. And indeed, my fix for the other insert issue would also impact clefs in a hopefully positive way, even though we didn't actually see the duplicate clef issue (I think because clefs are treated differently than key signatures overall).

So while this is not at all a duplicate in terms of the symptoms, it may well be in terms of the underlying cause. So, I'm going to go ahead and say I've already submitted a PR for this:

https://github.com/musescore/MuseScore/pull/4801

Fix version
3.1.0