Instrument changing in the parts causes crash

• Mar 30, 2019 - 12:18
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

When attempting to substitute an instrument on a multipart score, application crashes. For example, if the part in the score is for violin and one wants to change that part to flute, the application ends immediately.

Mac OS X 10.14.4 Musescore 3.0.5.21343


Comments

Status active needs info

For checking and understand what is going on, we need you to attach the score where you observe this.

Title Substitute instrument causes crash Instrument changing in the parts causes crash
Severity S3 - Major S2 - Critical
Status needs info active

Ok, understood now.

Steps:

1) SATB template
2) Create parts (New all -> Ok)
3) Toggle in Soprano Part
4) Right- click -> Staff properties -> Change instrument -> Select e.g. Violin -> Ok

---> Crash

The fix for the crash itself is included in this PR (namely, this commit) but surprisingly I see the relevant part of the code unchanged in 3.0.4 and 3.0.5 versions. It looks like only some of the commits from that PR were picked to these versions.

Concerning the instrument change in parts having no effect, the reason for it looks clear: the fix makes the instruments information from master score have more priority than that from the parts. It looks like the fix for this issue could be reworking the ChangePart undo command which does the actual instrument change job to change instruments in master score and parts synchronously. It will hardly help with #286842: Assertion failure on adding instrument change in score with parts directly but maybe something similar could be used there too.

Fix version
3.1.0