MuseScore crashes when deleting a score (Ctlr + Del) with slurs
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 |
Fix version
3.5.1
Comments
Confirmed. Same crash in 3.5 RC too
See also #224201: Crash on deleting all measures in a score, closed back then as not being able to reproduce (anymore)
Also #121856: Regression - Crash by deleting all measures in Continuous View, maybe?
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
Culprit might be 7dc8ca53b9 or a96b72c2fe
See https://github.com/musescore/MuseScore/pull/6346
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.
Steps:
1) Load this test file, 1 measure with a slur : minimal test slur.mscz
2) Ctlr + A
3) Ctlr + Del
Result: crash
Hmm, yes, my PR looks, feels and smells a lot like band-aid...
The crash probably occurs on December 4, 2019 in branch 3.4 (unfortunately, I don't have any nightlies from that day, there were a dozen of them, so I couldn't be more precise). And nothing as can I see directly related/nammed around slurs: https://github.com/musescore/MuseScore/commits/3.4?before=8effb8d3b7a9a…
In any case, on December 3rd, this one works (no crash): 912b65c
while on December 5th, this one crashes: 90be292
The PR still fixes this...
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.
In reply to I agree the PR doesn't… by Marc Sabatella
Hi Marc, being a former software engineer I have enjoyed watching this thread develop. I wish I could join in the debugging effort just for old times sake. Anyway, I am curious what the status PR created means.
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”.
Fixed in branch 3.x, commit 6611779055
fix #307991: crash when deleting all measures
Fixed in branch 3.x, commit a2dc24da82
_Merge pull request #6346 from Jojo-Schmitz/crash-delete-all
fix #307991: crash when deleting all measures_
Fixed in branch master, commit cbadf852fd
fix #307991: crash when deleting all measures
Automatically closed -- issue fixed for 2 weeks with no activity.