Crash when deleting bars with text line in staff with linked part

• Sep 4, 2014 - 20:49
Type
Functional
Severity
S4 - Minor
Status
closed
Project

1. Open this file .
2. Drag text line to a note in Electric Guitar 2 of bar 88.
3. Click on bar (selecting it).
4. Hold Shift and press Right (selecting until the end of score).
5. 'Edit'>'Delete Selected Measures'.

Result: Crash.

Note: See attached log.

Using MuseScore 2.0 Nightly Build c3624cf - Mac 10.7.5.


Comments

Crash is because after the deleting the measure, there are a few spanners form those deleted measures still in the map - not removed by checkSpanner() for some reason, apparently - and these crash the layout.

The crash is easy enough to fix: we need to check for m == 0 before dereferencing it here:

https://github.com/musescore/MuseScore/blob/master/libmscore/utils.cpp#…

The real question, though, is why these particular spanners (a textline and an ottava at least) are not deleted. I believe it is because of the linked parts. You can reproduce this in a file created from scratch very easily:

1) new score
2) generate parts
3) add some notes to measure 3
4) add a text line to one or more of those notes
5) select from measure before the text line to end
6) Ctrl+Delete

Result: crash