Inserting a new measure within a melisma causes a crash

• Oct 4, 2020 - 19:42
Reported version
3.5
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
  1. Create a score with lyrics where there are melismas covering tied or slurred notes across a barline.
  2. Attempt to insert a new measure immediately before the end note of the melisma (see the red asterisks in the sample score).

Expected result: a new measure is inserted
Actual result: MuseScore crashes (a crash occurs in MS 3.5 but not in MS 2.3.2)

Inserting a new measure within a melisma causes crash.jpg


Comments

Status active PR created

Fixing the crash is easy enough, just a null pointer check. But, it turns out there was a bug there already in 3.4 also, where adding the measure appears to work, but it doesn't completely. Easiest way to see is try undoing. There are some other odd things that happen when inserting measures in the presence of melismas; see also #285304: Insert measure in front of lyric with melisma extends line through following syllables.

Anyhow, https://github.com/musescore/MuseScore/pull/6613 fixes the crash.

Status PR created fixed

Fixed in branch 3.x, commit 308f673088

_fix #311289: crash on insert of measure in front of melisma end

Resolves: https://musescore.org/en/node/311289

Code added recently manage melisma ends better triggers a crash
when inserting a measure in front of the melisma end.
The crash is a null pointer dereference and is easily fixed here.
However, it should be noted that the melisma is at that point
in a somewhat inconsistent state, and things like undo
won't actually work properly.
This was the case before the change that triggered the crash as well.
Ultimately we probably really need to update the end tick
on the lyrics with the melisma.
See also https://musescore.org/en/node/285304._

Fix version
3.5.1