Crash when repeatedly pressing Shift+A
This bug report came in via email.
Steps to reproduce in 2.0.2:
* Start with a blank score, e.g. just choose Treble clef template.
* Type letter a; an a crochet/quarter note appears.
* Type Shift+A: the A above appears.
* Repeat pressing Shift+A: further octaves of A's appear, but the maximum of note G9 (MIDI note 127) is not respected.
If you continue for too long, MuseScore will crash.
Fix would be to limit to the corrected note range, G9 (MIDI note 127) and disallow adding further notes beyond this range.
Comments
Bug was originally reported for Windows. Successfully reproduced on Mac OS X.
Crash log: https://gist.github.com/thomasbonte/840f43c812c7cca61f28
Seems Shift+A in mscore/scoreview.cpp, line 2858 ff. calls Score::cmdAddInterval(8, ...) in libmscore/cmd.cpp, line 403 ff. This calls line2pitch() which seems to properly reduce to values between 0 and 127, (libmscore/utils.cpp, line 338 ff.)
no stack trace, it just stops working without any trace but an "...exited with code 3"
So not really a crash but a more or less clean exit with an error code
Correction:
Fatal: ASSERT: "line >= 0 && line < 75" in file ...\libmscore\key.cpp, line 182 (:0, )
What do you suggest should be done here ? It looks like it is a limitation of MS, that should be handled with some error message rather that a Q_ASSERT.
It should be solved way before the Q_ASSERT. Probably in void ScoreView::cmdAddPitch(int note, bool addFlag) where the computed step should be checked and not be too low or too high.
See https://github.com/musescore/MuseScore/pull/2352
Fixed in branch master, commit 9f05f02636
fix #81731: Crash when repeatedly pressing Shift+A
Fixed in branch master, commit 9961e11cd2
Merge pull request #2352 from lasconic/fix-81731
fix #81731: Crash when repeatedly pressing Shift+A
Fixed in branch 2.0.3, commit 9e769a020c
fix #81731: Crash when repeatedly pressing Shift+A
Automatically closed -- issue fixed for 2 weeks with no activity.