Copy-paste with "R " key before a system change with MM rests leads to corruption/crash

• Dec 16, 2016 - 08:28
Reported version
3.0
Priority
P1 - High
Type
Functional
Severity
S1 - Blocker
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

3c6a36b / Windows7

I'm starting to check some issues (fixed for 2.0.3) in anticipation of the release of the 2.1.

Discovered by checking this one: #103646: Crash after copy-paste linked measures before a system change with multimeasure rests. So, something related (I guess) has been broken.

No necessary by now to have linked staves (of course, with linked staves, the question will be the same). But, importantly, the necessary condition is now to use the "R" key for copy-paste and for trigger the problem.

The result is not the same immediatly, but the "new" result is really unexpected, and corruption just as much.

New steps:

1) "My First Score"
2) Enter a whole note in the first measure -> Exit note input mode
3) Press "M", to enable multimeasure rests.
4) Select the first measure
5) Press "R" key twice

First result: unexpected "last measure" (sort of big longa rests)
first unexp.jpg
6) press "R" two other times
Other unexpected result:
second unexp.jpg
7) Press "M":
Result: a large score of 441 measures almost all corrupted (click on image)
final unexp.jpg
8) Click on one of this corrupted measure

Result: crash


Comments

It is not possible to formally identify the origin of this issue. Because the "R" function is completely broken since the new layout code. See: #107556: The selection is lost and failure with R key by copying and pasting on multimeasasure rests

Currently, this issue has worsened with: 95ee954

Steps:
1) "My First Score"
2) Enter a note in first measure
3) "M"
4) Select the first measure -> Press "R" key twice
5) Press "M"
Result: sort of double whole rests / longa rests
6) "N" -> enter a note in one of these measures

Result: crash

It may maybe useful (?) however to know when these unexpected rests appear these last months.
Localization tests.

Well, interesting fishing. Indeed, I notice a change on last December, 6

- With this nightly: 8d8ceee the selection is lost, and the "R" function is broken, as always (you can only press R two times, not three.) But after selecting the first measure -> press "R" twice -> press "M": there is no corruption.
5 december.jpg

- With this one: 3a06556 it appears (weird rests), and crash by entering a note in these measures.
corrup.jpg

From what I see, the same nighlty/commit (merged in the branch 2.0.4/2.1: https://github.com/musescore/MuseScore/commit/f8550d18d0ff31ed8503f7969… ) mentioned above could be a good candidate (a side effect)
For fix: #141496: Copy-paste multimeasure rests containing a full measure, or not after cuting, causes corruption/crash

Status (old) fixed active
Reported version 2.2 3.0

Still a problem in master. The code is now different than 2.1, createMMRest is not present anymore and we try to select a measure while the MMRest are not created yet.

Severity S2 - Critical S1 - Blocker
Priority P1 - High
Regression No
Reproducibility Always
Workaround No

Any updates on this issue?

This particular issue seems to be fixed recently but the other problem remains. Basically, after repeating the first measure 3 times (so that MM rest appears to be on the next line) repeating undo/redo operations occasionally leads to a crash. Perhaps this should be a separate issue though. I attached a script that leads to a crash for me (though perhaps more than one attempt may be needed).

Attachment Size
mmrest_crash.script.zip 297 bytes