Copy-paste multimeasure rests containing a full measure, or not after cuting, causes corruption/crash

• Nov 18, 2016 - 15:12
Reported version
2.1
Type
Functional
Severity
S2 - Critical
Status
closed
Project

This is an extracted part from a file that has corrupted measures which are hidden with a multimeasure rest. By attempting to fix the corruption, i.e. by entering rests in the corrupted measures, Musescore will crash. This crashes Musescore 2.03 under Windows and all the Windows nightly builds of 3.0.

The corruption starts at measure 200 in the attached file.

Attachment Size
Symphony_c_minor_mov1-Horn-1.mscz 29.5 KB

Comments

Measure 200 Staff 1 incomplete. Expected: 4/4; Found: 0/1
Measure 201 Staff 1 incomplete. Expected: 4/4; Found: 0/1
Measure 202 Staff 1 incomplete. Expected: 4/4; Found: 0/1
Measure 203 Staff 1 incomplete. Expected: 4/4; Found: 0/1

Well, the nature of corrupted scores is that anything can happen, including crashes.

Just delete those 5 empty measures (Ctrl+Del) and add back 5 measures

Attachment Size
Symphony_c_minor_mov1-Horn-1 (1).mscz 29.49 KB
Status (old) needs info active

Well, it's a part, and easy to fix: 1Symphony_c_minor_mov1-Horn-1.mscz
The most important and useful to understand the problem is to attach the complete score.
And if possible, to provide some information on your presumptions (or/and good clues) of that had may be happened.

oops, I didn't notice it is a part. So yes, the full score might be more useful. And I don't quite see why you save a part separatly rather than as a linked part.

Status (old) needs info active

The main reason that I use separate part files instead of linked parts is that for an orchestral score, I like to include cues. Cue notes in parts will invariably appear in the full score in Musescore, which is sloppy looking and unneccesary in the full score. So I have no choice but to extract into separate parts.

Also in this case, one part in the full score includes two instruments (horns I and II are on the same staff in the full score, so I need to extract the parts and separate the voices to have separate instrumental parts. It's a long process and I'm hoping future versions of Musescore will offer more support for extracting parts which are in separate voices.

This error happened from me requiring a cue from a different horn part. In this case I wanted a cue from the horn 3 part inside the horn 1 part which occurs halfway between rehearsal marks I and J (measure 197).

To reproduce the corruption, select all measures between rehearsal marks I and J in the Horn 3 part and paste inside rehearsal letters I and J of the horn 1 part. Inside the horn 1 part, delete the 5 measure long multimeasure rest (measures 199 - 204) with ctrl+del and immediately press ctrl+z to undo. Now measures 200-204 are corrupted and will cause a crash if edited.

The bug only occurs after a copy paste and the original horn 3 file is not corrupted nor affected.

Attachment Size
horn1.mscz 29.04 KB
Horn-3.mscz 28.64 KB

I can't reproduce for now with these steps under Windows 7 and the 2.0.3, and the current nightly (what I missed?)

1) select all measures between rehearsal marks I and J in the Horn 3 part
Result:
step 1.jpg
2) paste inside rehearsal letters I and J of the horn 1 part.
Result:
step2.jpg
3)Inside the horn 1 part, delete the 5 measure long multimeasure rest (measures 199 - 204) with ctrl+del
Step 3.jpg
step 4.jpg
4) and immediately press ctrl+z to undo.
step5.jpg

"Now measures 200-204 are corrupted and will cause a crash if edited."

Here, result as expected after undo. I miss something or/and have you forget to mention a detail (a few details) ?

Yes, just reproduced (it was not mentioned that you make the copy-paste with MM rests enabled )
So, we progress. Good point.

It says multimeasure rests in the title! And in the description! What more must I do!

Although truthfully, this issue probably should be renamed to something more descriptive of the bug, like "cut and paste of multimeasure rest into new part and then deleting the measure and the restoring it with ctrl+z causes corrupt file which causes crash". Ugh.

