Crash after undo stave text entry and leaving edit mode

• Sep 16, 2018 - 15:27
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project
  1. Create piano score.
  2. 'Add'>'Text'>'Stave Text'.
  3. 'Edit'>'Undo'.
  4. Click page.

Result: Crash (see attached log).

Using MuseScore 3.0 Nightly Build 9dac228 - Mac 10.11.6.


Comments

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

See https://github.com/musescore/MuseScore/pull/3967.

The problem occurs if the user presses "Undo" in text edit mode, and there are no text edits to undo. This will cause the previous command (in this case, adding the System Text object) to be undone. But the System Text is still being edited, even after having been removed from the Score. This will cause problems upon leaving edit mode.

My fix is to limit undo to just the text edit operations since entering text edit mode, if currently editing text.