Crash when adding new text style
On Xubuntu 14.10 (MuseScore commit 5f30234), create a score, go to Style | Text... and click on the button New. Add My custom style 1 in the field Text style name and click on OK.
Click again on the button New. Add My custom style 2 in the field Text style name and click on OK.
MuseScore crashes with this output in the terminal:
TextStyle <My custom style 1> not found Abandon (core dumped)
Comments
You added 'My custom style 2' and he error message complained about 'My custom style 1' ???
Yes. Crash occurs after adding the second style, but the output error is about the first one.
There appears to be a very easy fix: just force the handler for "newClicked()" in textStlye.cpp to call apply(), such as right here:
https://github.com/musescore/MuseScore/blob/2a67602f2839693f9a2a538e4f0…
This forces the first added style to be fully registered, which eliminates the crash. What you lose is the ability change your mind and Cancel out of the dialog. Not sure how well that actually does work now, but this would make sure it doesn't :-).
What you lose is the ability change your mind and Cancel out of the dialog. Not sure how well that actually does work now
With commit 2a67602, if we add a new style but click Cancel instead of OK or Apply in the Edit Text Styles window, the style is not saved. If we open again the Edit Text Styles window, there's no custom style.
About forcing the new style to be fully registered, I think that the biggest problem is the lack of a Delete button.
I realize that with the interface in English, crash occurs when adding the second new style, while with the interface in French, it occurs after the first (when we click OK to confirm the name of the first new style).
In French, error output is always as below (no matter the style name entered):
I confirm that with the interface in French, the crash immediately comes the first OK.
I also note that the change took place on August 26, between the Nightly (4ac331b - 4:07 p.m., so, Ok) and the Nightlty (bc506ed: 6:10 p.m., with crash)
Lack of a Delete button for custom styles is indeed an issue with or without this bug.
cadiz1 - it must be a lot of work to test so many nightly builds seeing where a problem was introduced! It *is* useful and appreciated. In this case, it pinpoints the issue - to this commit:
https://github.com/musescore/MuseScore/commit/bc506ed85bf10a719cf186dc8…
which deals with translations & Unicode. I suspect this will turn out to not be related to the original issue with two successive presses of "New" in English.
About the "Delete" button: #34676: "Edit Text Styles" dialog needs a "Delete" button
Fixed in e9f40af9f7
Automatically closed -- issue fixed for 2 weeks with no activity.