Crash when changing selected accidentals that don’t modify the pitch

• Feb 17, 2018 - 20:09
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

In the score I provided, the F# is a mistake. It is supposed to be an F natural. In fact, it would be an F# even without the accidental. I try to select the note, but my mouse slips and I end up selecting the measure instead. That’s okay, because it is the only note in the measure. I press the natural button on the toolbar. MuseScore crashes.

Attachment Size
selected-accidental.mscz 2.35 KB

Comments

Status (old) active patch (code needs review)
Status active  

I notice that Score::update() calls a series of functions that end up calling Score::deselect(Element*) which calls Score::update() again. I can only imagine that this second call to Score::update() should have been a call to Selection::update() instead. I made this correction and a couple other small corrections to the way the selection is updated when selected elements are changed in this pull request.