Undoing a clef change when the other linked staff does not display one leads to a crash
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
active
Regression
Yes
Workaround
No
Project
Version 3.6.2 / Windows 10
Steps:
1. New score for an instrument with a linked staff (eg Template Guitar + Tablature)
2. Right-click TAB staff -> Staff/Part Properties -> Untick "Show Clef"
You are here: test linked staves clef.mscz
3. Change clef top staff, eg for "Treble clef"
4. Undo
Result: crash
Comments
confirmed, even in latest 3.x build.
Stack trace:
1 Ms::ScoreElement::isTuplet scoreElement.h 312 0x1039a57
2 Ms::AddElement::undo undo.cpp 751 0xb2e93e
3 Ms::UndoCommand::undo undo.cpp 150 0xb2bd9d
4 Ms::UndoMacro::undo undo.cpp 539 0xb2d73d
5 Ms::UndoStack::undo undo.cpp 467 0xb2d144
6 Ms::Score::undoRedo cmd.cpp 233 0x534824
7 Ms::ScoreView::startUndoRedo scoreview.cpp 3948 0x64ee07
8 Ms::MuseScore::undoRedo musescore.cpp 5029 0x42a109
9 Ms::MuseScore::cmd musescore.cpp 6312 0x431f51
10 Ms::MuseScore::cmd musescore.cpp 6040 0x430706
11 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 524 0x5eca7c
12 void doActivate(QObject *, int, void * *) 0x68b978bb
13 QActionGroupPrivate::_q_actionTriggered() 0x327b4cc2
14 QActionGroup::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) 0x327b5299
15 void doActivate(QObject *, int, void * *) 0x68b978bb
16 QAction::activate(QAction::ActionEvent) 0x327b3df3
17 QAbstractButtonPrivate::click() 0x32895ffb
18 QAbstractButton::mouseReleaseEvent(QMouseEvent *) 0x328961d1
19 QToolButton::mouseReleaseEvent(QMouseEvent *) 0x3296b7fe
20 QWidget::event(QEvent *) 0x327f3d78
...
Doesn't crash with 3.5.2
In reply to Doesn't crash with 3.6.2 by Jojo-Schmitz
The change occurs somewhere between a nightly (prerelease 3.6), November 11, 2020 (result as expected after Undo).
And another on November 17, 2020 (with crash)
Thanks for the investigation. That is unfortunaly still a lot of commits in between, some 115
A candidate ? https://github.com/musescore/MuseScore/commit/aefe38916a5cadd0008c07986… (invisible/stafftype.cpp/editstaff/undo etc.)