Crash when deleting bar with melisma, or hyphens

• Mar 11, 2015 - 00:21
Type
Functional
Severity
S2 - Critical
Status
closed
Project

1. Open attached score (produced in 1.3).
2. Click on either bar (selecting it).
3. 'Edit'>'Bar'>'Delete Selected Measures'.

Result: Crash (see attached log).

Note: It is also reproducible in a 2.0 score.

Using MuseScore 2.0 Nightly Build 1cecdd7 - Mac 10.7.5.


Comments

Status (old) active needs info

I can't duplicate this with a current build - not with this score or any other. Deletion of bars contains hyphens or melisma extenders works as expected for me.

Anything else unique about what you are doing?

Status (old) needs info active

Based on discussions on IRC, I have a little info and a theory.

Apparently, if you delete the second measure, the following appears on the console:

> undoInsertTime -960 at 960, spanners 0

That's the function that the crash occurs in:

https://github.com/musescore/MuseScore/blob/1cecdd794ccfe1d863d89e108b3…

Since spanners reports as zero, the first two loops in this function are presumably not being executed - nor should they, since there are no "normal" spanners. So the crash must occurs in the final loop:

https://github.com/musescore/MuseScore/blob/1cecdd794ccfe1d863d89e108b3…

According to the crash log, it occurs here, not in undoInsertTimeUnmanaged() or anywhere deeper.

So, my theory: this function is removing from the list we are iterating, and that's a no-no on Mac. We just need to do that standard trick we do - not that I know exactly how that works here.