Copy-paste an empty measure onto a measure located before a MM-rest causes corruption/crash
GIT commit 1736346 / Windows 10
1) "My First Score"
2) Enter a whole note in the second measure
3) Exit note input mode -> press M
4) Select the first measure (empty): image below
5) Copy-paste this first measure (or use "R" key) onto the second measure.
First unexpected result (concerning the selection)
6) Press "R" key
Result: crash
Attachment | Size |
---|---|
first1.jpg | 8.96 KB |
Comments
A variation, the most likely, but with an "interesting" result after Undo, ie a nasty corruption (empty measures rests) followed without surprise by a crash.
Steps:
1) Treble clef template
2) Add a whole note in the second measure.
3) Exit note input mode -> Press "M"
4) Copy-paste the first measure (empty) onto the second measure
5) Undo
Result: empty measures rests, and no more barlines!
6) Click on the staff
Result: crash
Note: This corruption is not reproductible with "My First Score" by default, in reason of the presence of the vertical frame, which seems involved somewhere. Delete this frame (difficult, probably another issue, the only way is first to cut the edge of the frame - the blue dashed line- then remove the word "Title"), and the corruption will appear if you proceed with the mentioned steps above.
Well, after checking, the two issues described above don't seem really (or directly?) related.
1) Indeed, the first one (crash after copy-paste twice an empty measure before a mm-rest) goes back to mid-April, when the big change of the new layout was merged. So, I can reproduce since this Nightly: fe2eea4
2) For the second one (corruption after undo), this appears later, ie on last June, 3.
- No corruption with this nightly (undo works as expected): 41b89ae
- Corruption and crash with the next one: a41b109
See also maybe this related (?) commit: https://github.com/musescore/MuseScore/commit/fab01c5ec6822f89c92d7dd69…
EDIT: Let me know if I should report separately the two issues.
Active in the 2.1 dev. 213632d
With steps:
1) "My First Score"
2) Add a whole note in the second measure.
3) Exit note input mode -> Press "M"
4) Select the first measure
5) Press "R" key twice
Result: crash
A side effect of this commit I guess https://github.com/musescore/MuseScore/commit/213632d24aa19b0c37ae911f3…, since I cannot reproduce with the previous one: e61d435
Does this remain an issue?
I am unable to reproduce. I am guessing it was fixed along with #173366: Copy-paste a multimeasure rest when the number exceeds the remaining measures causes a crash, either in the first fix in https://github.com/musescore/MuseScore/commit/f6dc599eceae08665a070d9db… or the second in https://github.com/musescore/MuseScore/commit/a756960c57a37f46f986b4709….
Anyone else want to verify?
With a94d6c4, and steps in comment #3
(and two additional steps)
1) "My First Score"
2) Add a whole note in the second measure.
3) Exit note input mode -> Press "M" (the test file at this step: empty mm.mscz )
4) Select the first (empty) measure
5) Press "R" key twice
6) Press "M"
Result: corruption
7) Enter a whole note in first measure
8) Press "R"
Result: crash
I guess it's enough :) Instead of trying to recover the selection after a mmRest creation, I will just clear it.
Fixed in branch 2.1, commit d9d86fb14d
fix #120356: clear selection if we end is before start
That should be OK. I know there were issues involving losing selection selection after certain operations that were fixed some time ago (see #88741: Selection lost when inserting bars with multimeasure rests enable and it would be shame to lose all of that, but I think probably this is fine. I'll test a few of those other cases to see.
It was actually #74946: Crash / corruption on copy/paste with end segment in mmrest and #74881: Crash on copy/paste with mmrests I was think of, but they are fine. No crash, one lost selection I can live with.
Automatically closed -- issue fixed for 2 weeks with no activity.