Crash when trying to use score ordering on a translated file.

• Nov 16, 2020 - 08:24
Reported version
3.x-dev
Type
Functional
Frequency
Few
Severity
S1 - Blocker
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

1) Open attached score.
2) In the form "Try our new improved setting", choose "Instrument ordering & bracketing"
3) Click "Apply"
4) Click "OK" on the "Instrument form"

Now MuseScore crashes.

Attachment Size
dutch.mscz 9.94 KB

Comments

Cause is the translated instrument names being stored in the score files, but getting compared against the untranslated ones from instruments.xml (or against translated ones, but in another language), and there draw a blank.
Possible solution would be to store the (unique!) Instrument ID in the score files and use those for comparison.
Additional benefit: musescore.com could use those to show which instruments a score contains rather than relying on user input or midi sound names or some other bogus heuristics.
Downside: this may introduce a backwards compatibility issue.
But even worse: it won't help with existing pre-3.6 score as far as I can see

In reply to by Jojo-Schmitz

Storing an unique instrument id is indeed what I'm thinking of.
For pre 3.6 score, there will be no such instrument id so, I'm thinking of an algorithm to "guess" what that id should be. Maybe the MusicXML id could help there. It is not really unique but might be good enough for finding the instrument id.

Fix version
3.6.0