Crash when copying/pasting a clef into an another clef
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
Fix version
3.2.0
Comments
I hit this, too, yesterday, also Mac Mojave.
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
)Not only clefs, but also time signatures and key signatures.
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"
In reply to Indeed the samerissue with… by Jojo-Schmitz
Here with key signature too.
1) Load this test file: key signature.mscz
2) Copy-paste first key sig on the second one (or the second on the first one)
----> crash
The crash is because the element is not valid, it seems my fix for #288343: Selection lost on paste to single note broke this. Copying a clef on top of a clef works different than copying a note on top of a note.
but
e
is notNULL
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.
https://github.com/musescore/MuseScore/pull/5098
Fixed in branch master, commit 2ee0fb2bc3
fix #290187: crash on paste clef/key/time signature
Fixed in branch master, commit 4d3e5f6573
_Merge pull request #5098 from MarcSabatella/290187-crash-paste-single
fix #290187: crash on paste clef/key/time signature_
Automatically closed -- issue fixed for 2 weeks with no activity.