STEPS TO REPRODUCE 1. "Edit bookmarks" 2. Invoke the "Toolbar settings" context menu. 3. Close the context menu. OBSERVED RESULT It reproducibly crashes: > PS /home/RokeJulianLockhart> gdb keditbookmarks > GNU gdb (Fedora Linux) 14.2-1.fc40 > Copyright (C) 2023 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Type "show copying" and "show warranty" for details. > This GDB was configured as "x86_64-redhat-linux-gnu". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > <https://www.gnu.org/software/gdb/bugs/>. > Find the GDB manual and other documentation resources online at: > <http://www.gnu.org/software/gdb/documentation/>. > > For help, type "help". > Type "apropos word" to search for commands related to "word"... > Reading symbols from keditbookmarks... > > This GDB supports auto-downloading debuginfo from the following URLs: > <https://debuginfod.fedoraproject.org/> > Enable debuginfod for this session? (y or [n]) y > Debuginfod has been enabled. > To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. > Reading symbols from /home/RokeJulianLockhart/.cache/debuginfod_client/9b117bb610c8e0d1028715780bab0da2c569d3f1/debuginfo... > (gdb) run > Starting program: /usr/bin/keditbookmarks > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib64/libthread_db.so.1". > [New Thread 0x7fffe36006c0 (LWP 345559)] > Downloading separate debug info for /usr/lib64/qt6/plugins/platformthemes/libqxdgdesktopportal.so > [New Thread 0x7fffe18006c0 (LWP 345645)] > [New Thread 0x7fffe0e006c0 (LWP 345646)] > [New Thread 0x7fffd98006c0 (LWP 345649)] > [New Thread 0x7fffd8e006c0 (LWP 345650)] > [New Thread 0x7fffc8c006c0 (LWP 345651)] > [New Thread 0x7fffc3e006c0 (LWP 345652)] > [New Thread 0x7fffc34006c0 (LWP 345653)] > [New Thread 0x7fffc2a006c0 (LWP 345654)] > [New Thread 0x7fffc20006c0 (LWP 345655)] > [New Thread 0x7fffc16006c0 (LWP 345656)] > [New Thread 0x7fffc0c006c0 (LWP 345657)] > [New Thread 0x7fffb7e006c0 (LWP 345658)] > [New Thread 0x7fffb74006c0 (LWP 345659)] > [New Thread 0x7fffb6a006c0 (LWP 345660)] > [Thread 0x7fffb6a006c0 (LWP 345660) exited] > [Thread 0x7fffb74006c0 (LWP 345659) exited] > [Thread 0x7fffb7e006c0 (LWP 345658) exited] > [Thread 0x7fffc0c006c0 (LWP 345657) exited] > [Thread 0x7fffc16006c0 (LWP 345656) exited] > [Thread 0x7fffc20006c0 (LWP 345655) exited] > [New Thread 0x7fffc20006c0 (LWP 345667)] > [New Thread 0x7fffc16006c0 (LWP 345668)] > > Thread 1 "keditbookmarks" received signal SIGSEGV, Segmentation fault. > QAction::associatedObjects (this=this@entry=0x0) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/gui/kernel/qaction.cpp:507 > Downloading source file /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/gui/kernel/qaction.cpp > 507 Q_D(const QAction); > (gdb) bt > #0 QAction::associatedObjects (this=this@entry=0x0) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/gui/kernel/qaction.cpp:507 > #1 0x00007ffff7ec7f6d in KToolBarPrivate::slotContextAboutToHide (this=0x5555559097b0) at /usr/src/debug/kf6-kxmlgui-6.0.0-1.fc40.x86_64/src/ktoolbar.cpp:752 > #2 KToolBar::contextMenuEvent (this=<optimized out>, event=<optimized out>) at /usr/src/debug/kf6-kxmlgui-6.0.0-1.fc40.x86_64/src/ktoolbar.cpp:961 > #3 KToolBar::contextMenuEvent (this=<optimized out>, event=<optimized out>) at /usr/src/debug/kf6-kxmlgui-6.0.0-1.fc40.x86_64/src/ktoolbar.cpp:952 > #4 0x00007ffff6fe4cc0 in QWidget::event (this=0x555555981a50, event=0x7fffffffc770) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/widgets/kernel/qwidget.cpp:9339 > #5 0x00007ffff6f87f68 in QApplicationPrivate::notify_helper (this=this@entry=0x5555555df4c0, receiver=receiver@entry=0x555555981a50, e=e@entry=0x7fffffffc770) > at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/widgets/kernel/qapplication.cpp:3296 > #6 0x00007ffff6f93a55 in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fffffffc770) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/widgets/kernel/qapplication.cpp:2923 > #7 0x00007ffff5d8f218 in QCoreApplication::notifyInternal2 (receiver=0x555555981a50, event=0x7fffffffc770) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1121 > #8 0x00007ffff5d8f24a in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1136 > #9 0x00007ffff6ff8463 in QWidgetWindow::handleMouseEvent (this=<optimized out>, event=0x7fffffffca30) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/widgets/kernel/qwidgetwindow.cpp:661 > #10 0x00007ffff6ffb250 in QWidgetWindow::event (this=0x555555a96400, event=0x7fffffffca30) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/widgets/kernel/qwidgetwindow.cpp:267 > #11 0x00007ffff6f87f68 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x555555a96400, e=0x7fffffffca30) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/widgets/kernel/qapplication.cpp:3296 > #12 0x00007ffff5d8f218 in QCoreApplication::notifyInternal2 (receiver=0x555555a96400, event=0x7fffffffca30) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1121 > #13 0x00007ffff5d8f43d in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1553 > #14 0x00007ffff65e3d9b in QGuiApplicationPrivate::processMouseEvent (e=0x7fffd4001910) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/gui/kernel/qguiapplication.cpp:2325 > #15 0x00007ffff66455fc in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/gui/kernel/qwindowsysteminterface.cpp:1109 > #16 0x00007ffff6b40824 in userEventSourceDispatch (source=<optimized out>) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/gui/platform/unix/qeventdispatcher_glib.cpp:38 > #17 0x00007ffff50d568c in g_main_dispatch (context=0x7fffdc000f00) at ../glib/gmain.c:3344 > #18 g_main_context_dispatch_unlocked (context=0x7fffdc000f00) at ../glib/gmain.c:4152 > #19 0x00007ffff5136788 in g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffdc000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4217 > #20 0x00007ffff50d6b03 in g_main_context_iteration (context=0x7fffdc000f00, may_block=1) at ../glib/gmain.c:4282 > #21 0x00007ffff6066de3 in QEventDispatcherGlib::processEvents (this=0x5555555ecf60, flags=...) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393 > #22 0x00007ffff5d9c053 in QEventLoop::exec (this=this@entry=0x7fffffffce60, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/corelib/global/qflags.h:34 > #23 0x00007ffff5d97ffc in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/corelib/global/qflags.h:74 > #24 0x00007ffff65d37cd in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/gui/kernel/qguiapplication.cpp:1925 > #25 0x00007ffff6f87ed9 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.6.2-6.fc40.x86_64/src/widgets/kernel/qapplication.cpp:2574 > #26 0x00005555555746fe in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/keditbookmarks-24.02.1-1.fc40.x86_64/src/main.cpp:268 > (gdb) EXPECTED RESULT It shouldn't crash. SOFTWARE/OS VERSIONS Operating System: cpe:/o:fedoraproject:fedora:40 KDE Plasma Version: 6.0.3 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.8.5-301.fc40.x86_64 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor Memory: 30.5 GiB of RAM Graphics Processor: AMD Radeon RX 5700 Manufacturer: ASRock Product Name: X670E Taichi ADDITIONAL INFORMATION https://bugzilla.redhat.com/show_bug.cgi?id=2275016#c0:~:text=description%20of%20problem%3A%201.%20%22edit%20bookmarks%22%202.%20invoke%20the%20%22toolbar%20settings%22%20context%20menu.%203.%20close%20the%20context%20menu.%20it%20reproducibly%20crashes
I can reproduce this in keditbookmarks and in experimental KF6 branch of Krusader: > #0 0x0000155553510434 in QAction::associatedObjects() const () from /usr/lib/libQt6Gui.so.6 > #1 0x000015555534fff4 in KToolBar::contextMenuEvent(QContextMenuEvent*) () from /usr/lib/libKF6XmlGui.so.6 > #2 0x0000155553b4c322 in QWidget::event(QEvent*) () from /usr/lib/libQt6Widgets.so.6 > #3 0x0000155553afc55c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6 > #4 0x0000155553b02f1b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6 > #5 0x0000155552b44e38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6 > #6 0x0000155553b62175 in ?? () from /usr/lib/libQt6Widgets.so.6 > #7 0x0000155553b636b0 in ?? () from /usr/lib/libQt6Widgets.so.6 > #8 0x0000155553afc55c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6 > #9 0x0000155552b44e38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6 > #10 0x0000155553176cf0 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt6Gui.so.6 > #11 0x00001555531e5b44 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Gui.so.6 > #12 0x00001555535f9594 in ?? () from /usr/lib/libQt6Gui.so.6 > #13 0x0000155550473a89 in ?? () from /usr/lib/libglib-2.0.so.0 > #14 0x00001555504d59b7 in ?? () from /usr/lib/libglib-2.0.so.0 > #15 0x0000155550472f95 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 > #16 0x0000155552da28dd in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 > #17 0x0000155552b4f10e in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 > #18 0x0000155552b4945d in QCoreApplication::exec() () from /usr/lib/libQt6Core.so.6 > #19 0x000055555562dbc1 in main (argc=2, argv=0x7fffffffe038) at {...}/krusader/app/main.cpp:314 > #20 0x0000155552439c88 in ?? () from /usr/lib/libc.so.6 > #21 0x0000155552439d4c in __libc_start_main () from /usr/lib/libc.so.6 > #22 0x00005555555faa75 in _start () All actions in the context menu (e.g. "Lock Toolbar Positions") lead to crash. However, I could fix it in Krusader by replacing >setXMLFile("krusaderui.rc"); >createGUI(...); with >setupGUI(Default, "krusaderui.rc"); and I noticed that setupGUI() must be called with the "ToolBar" flag, otherwise the very same bug occurs again. In keditbookmarks >void KXmlGuiWindow::createGUI(const QString& xmlfile) is used and I assume that replacing it by > setupGUI(Defaults, ...) would fix it here as well. Because the docs say that the "ToolBar" flag is not mandatory (and that createGUI() could also be used) I'm moving this to KXMLGui. KDE Frameworks 6.3.0 Qt 6.7.1
*** Bug 498433 has been marked as a duplicate of this bug. ***
*** Bug 499071 has been marked as a duplicate of this bug. ***
(In reply to Alex Bikadorov from comment #1) Thanks for the much better analysis than I provided. > I can reproduce this in keditbookmarks, and in experimental KF6 branch of Krusader. What did you do to reproduce it in Krusader? Did you just access KEditBookmarks via one of the one of the KDolphinPart-equivalents' toolbars, or does doing something in Krusader's GUI work, too? > Because the docs say that the "ToolBar" flag is not mandatory (and that createGUI() could also be used) I'm moving this to KXMLGui. I'll set it as CONFIRMED, too. Its counterpart is, as of today.
>What did you do to reproduce it in Krusader? Did you just access KEditBookmarks via one of the one of the KDolphinPart-equivalents' toolbars, or does doing something in Krusader's GUI work, too? I really meant Krusader itself. After it was ported to KF6 it crashed when any GUI action in the context menu of the toolbar is clicked. The fix was basically this line: https://invent.kde.org/utilities/krusader/-/blob/master/app/krusader.cpp?ref_type=heads#L198 (commit 4a0d063a3c3d05f57 in the Krusader repo).
(In reply to Roke Julian Lockhart Beedell from comment #0) This also affects `KFontView`, per https://bugzilla.redhat.com/show_bug.cgi?id=2349038#c0.