Crash immediately following instrument renaming

• Dec 26, 2015 - 23:48

There is something strange in the code handling the renaming of an instrument. I believe it is either caused, or significantly exacerbated by the use of the flat symbol, which is similar to the lower case 'b' character, but a special char. (It also has non-standard spacing around the flat symbol, which may or may not be related to the issue). Any instrument in the normal instrument list that includes a key after the name, like Bb Cornet, Bb Trumpet, Eb Cornet, etc. can make this happen. Adding characters in front of, or after the flat symbol in the fields for Part Name, Long instrument name:, or Short instrument name: can make the crash occur.

Versions:
Musescore 2.0.2 Revision: f51dc11
OS X 10.11.1
System: Mac Pro, 2x3.2Ghz Quad Core Xeons, 18GB of RAM.

How I reproduce it:

1. Click on the instrument name to the left of an existing multi-instrument score for an instrument containing the flat symbol, example 'Bb Trumpet'.
2. Right Click.
3. Select Staff Properties...
3. Edit the existing text in the Part Name field to read '1st Trumpet in Bb' (leaving the special flat character as is).
4. Optionally make similar changes to Long instrument name and Short instrument name fields.
5. Hit OK or Apply buttons.
6. The app will crash, most often instantly.
7. It seems a coin flip whether or not the existing .mscz file will be corrupted (0 bytes in length) or still there when you restart Musescore.

Notes:
1. If I change the flat symbol to a 'b' instead, it crashes much less frequently, or perhaps not at all.
2. If I make renaming changes to instruments that do not contain the flat symbol, no crashes have yet been seen.
3. It seems that it will also crash when editing a normal instrument without the flat symbol sometimes as part of a score containing other instruments that do, particularly when there has been one crash already.
4. Arguably the worst part about this bug is the chance after a crash to have the file zero'd out completely the next time you open it and save. Even though it appears to be recovered (you can see the music on screen), after you save and exit, the next time you come in, it's gone completely.

Update: I exported the .mscz file out to XML. In that file, I noticed that the part name and short name fields exist, but the Long instrument name does not. It seems to be automatically generated from the part name. Maybe it's not supposed to be editable in the UI at all? At any rate, I made the edits with a text editor on the raw XML file, and loaded them back into Musescore and that seemed to work. However, any time I go even look at the part naming afterward, even if no changes are made, it will crash afterward, maybe 5 or 10 minutes later. If I just never go back into that popup window where changes are made, it seems stable.


Comments

See #84351: Crash when saving with instrument name selected and continuous view, #87241: Persistent bug when changing Instrument names - crashes and wipes savedfile, #63271: Changing instrument names may lead to crash and empty mscz file, maybe #85046: Crash when adding/removing an instrument in Continuous view after autosave. There do seem to be problems in this area but we've had trouble pinnng down a good reproducible series of steps, except for a few specific situations that may or may not apply to you. Do any of these seem relevant?

In reply to by Marc Sabatella

Yes, I think they are definitely related, thank you for posting them. Especially 84351 and 87241. Now that I try it again, the crash happens sometimes after the change itself, but if not, it does seem to always happen on a subsequent manual save, and as I said earlier, I have also seen the 0 byte file issue. As a workaround for that, I have started saving alternate copies and exporting an XML version just so I won't lose work entirely if it happens again.

I do believe that the presence/absence of the flat symbol in an instrument name seems to make the crashes substantially more likely, almost guaranteed in most cases. Perhaps that will help track it down, or maybe not. What I can tell you is that it fails for me very consistently on my system with the steps above.

I have given up on instrument renaming for the time being in Musecore. I export to XML, manually changed the instrument names, and reimport, then save back to .mscz. Downside of this is you need to do it before you make any engraving changes to extracted parts, because they all disappear as part of the export/import cycle.

In reply to by randy.howard.1675

As far as I know, what the bugs all have in common is changed made after generating parts. So I *think* it should be safe to make your name changes before generating parts. Since generating parts is normally one of the very *last* things one would do, I think that's why this bug seems to be encountered so rarely.

Do you still have an unanswered question? Please log in first to post your question.