Chord symbol playback: copy-paste results in crash
Reported version
3.x-dev
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.0.10628, revision: 6c1e675
1) Open this test file: copy paste.mscz
2) Copy-paste the C chord in measure 5 (G note)
3) Eg in toolbar, press "Rewind to start position" (or "Start Playback")
Result: the program shuts down.
Fix version
3.5.0
Comments
For me there was no crash right away, but the copied chord did not play back, and it eventually crashed as I kept poking around. It appears that when copying the chord symbol, the playback information was not copied correctly. I am investigating a fix.
In reply to For me there was no crash… by Marc Sabatella
Thanks. Do "Rewind to start position" and the crash wiĺl be immediate.
https://github.com/musescore/MuseScore/pull/5863
Fixed in branch master, commit b50a5543c1
_fix #302690: crash after copying chord symbol
Resolves: https://musescore.org/en/node/302690
Currently, a crash can occur after copying a chord symbol.
The Harmony object contains a RealizedHarmony object,
which contains a pointer back to the Harmony object,
but the copy constructor for Harmony does not set the pointer.
This ends up yielding an invalid pointer by the time the copy completes.
This fix makes sure to set the pointer correctly.
It also copies the "play" property,
otherwise copied chord symbols would not play by default.
Fixed in branch master, commit 7f59f9ceac
_Merge pull request #5863 from MarcSabatella/302690-chord-copy-crash
fix #302690: crash after copying chord symbol_
Automatically closed -- issue fixed for 2 weeks with no activity.