Copy-paste on notes with slur causes a crash
GIT commit: 4e025f6 and a6ec8aa/ Windows 7
1) "My First Score"
2) Enter a half note in the first measure, and two quarter notes with a slur in the second measure, or load this file: test file.mscz
3) Copy-paste the first measure (or only the half note) into the second measure
Result: crash
Notes:
- works as expected with the 2.0.2
- notice also: if the note in the first measure is a quarter note, there is no crash: the second quarter note (second measure) is removed as expected.
Comments
Located in January 2016 from now. I'll probably catch it.
So, this issue occurs on January 22, 2016.
- This nightly works: d54fb01
- Not this one (with crash): c807c0d
I see only one commit this day of January 22 involving slurs. So, I presume that is a side effect of this one? https://github.com/musescore/MuseScore/pull/2343/files
For fix: #93316: Slurs loses connection to notes if keyboard used to change pitch of notes
EDIT: for the "context": https://github.com/musescore/MuseScore/pull/2343
Thanks for the report and analysis! Yes, I can easily believe that change might have led to a crash somewhere, as my comments in the PR suggest. The cause of the crash here is easy enough to spot, but I'm not yet sure exactly how my particular change led to that. I'll investigate and hopefully fix.
https://github.com/musescore/MuseScore/pull/2425
Found another situation (related probably, but not really the same, because involving Undo) who leads to a crash. Just to know if the PR above solves also this crash?
So, steps for reproduce:
1) "My First Score"
2) Enter a whole note in the first measure, four quarter notes in the second measure, and a quarter note in the third measure, or load this file: Test.mscz
3) Add a slur between the last quarter note in second measure, and the first quarter note in third measure. Like this:
4) Copy-paste the first measure into the second measure (none issue for now, but)
5) Undo
Result: unexpected: the slur spans all the second measure
6) Select the whole note, and change the note value. Or: "N" -> enter a note in another empty measure
Result: crash
- By entering, first, a half hote instead a whole note, and by following the same steps, the result after Undo is this one (with the same crash at the step #6)
The above steps all work as expected with my patch.
Good. Thanks.
Fixed in branch master, commit 51ed847ac7
fix #100626: crash on copy that removes slur
Fixed in branch master, commit 61d1a87743
Merge pull request #2425 from MarcSabatella/100626-slur-crash
fix #100626: crash on copy that removes slur
Fixed in branch 2.0.3, commit 295fd33541
fix #100626: crash on copy that removes slur
Automatically closed -- issue fixed for 2 weeks with no activity.