Crash when copying/pasting a clef into an another clef

• Jun 3, 2019 - 14:49
Reported version
3.1
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

1) Create a new score with multiple staves
2) Copy a clef from a staff
3) Select a different clef on left
4) Paste it
5) Crash

OS: macOS Mojave (10.14), Arch.: x86_64, MuseScore version (64-bit): 3.1.0.22425, revision: e26f7c4


Comments

Priority P0 - Critical

Confirmed, on Windows 7 and with latest master code. Stack trace:
1 ?? 0x4000adf1
2 Ms::ScoreElement::isNote scoreElement.h 260 0xdd3782
3 Ms::Score::select score.cpp 2933 0x8ed112
4 Ms::Score::cmdPaste paste.cpp 990 0x9e5cbe
5 Ms::ScoreView::normalPaste scoreview.cpp 1729 0x447a5c
6 Ms::ScoreView::cmd scoreview.cpp 1805 0x447f20
7 Ms::ScoreView::cmd scoreview.cpp 1770 0x447c3d
8 Ms::MuseScore::cmd musescore.cpp 6264 0x4f7cb6
9 Ms::MuseScore::cmd musescore.cpp 5735 0x4f4f25
10 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 855 0x40a1d6
11 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68c81805
12 Ms::ScoreTab::actionTriggered moc_scoretab.cpp 225 0x41147d
13 Ms::ScoreTab::qt_static_metacall moc_scoretab.cpp 110 0x410fe3
14 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68c81805
15 ZN12QActionGroup7hoveredEP7QAction 0x26574ee5

It is completly unclear to me why testing whether a clef is a note could cause a SIGSEGV (rather than just returning false)

Indeed the same issue with time signatures and with the same stack trace. Not with key signatures though, there just an error dialog pops up, "Destination is not a chord or rest"

No, it's garbage - already freed memory - because the old clef stayed good in this case. For notes, the new note takes over the old when pasting, but apparently for clefs it's the other way around. Well, need more investigating anyhow.

Fix version
3.2.0