On Sun, Jan 16, 2022 at 12:02:50PM +0100, Kornel Benko wrote:
> Moreover, from then on the crash will always happen.
> Resetting the line in lyx2.4.conf from
>       zoom_ratio=1.933333333333
> to
>       zoom_ratio=1.0
> cured it.
> 
> Running under gdb, the software exception happens deep inside QT.
> (Not enough skills to find a workaround, sorry)

If you go step by step in gdb you'll see that last steps before the exceptions 
are:

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)) {
(gdb) s
__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<lyx::Row::Element*, 
std::__cxx1998::vector<lyx::Row::Element, std::allocator<lyx::Row::Element> > 
>, std::__debug::vector<lyx::Row::Element, std::allocator<lyx::Row::Element> >, 
std::forward_iterator_tag>::operator-> (
    this=0x7fffffffa840) at /usr/include/c++/10/debug/safe_iterator.h:314
314             _GLIBCXX_DEBUG_VERIFY(this->_M_dereferenceable(),
(gdb) n
317             return base().operator->();
(gdb) n
318           }
(gdb) 
Error: Software exception Detected
----------------------------------------
LyX has caught an exception, it will now attempt to save all unsaved documents 
and exit.

Exception: basic_string::substr: __pos (which is 32) > this->size() (which is 
31)


I do not know enough about row structure to inspect what's wrong with the 
variables.

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to