Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.8.0
-
None
-
Debian linux, but not really relevant, when looking at the code.
-
ebfbabf1f3c2e65acecdb06de3b3a47a933e38f9
Description
When changing the position of a QTextCursor through editing or just setPosition or movePosition, and the position is in a not-yet-relayouted block then Qt crashes. This is new in 4.8.0
There is a check in QTextCursorPrivate::setX() for editBlock and when I put that around it doesn't crash, however that is not a practical workaround for other reasons. Looks like there is also a check if the line is valid so it is actually weird tat doesn't prevent the crash. Maybe the lines are not invalidated when edited. Well at least some qt 4.8.0 change made it happen
In Caligra we have our own documentlayout class that obviously can't layout everything on every change so we have timers to do it a little of a time. I would assume the crash would happen too if no documentlayout class is attached (QTextDocument acting like just a storage)