program listing crash

José Matos jaomatos at gmail.com
Sun Aug 25 20:17:23 UTC 2024


On Sun, 2024-08-25 at 14:08 -0500, T Rex wrote:
> Hi everyone, 
> 
> I was trying to indent code inside the "program listing" environment
> and the program closed with the key combination: shift+tab. 
> 
> Steps: 
> 1. select all the content inside the "program listing" environment 
> 2. press shift+tab 
> 3. click on any unselected region inside the environment 
> 4. LyX closes 
> 
> My system is debian12 and lyx 2.4.1 I attach a .lyx file. 
> 
> The error message:
> /usr/include/c++/13.2.0/bits/basic_string.h:1246:
> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference
> std::__cxx11::basic_string<_CharT, _Traits,
> _Alloc>::operator[](size_type) [with _CharT = wchar_t; _Traits =
> std::char_traits<wchar_t>; _Alloc = std::allocator<wchar_t>;
> reference = wchar_t&; size_type = long unsigned int]: Assertion
> '__pos <= size()' failed.

The backtrace for 2.4.x (it also still fails for 2.4.2).

-- 
José Abílio
-------------- next part --------------
(gdb) backtrace
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo at entry=6, no_tid=no_tid at entry=0) at pthread_kill.c:44
#1  0x00007ffff5e80793 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:78
#2  0x00007ffff5e27d0e in __GI_raise (sig=sig at entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff5e0f942 in __GI_abort () at abort.c:79
#4  0x00007ffff603ebb0 in std::__glibcxx_assert_fail
    (file=file at entry=0xed9e58 "/usr/include/c++/14/bits/basic_string.h", line=line at entry=1269, function=function at entry=0xed9d38 "std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; _"..., condition=condition at entry=0xeb1b18 "__pos <= size()") at ../../../../../libstdc++-v3/src/c++11/assert_fail.cc:41
#5  0x00000000005bb76f in std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::operator[] (this=<optimized out>, __pos=30) at /usr/include/c++/14/bits/basic_string.h:1269
#6  lyx::Paragraph::isSeparator (this=this at entry=0x2a54800, pos=pos at entry=30) at /home/jamatos/lyx/lyx-24x/src/Paragraph.cpp:4889
#7  0x00000000004dd89a in lyx::Cursor::setCurrentFont (this=this at entry=0x7fffffffbda0) at /home/jamatos/lyx/lyx-24x/src/Cursor.cpp:2500
#8  0x000000000064fb77 in lyx::TextMetrics::editXY (this=0x2a8fbf8, cur=..., x=<optimized out>, x at entry=277, y=<optimized out>, y at entry=38, assert_in_view=assert_in_view at entry=false, up=up at entry=true)
    at /home/jamatos/lyx/lyx-24x/src/TextMetrics.cpp:1635
#9  0x000000000092e2d3 in lyx::InsetText::editXY (this=this at entry=0x2ae51d0, cur=..., x=x at entry=277, y=y at entry=38) at /home/jamatos/lyx/lyx-24x/src/insets/InsetText.cpp:305
#10 0x000000000080b9ec in lyx::InsetCollapsible::editXY (this=0x2ae51d0, cur=..., x=277, y=38) at /home/jamatos/lyx/lyx-24x/src/insets/InsetCollapsible.cpp:523
#11 0x000000000064f9fe in lyx::TextMetrics::editXY (this=0x2a8fb08, cur=..., x=<optimized out>, y=<optimized out>, assert_in_view=assert_in_view at entry=false, up=up at entry=true) at /home/jamatos/lyx/lyx-24x/src/TextMetrics.cpp:1649
#12 0x0000000000695ce8 in lyx::BufferView::mouseEventDispatch (this=0x2921060, cmd0=...) at /home/jamatos/lyx/lyx-24x/src/BufferView.cpp:2711
#13 0x00000000009cd208 in lyx::frontend::GuiWorkArea::Private::dispatch (this=0x21fc930, cmd=...) at /home/jamatos/lyx/lyx-24x/src/frontends/qt/GuiWorkArea.cpp:435
#14 0x00000000009cd391 in lyx::frontend::GuiWorkArea::mousePressEvent (this=0x29850d0, e=0x7fffffffc9b0) at /home/jamatos/lyx/lyx-24x/src/frontends/qt/GuiWorkArea.cpp:749
#15 0x00007ffff77ed158 in QWidget::event (this=this at entry=0x29850d0, event=event at entry=0x7fffffffc9b0) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qwidget.cpp:9405
#16 0x00007ffff7889c38 in QFrame::event (this=0x29850d0, e=0x7fffffffc9b0) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/widgets/qframe.cpp:521
#17 0x00007ffff6596a4e in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver at entry=0x2985cc0, event=event at entry=0x7fffffffc9b0)
    at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qcoreapplication.cpp:1281
