program listing crash
José Matos
jaomatos at gmail.com
Sun Aug 25 20:13:18 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.
I can confirm that. LyX only crashes if you click on the unselected
region.
Running 2.4.1 in Fedora 41. The complete backtrace follows attached.
--
José Abílio
-------------- next part --------------
(gdb) bt
#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=0x555555f9eb20 "/usr/include/c++/14/bits/basic_string.h", line=line at entry=1269, function=function at entry=0x555555fa1148 "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=0x555555f75408 "__pos <= size()") at ../../../../../libstdc++-v3/src/c++11/assert_fail.cc:41
#5 0x0000555555895515 in std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::operator[] (this=<optimized out>, __pos=<optimized out>) at /usr/include/c++/14/bits/basic_string.h:1265
#6 std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::operator[] (this=<optimized out>, __pos=30, this=<optimized out>, __pos=<optimized out>) at /usr/include/c++/14/bits/basic_string.h:1265
#7 lyx::Paragraph::isSeparator (this=0x555557e1c710, pos=30) at /usr/src/debug/lyx-2.4.1-2.fc41.x86_64/src/Paragraph.cpp:4889
#8 lyx::Cursor::setCurrentFont (this=0x7fffffffb3b0) at /usr/src/debug/lyx-2.4.1-2.fc41.x86_64/src/Cursor.cpp:2499
#9 0x00005555559d0b17 in lyx::TextMetrics::editXY (this=0x555557117098, cur=..., x=<optimized out>, y=<optimized out>, assert_in_view=<optimized out>, up=<optimized out>)
at /usr/src/debug/lyx-2.4.1-2.fc41.x86_64/src/TextMetrics.cpp:1631
#10 0x00005555559d0958 in lyx::TextMetrics::editXY (this=0x555557ed16d8, cur=..., x=<optimized out>, y=<optimized out>, assert_in_view=<optimized out>, up=<optimized out>)
at /usr/src/debug/lyx-2.4.1-2.fc41.x86_64/src/TextMetrics.cpp:1645
#11 0x0000555555a0fdb5 in lyx::BufferView::mouseEventDispatch (this=0x555557e1a920, cmd0=<optimized out>) at /usr/src/debug/lyx-2.4.1-2.fc41.x86_64/src/BufferView.cpp:2710
#12 0x0000555555ccb0de in lyx::frontend::GuiWorkArea::Private::dispatch (this=0x5555584a3030, cmd=...) at frontends/qt/GuiWorkArea.cpp:435
#13 0x0000555555ccb339 in lyx::frontend::GuiWorkArea::mousePressEvent (this=0x555557f07f70, e=0x7fffffffbf90) at frontends/qt/GuiWorkArea.cpp:749
#14 0x00007ffff77ed158 in QWidget::event (this=this at entry=0x555557f07f70, event=event at entry=0x7fffffffbf90) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qwidget.cpp:9405
#15 0x00007ffff7889c38 in QFrame::event (this=0x555557f07f70, e=0x7fffffffbf90) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/widgets/qframe.cpp:521
#16 0x00007ffff6596a4e in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver at entry=0x555557e40410, event=event at entry=0x7fffffffbf90)
at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qcoreapplication.cpp:1281
#17 0x00007ffff778b208 in QApplicationPrivate::notify_helper (this=this at entry=0x555556274490, receiver=receiver at entry=0x555557e40410, e=e at entry=0x7fffffffbf90)
at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:3281
#18 0x00007ffff7796142 in QApplication::notify (this=this at entry=0x555556279380, receiver=<optimized out>, e=0x7fffffffbf90) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:2765
#19 0x0000555555c7aca0 in lyx::frontend::GuiApplication::notify (this=0x555556279380, receiver=<optimized out>, event=<optimized out>) at frontends/qt/GuiApplication.cpp:3001
#20 0x00007ffff6596d48 in QCoreApplication::notifyInternal2 (receiver=0x555557e40410, event=0x7fffffffbf90) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qcoreapplication.cpp:1142
#21 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
#22 0x00007ffff77946cc in QApplicationPrivate::sendMouseEvent
(receiver=receiver at entry=0x555557e40410, event=event at entry=0x7fffffffbf90, alienWidget=<optimized out>, nativeWidget=0x555556c895f0, 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
#23 0x00007ffff78011f6 in QWidgetWindow::handleMouseEvent (this=0x555556f3f040, event=0x7fffffffc330) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qwidgetwindow.cpp:649
#24 0x00007ffff7804130 in QWidgetWindow::event (this=0x555556f3f040, event=0x7fffffffc330) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qwidgetwindow.cpp:263
#25 0x00007ffff778b218 in QApplicationPrivate::notify_helper (this=this at entry=0x555557fdbd60, receiver=0x555556f3f040, e=0x7fffffffc330, e at entry=0x1)
at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:3287
#26 0x00007ffff7795647 in QApplication::notify (this=this at entry=0x555556279380, receiver=<optimized out>, e=0x1) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:3049
#27 0x0000555555c7aca0 in lyx::frontend::GuiApplication::notify (this=0x555556279380, receiver=<optimized out>, event=<optimized out>) at frontends/qt/GuiApplication.cpp:3001
#28 0x00007ffff6596d48 in QCoreApplication::notifyInternal2 (receiver=0x555556f3f040, event=0x7fffffffc330) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qcoreapplication.cpp:1142
#29 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
#30 0x00007ffff6de6eab in QGuiApplicationPrivate::processMouseEvent (e=0x7fffd40018f0) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:2327
#31 0x00007ffff6e4b4bc in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/gui/kernel/qwindowsysteminterface.cpp:1114
#32 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
#33 0x00007ffff62f13ac in g_main_dispatch (context=0x7fffdc000f00) at ../glib/gmain.c:3357
#34 g_main_context_dispatch_unlocked (context=0x7fffdc000f00) at ../glib/gmain.c:4208
#35 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
#36 0x00007ffff62f2883 in g_main_context_iteration (context=0x7fffdc000f00, may_block=1) at ../glib/gmain.c:4338
#37 0x00007ffff6884f23 in QEventDispatcherGlib::processEvents (this=0x55555628fd70, flags=...) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#38 0x00007ffff65a3a83 in QEventLoop::exec (this=this at entry=0x7fffffffc760, flags=..., flags at entry=...) at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/global/qflags.h:34
#39 0x00007ffff659f93c in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/corelib/global/qflags.h:74
#40 0x00007ffff6dd67ed in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:1926
#41 0x00007ffff778b189 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.2-5.fc41.x86_64/src/widgets/kernel/qapplication.cpp:2555
#42 0x000055555590bb56 in lyx::frontend::GuiApplication::exec (this=0x555556279380) at frontends/qt/GuiApplication.cpp:2764
#43 lyx::LyX::exec (this=0x7fffffffd2b0, argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/lyx-2.4.1-2.fc41.x86_64/src/LyX.cpp:377
#44 0x00005555557c446a in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/lyx-2.4.1-2.fc41.x86_64/src/main.cpp:55
More information about the lyx-devel
mailing list