Corrupt score and crash when creating from template with linked parts

• Oct 8, 2015 - 22:00
Type
Functional
Severity
S2 - Critical
Status
closed
Regression
No
Workaround
No
Project

1. Add the score clg2016.mscz in the modele folder
2. Restart MuseScore and create a new score with this modele

First problem : staffs for piano and Rhodes are "linked" : entering a note on the treble staff add the same note in the bass staff.

3. Delete instruments piano and Rhodes
4. Add new instruments piano and electric piano : MuseScore crash.

OSX El capitan 10.11
MuseScore 2.0.2 f51dc11


Comments

Title Crash when using a model with strange behavior Corrupt score and crash when creating from template with linked parts
Status (old) needs info active

I can reproduce, and I think I see the cause, or at least, the trigger.

The problem happens if the score used as a template already has parts generated. The parts are misinterpreted as linked staves within the score, for any instrument that has multiple staves. So you can reproduce this from scratch as follows:

1) new score, flute + piano
2) file / parts
3) new all
4) OK
5) save to Templates folder
6) file / new
7) choose the template you just created
8) complete wizard
9) press "I" to display Instruments dialog

Result: the two piano staves are linked

I believe this happens because the check here isn't correctly differentiating linked staves withint he score versus linked staves between score and parts:

https://github.com/musescore/MuseScore/blob/6931c7fd5d8dd7ee062ebb81a3f…

But I haven't really investigated much, seems possible the underlying problem is elsewhere.

The crash, BTW, is probably the same as #63226: Crash on autosave after deleting staff from instrument in score with linked parts and/or #70226: Entering an articulation/ornament after the deletion of a linked staff in a file with part causes crash

Status active fixed
Regression No
Workaround No

Checked in master. The score created from the template is correct and shows Flute+Piano instruments with Piano linked staves.