MuseScore crashes when deleting a score (Ctlr + Del) with slurs

• Jul 18, 2020 - 03:35
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

Load the attached score.
Press Ctrl-A (select all)
Press Ctrl-del (delete all)
MuseScore crashes

Attachment Size
Fantasia01_0.mscz 47.89 KB

Comments

Stack trace:
1 Ms::ScoreElement::isMeasure scoreElement.h 271 0xff26b0
2 Ms::ScoreView::moveViewportToLastEdit scoreview.cpp 5461 0x609bb2
3 Ms::MuseScore::endCmd musescore.cpp 6132 0x42fb41
4 Ms::MuseScore::endCmd musescore.h 713 0xeddfaa
5 Ms::Score::endCmd cmd.cpp 271 0xabc014
6 Ms::Score::cmd cmd.cpp 4210 0xad0bf7
7 Ms::ScoreView::cmd scoreview.cpp 2810 0x5fc77b
8 Ms::ScoreView::cmd scoreview.cpp 2056 0x5f49eb
9 Ms::MuseScore::cmd musescore.cpp 6618 0x432aea
10 Ms::MuseScore::cmd musescore.cpp 6040 0x42f3af
11 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 518 0x5a15c2
12 QMetaObject::activate(QObject *, int, int, void * *) 0x68a947c8
13 Ms::ScoreTab::actionTriggered moc_scoretab.cpp 225 0x5bfcfe
14 Ms::ScoreTab::qt_static_metacall moc_scoretab.cpp 110 0x5bf786
15 QMetaObject::activate(QObject *, int, int, void * *) 0x68a947c8
16 QActionGroup::hovered(QAction *) 0x2bc94db2
17 QActionGroup::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) 0x2bc9573c
18 QMetaObject::activate(QObject *, int, int, void * *) 0x68a947c8
19 QAction::activate(QAction::ActionEvent) 0x2bc93e0e
20 QAction::event(QEvent *) 0x2bc948cb
...

So looks different to the previous issues

Status PR created active

Maybe your PR fixes the crash, but my opinion: the culprit are the slurs.
In the attached score, some slurs look like ties (same pitch, eg measure 5 top staff Voice 1)
By selecting this slur measure 5 (right-click -> all similar elements), the crash is fixed after Ctlr + A and Ctrl +Del Fantasia1.mscz

And I can reproduce from scratch easily with an unique measure. More precision soon.

Title MuseScore crashes when deleting all measures MuseScore crashes when deleting a score (Ctlr + Del) with slurs

Steps:
1) Load this test file, 1 measure with a slur : minimal test slur.mscz
2) Ctlr + A
3) Ctlr + Del

Result: crash

I agree the PR doesn't address the deeper underlying issue, which is that upon deleting all measures from a score with slurs, the "CmdState" of the score still records info about a now-deleted slur. But I suspect that will turn out to be harmless, and in case, we're definitely better off with this fix that without. It's a totally safe and prudent fix that should remain in place even if someday the underlying issue is also addressed.

PR is short for “pull request”, a fancy term for “I (or in this case @Jojo-Schmitz ) have implemented a fix on my own system and am requesting that you (the “powers that be” who decide what goes in to the official MuseScore code) ‘pull’ my changes in, so the fix can be included in an upcoming release”.

Fix version
3.5.1