Crash (assert failure) entering empty first line in text
Ubuntu 14.04, GIT commit: 1d90b26
1) score
2) click a note or rest
3) Ctrl+T to create staff text
3) hit Enter
Result: crash
It's an assert failure, not technically a crash unless you are running a debug build I guess, but results are likely not good no matter what.
Comments
Problem is here:
https://github.com/musescore/MuseScore/blob/master/libmscore/text.cpp#L…
_text is an empty list, so _text.last() is null. I can prevent the assertion failure by testing for (_text.size() > 0) before this assignment. Seems likely to be a good fix; if there is no text, we probably don't need to assign any format. I'll submit PR, there is something else that should be done, I'm sure someone will get it.
https://github.com/musescore/MuseScore/pull/1833
I guess probably it ends up being harmless if not in debug mode? Well, if it's harmless, so is my fix :-)
Fixed in 669ae4af19
Automatically closed -- issue fixed for 2 weeks with no activity.