Crash with some edit operations on non-styled texts
Setup : commit cce7968 (2013-02-12) under Linux Mint 14, Qt lib 4.8.3
Steps:
1) Enter edit mode on a non-styled text; I used tempo texts which, by default, are not styled.
2) Press [Home]
Result: crash.
Analysis: Crash is at function QString& SimpleText::firstLine()
in file libmscore/simpletext.cpp, which is called by function Text::layout1()
(file libmscore/text.cpp, line 258).
If the text is non-styled, the SimpleText::_layout
list is empty and the [0] operator crashes. Either SimpleText::firstLine()
should check for SimpleText::_layout
size or Text::layout1()
should not call SimpleText::firstLine()
for non-styled texts.
Thanks,
M.
Comments
Update
Not all non-styled texts have an empty
SimpleText::_layout
; but at least texts with manual character formats do. In my case, the (tempo) text was "Prelude. Modérément." with a portion manually set to italics and a slightly smaller font size.In these cases,
SimpleText::_layout
is empty and the call quoted above crashes.Thanks,
M.
Fixed in 861d8849a9 .
Automatically closed -- issue fixed for 2 weeks with no activity.