Crash when removing start repeat from score with parts.

• Feb 21, 2016 - 02:36
Reported version
2.1
Type
Functional
Severity
S2 - Critical
Status
closed
Project

This is with MuseScore 2.0.2 on Mac OS X 10.11.3.

Steps to reproduce:

- Open the attached score (The_Moontrane.mscz).
- Select File->Parts..., click New All, click OK
- From the Barlines palette, drag a single barline (the first one in the palette) to bar 16, which currently has a double barline.
- From the Barlines palette, drag a double barline (the first one in the second row of the palette) to bar 12, which currently has a single barline.
- MuseScore crashes!

The crash report is attached.

Attachment Size
The_Moontrane.mscz 25.4 KB
musescore_crash.txt 20.48 KB

Comments

Confirmed. The crash happens trying to remove the segment for the start repeat barline at the start of the next measure, which is a side effect of changing the barline at the end of the previous measure. I think what is happening is that the start repeat is removed from the score, which also removes it from the parts, but then we also try to remove it from the parts again. Something like that.

Note the third step (adding the double bar to measure 16) is not needed to see the crash. You can also get the crash by trying to delete the start repeat in bar 13.

So far in limited testing, I can't reproduce this in a score created from scratch, but I don't see anything obviously corrupt about this score, either.

I take it back, I *can* reproduce from scratch.

1) My First Score
2) add start repeat to bar 5
3) add a note to bar 5, or a rehearsal mark to bar 6 (see below)
4) generate parts
5) delete start repeat

Result: crash

Step 3 seems necessary in reproducing the crash, presumably because this prevents the measure from being an mmrest in the part. But it all seems order dependent; I don't see the crash if the start repeat is added after generating parts, for instance, with or without the mmrest in the part.

On further investigation, the problem seems to happen at the moment the parts are generated. The start barline in the score belongs to measure 5, because measure 5 starts a system, but the start repeat in the part belongs to measure 4. The start repeat in measure 5 in the score gets a link to a start repeat that isn't actually present in the part. You can see this using the Object Debugger after step 4 above - the start repeat in the score shows two linsk but one of them leads nowhere.

If we add the start repeat after parts are generated, or if we save / reload the score after generating parts, then the links seem to be set up properly (although not identically - in the first case, there is no link; in the second, there is a single link to itself).

My understanding is that start repeats are generated on the fly based on repeat properties for the measure, so I wonder if maybe we shouldn't be ignoring start repeat barlines when generating parts?

Thanks for the info, I was wondering about that!

I can prevent the crash by forcing the start repeat not to be linked, here:

https://github.com/musescore/MuseScore/blob/e6660618e4e21215b4ae44290e6…

This works, but there are still issues. After deleting the start repeat from the score it is deleted from the parts, but the part oes not get a relayout, so the extra space is still there until a relayout. And other glitches appear, such as mmrests still being broken at that point (maybe only if multiple staves are involved?). So I'm afriad this might be a pretty trick things to really get right. Start repeats are kind of tricky, since they belong to the previous measure normally but the next measure when starting a system, so I can see why the linking is having trouble.

I cannot reproduce this issue with aeddd33
It is difficult to say when this issue was fixed. Because it was not not possible to generate parts until April, 25. From that date, and this nightly, I can not reproduce: 994090f.
The concern is that there are other issues currently concerning the parts.
For example:
- #113861: Unexpected end barline inside a score after creating multimeasure rests
- #108086: Unexpected clefs and key signatures are shown in parts
This is currently the result in part after the removal (so, without crash) of the start repeat in main score (step #5) from these steps: https://musescore.org/fr/node/99096#comment-440391
parts.jpg
So, should we consider this issue to be really specific and considered as solved for the 3.0 or 2.0.4, or is it more prudent to leave under surveillance yet? And we will see the behavior when these other issues will be solved?
I tend to think that it is fixed, but I'm not sure!

Status (old) active fixed

Considering that I still do not manage to reproduce this issue with bb60410, and that the two issues mentioned in the previous comment are now solved, I mark this issue as fixed.