"It says multimeasure rests in the title! And in the description!"
Well, in Style -> General, "Create multimeasure rests" may be ticked, yes.
But you may press also the shorcut "M" for disable them temporarily, for a better visibility of what you are doing (well, that was my way for copy-past). Nothing is contradictory.
And for seing the corruption, you must, after the last step, disable the MM rests :)
The most important thing is to move on the path of understanding.

If you want to expose the corrupted measures, then yes - you can disable the multimeasure rests. But this isn't necessary to cause the crash - simply start note input at the five bar MM rest and once you hit measure 200 the programme will crash.

Totally with you and I'm glad we're on the same page!

So, to reproduce from scratch

1) Create two new scores (eg "My First Score" twice), with 5 measures

2) Add a note in the second one in measure 3

Notice the MM rests must be enabled in the two files.

(You can load these test files at this stage: test file1.mscz and file test2.mscz)

3) Copy the rang select of mm rests of the file 2 (image below) and paste it into file 1
image 1 scratch.jpg
4) In this file 1, select and delete (Ctlr + Del) the last mm rests.
etape 2 du crash.jpg
5) Undo

Result: corruption which to leads to crash
tape 3 corruption.jpg

Well, reproducible also in a single file. So, minimal one.

1) Load this file: Single file.mscz
2) Select the range select of the 2 mm rests and note, like this:
image bis.jpg
3) Copy-paste in the last mm rest
4) Select the last mm rest (created, but no matter), image below, and delete it (Ctrl + Del)
image bis crash.jpg

5) Undo

Result: corruption -> crash

Title Extracted part with multimeasure rest corruption causes crash Undo after copy-paste and delete multimeasure rests causes corruption/crash

After a first checking, infortunately, it seems a bit difficult to find a single cause in a single location. There has been various issues in the past related to this one. And by returning back, I found some variations in years 2015 and 2014, as I expected. But it soon becomes inextricable. I could try again, but I am fear to look for a needle in a haystack (and not sure at all that I succeed) :(

Title Undo after copy-paste and delete multimeasure rests causes corruption/crash Copy-paste multimeasure rests causes corruption/crash

Further progress in understanding this problem. To arrive at the conclusion that neither the deletion of multimeasure rests nor the action of Undo are necessary to create the corruption. Basically, this is what happens, with steps:
If you want, load the prepared test file (at the end step # 3): Test file mm copy-paste.mscz

First scenario:

1) "My First Score".
2) Enter a whole note in measure 3 and another one in measure 6
3) Press "M"
4) Copy-paste the range select of the first 5 measures - image below- in measure 6 (ie the second whole note)
premier cas.jpg
5) Press "M"

Result: corruption: measure 10 has been "eaten" (this is the fundamental point)
mesure 10.jpg

Second scenario

1) Create a same test file with same configuration
2) Cut (Del) the whole note in measure 3
3) Press "M"
4) Copy-paste the range select of the first mm rests + whole note (image below) in the next mm rests.
EDIT: same corruption by copy-paste only the first mm rests onto the whole note (measure 6)
deuxième cas de sélection.jpg
5) Press "M"

Result: corruption (observe: measures 8 and 9)
deuxième mesure corrompue.jpg

- Observe that if you paste on measures full of notes, instead of multimeasure rests, the issue is strictly the same. See with this other test file: file mm rests and notes.mscz

- To conclude (maybe temporaly, but less sure now!), I have the weakness to think that all the rest, or a good part (?), constitutes variations of this "original" issue.

For the record (and with the first scenario at the step #4), I get a hang/crash between May 19, 2014, and August 5, 2014.
With this nigthly: 5373c93, I observe the crash is solved, but the "eaten" measure is already/always (?) here. Notice that is the measure 7 (instead of measure 10)
mesure 7 5 août.jpg
But the next day, with this nightly: 88b44cd, I receive again a crash.
And on August 7, with, 5bd9c42, crash solved, but I get a worse corruption.

And so on: the beginning (rather the continuation?) of a long story, if I can say this.

EDIT: this issue (corruption/"eaten" measure) doesn't exist with the 1.3 version.

Title Copy-paste multimeasure rests causes corruption/crash Copy-paste multimeasure rests containing a full measure, or not after cuting, causes corruption/crash