Crash on master because of cursor position in session

Jean-Marc Lasgouttes lasgouttes at lyx.org
Sun Jan 23 19:03:32 UTC 2022


Le 22/01/2022 à 23:04, Pavel Sanda a écrit :
> On Sat, Jan 22, 2022 at 09:43:15PM +0100, Pavel Sanda wrote:
>> lyx::TextMetrics::redoParagraph:522 pm.rows() = breakParagraph(bigrow); -> step into
>> lyx::TextMetrics::breakParagraph:1136 tail = rb.shortenIfNeeded(width, next_width); -> step into
>> lyx::Row::shortenIfNeeded:640 if (cit->splitAt(w - wid, next_width, true, tail)) {
>>
>> ... (equivalently 4x cont on  Row.cpp:640 breakpoint and then step in)
>>
>> Thread 1 "lyx" hit Breakpoint 5, lyx::Row::shortenIfNeeded (this=0x5555588a7ae0, w=569, next_width=203) at Row.cpp:640
>> 640             if (cit->splitAt(w - wid, next_width, true, tail)) {
> 
> 
> Biset leads to:
> commit d723b90344c0e56b26fc69aa00cb3001e074a723
> Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
> Date:   Mon Sep 6 14:52:42 2021 +0200
> 
>      Break multi-row strings in one pass

Thanks to all for the debugging while I was not available. It should be 
fixed now.

To find the right point, I discovered that gdb has a command "catch 
throw" that stops when there is an exception. Using this, I saw that it 
was code trying to handle a negative string length. From there, it was 
not too difficult to find the culprit.

Please test. The other zoom issue is still pending, of course.

JMarc


More information about the lyx-devel mailing list