#18 0x00007ffff778b208 in QApplicationPrivate::notify_helper (this=this at entry=0x11a1410, receiver=receiver at entry=0x2985cc0, e=e at entry=0x7fffffffc9b0)
    at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:3281
#19 0x00007ffff7796142 in QApplication::notify (this=this at entry=0x11c6460, receiver=<optimized out>, e=0x7fffffffc9b0) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:2765
#20 0x0000000000973d0f in lyx::frontend::GuiApplication::notify (this=0x11c6460, receiver=<optimized out>, event=<optimized out>) at /home/jamatos/lyx/lyx-24x/src/frontends/qt/GuiApplication.cpp:3001
#21 0x00007ffff6596d48 in QCoreApplication::notifyInternal2 (receiver=0x2985cc0, event=0x7fffffffc9b0) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qcoreapplication.cpp:1142
#22 0x00007ffff6596fbd in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qcoreapplication.cpp:1597
#23 0x00007ffff77946cc in QApplicationPrivate::sendMouseEvent
    (receiver=receiver at entry=0x2985cc0, event=event at entry=0x7fffffffc9b0, alienWidget=<optimized out>, nativeWidget=0x1bd3770, buttonDown=buttonDown at entry=0x7ffff7dad880 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:2347
#24 0x00007ffff78011f6 in QWidgetWindow::handleMouseEvent (this=0x1fec210, event=0x7fffffffcd20) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qwidgetwindow.cpp:649
#25 0x00007ffff7804130 in QWidgetWindow::event (this=0x1fec210, event=0x7fffffffcd20) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qwidgetwindow.cpp:263
#26 0x00007ffff778b218 in QApplicationPrivate::notify_helper (this=this at entry=0x2bddab0, receiver=0x1fec210, e=0x7fffffffcd20, e at entry=0x1) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:3287
#27 0x00007ffff7795647 in QApplication::notify (this=this at entry=0x11c6460, receiver=<optimized out>, e=0x1) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:3049
#28 0x0000000000973d0f in lyx::frontend::GuiApplication::notify (this=0x11c6460, receiver=<optimized out>, event=<optimized out>) at /home/jamatos/lyx/lyx-24x/src/frontends/qt/GuiApplication.cpp:3001
#29 0x00007ffff6596d48 in QCoreApplication::notifyInternal2 (receiver=0x1fec210, event=0x7fffffffcd20) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qcoreapplication.cpp:1142
#30 0x00007ffff6596fbd in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qcoreapplication.cpp:1597
#31 0x00007ffff6de6eab in QGuiApplicationPrivate::processMouseEvent (e=0x7fffd4002ce0) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:2327
#32 0x00007ffff6e4b4bc in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/gui/kernel/qwindowsysteminterface.cpp:1114
#33 0x00007ffff73633f4 in userEventSourceDispatch (source=<optimized out>) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/gui/platform/unix/qeventdispatcher_glib.cpp:38
#34 0x00007ffff62f13ac in g_main_dispatch (context=0x7fffdc000f00) at ../glib/gmain.c:3357
#35 g_main_context_dispatch_unlocked (context=0x7fffdc000f00) at ../glib/gmain.c:4208
#36 0x00007ffff6351818 in g_main_context_iterate_unlocked.isra.0 (context=context at entry=0x7fffdc000f00, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../glib/gmain.c:4273
#37 0x00007ffff62f2883 in g_main_context_iteration (context=0x7fffdc000f00, may_block=1) at ../glib/gmain.c:4338
#38 0x00007ffff6884f23 in QEventDispatcherGlib::processEvents (this=0x11e2450, flags=...) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#39 0x00007ffff65a3a83 in QEventLoop::exec (this=this at entry=0x7fffffffd150, flags=..., flags at entry=...) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/global/qflags.h:34
#40 0x00007ffff659f93c in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/global/qflags.h:74
#41 0x00007ffff6dd67ed in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:1926
#42 0x00007ffff778b189 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:2555
#43 0x000000000095ca1b in lyx::frontend::GuiApplication::exec (this=0x11c6460) at /home/jamatos/lyx/lyx-24x/src/frontends/qt/GuiApplication.cpp:2764
#44 0x000000000056ea23 in lyx::LyX::exec (this=this at entry=0x7fffffffd2a0, argc=@0x7fffffffd29c: 1, argv=<optimized out>) at /home/jamatos/lyx/lyx-24x/src/LyX.cpp:377
#45 0x00000000004084eb in main (argc=<optimized out>, argv=<optimized out>) at /home/jamatos/lyx/lyx-24x/src/main.cpp:55


More information about the lyx-devel mailing list