Bug 221123

Summary: Adding a menu item to a toolbar does not work
Product: [Unmaintained] kdelibs Reporter: Paul Grandperrin <paul.grandperrin>
Component: kdeuiAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: peter.penz19, uetsah
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Paul Grandperrin 2010-01-03 16:50:28 UTC
Application: dolphin (1.3.80)
KDE Platform Version: 4.3.85 (KDE 4.3.85 (KDE 4.4 Beta2))
Qt Version: 4.6.0
Operating System: Linux 2.6.31-ARCH x86_64

-- Information about the crash:
How to reproduce the bug:
-Open Dolphin ( or any other kde application)
-Open the View Menu
-Right-click on "show hidden files"
-"Add to toolbar"
-"Main toolbar"

I'm using Chakra with KDEmod-testing packages (4.3.85), but it also works with Debian Sid (4.3.4) when Qt 4.6.0 is installed (from experimental repo).

I'm not an expert but it looks to come from Qt4.6.0.

The crash can be reproduced everytime.

 -- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
[KCrash Handler]
#5  QAction::data (this=0x0) at kernel/qaction.cpp:1178
#6  0x00007f16fbef1a3f in KMenu::contextMenuFocusAction () at /home/phil/kdemod/testing/kdelibs/src/kdelibs-4.3.85/kdeui/widgets/kmenu.cpp:559
#7  0x00007f16fbf2cb5e in KDEPrivate::KMenuMenuHandler::slotAddToToolBar (this=0x20b59f0, tb=0) at /home/phil/kdemod/testing/kdelibs/src/kdelibs-4.3.85/kdeui/xmlgui/kmenumenuhandler_p.cpp:137
#8  0x00007f16fbf2d5fb in KDEPrivate::KMenuMenuHandler::qt_metacall (this=0x20b59f0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff68321710)
    at /home/phil/kdemod/testing/kdelibs/src/build/kdeui/kmenumenuhandler_p.moc:78
#9  0x00007f16fb1cb0a3 in QMetaObject::activate (sender=0x2057030, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3294
#10 0x00007f16fbd4d2e1 in KSelectAction::triggered (this=0x7fff68321310, _t1=0) at /home/phil/kdemod/testing/kdelibs/src/build/kdeui/kselectaction.moc:183
#11 0x00007f16fbd4ec64 in KSelectAction::actionTriggered (this=0x2057030, action=0x26fd070) at /home/phil/kdemod/testing/kdelibs/src/kdelibs-4.3.85/kdeui/actions/kselectaction.cpp:331
#12 0x00007f16fbd4ff05 in KSelectAction::qt_metacall (this=0x2057030, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff683218e0)
    at /home/phil/kdemod/testing/kdelibs/src/build/kdeui/kselectaction.moc:121
#13 0x00007f16fb1cb0a3 in QMetaObject::activate (sender=0x20f5640, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3294
#14 0x00007f16fa57c04f in QActionGroup::triggered (this=0x7fff68321310, _t1=0x26fd070) at .moc/release-shared/moc_qactiongroup.cpp:146
#15 0x00007f16fa57c857 in QActionGroupPrivate::_q_actionTriggered (this=<value optimized out>) at kernel/qactiongroup.cpp:93
#16 0x00007f16fa57cab1 in QActionGroup::qt_metacall (this=0x20f5640, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff68321a40) at .moc/release-shared/moc_qactiongroup.cpp:101
#17 0x00007f16fb1cb0a3 in QMetaObject::activate (sender=0x26fd070, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3294
#18 0x00007f16fa577672 in QAction::triggered (this=0x7fff68321310, _t1=true) at .moc/release-shared/moc_qaction.cpp:263
#19 0x00007f16fa57965b in QAction::activate (this=0x26fd070, event=<value optimized out>) at kernel/qaction.cpp:1245
#20 0x00007f16fa9b1f6d in QMenuPrivate::activateCausedStack (this=<value optimized out>, causedStack=..., action=0x26fd070, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:994
#21 0x00007f16fa9b796a in QMenuPrivate::activateAction (this=0x20e2e60, action=0x26fd070, action_e=QAction::Trigger, self=<value optimized out>) at widgets/qmenu.cpp:1086
#22 0x00007f16fbef002e in KMenu::mouseReleaseEvent (this=0x20d30b0, e=0x0) at /home/phil/kdemod/testing/kdelibs/src/kdelibs-4.3.85/kdeui/widgets/kmenu.cpp:469
#23 0x00007f16fa5d2d39 in QWidget::event (this=0x20d30b0, event=0x7fff68322780) at kernel/qwidget.cpp:7974
#24 0x00007f16fa9b9beb in QMenu::event (this=0x20d30b0, e=0x7fff68322780) at widgets/qmenu.cpp:2406
#25 0x00007f16fa57d69c in QApplicationPrivate::notify_helper (this=0x205d900, receiver=0x20d30b0, e=0x7fff68322780) at kernel/qapplication.cpp:4242
#26 0x00007f16fa584521 in QApplication::notify (this=0x7fff683232d0, receiver=0x20d30b0, e=0x7fff68322780) at kernel/qapplication.cpp:3822
#27 0x00007f16fbe14cf6 in KApplication::notify (this=0x7fff683232d0, receiver=0x20d30b0, event=0x7fff68322780)
    at /home/phil/kdemod/testing/kdelibs/src/kdelibs-4.3.85/kdeui/kernel/kapplication.cpp:302
#28 0x00007f16fb1b83cc in QCoreApplication::notifyInternal (this=0x7fff683232d0, receiver=0x20d30b0, event=0x7fff68322780) at kernel/qcoreapplication.cpp:704
#29 0x00007f16fa58368e in QCoreApplication::sendEvent (receiver=0x20d30b0, event=0x7fff68322780, alienWidget=0x0, nativeWidget=0x20d30b0, buttonDown=<value optimized out>, 
    lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#30 QApplicationPrivate::sendMouseEvent (receiver=0x20d30b0, event=0x7fff68322780, alienWidget=0x0, nativeWidget=0x20d30b0, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, 
    spontaneous=true) at kernel/qapplication.cpp:2956
#31 0x00007f16fa601bb5 in QETWidget::translateMouseEvent (this=0x20d30b0, event=<value optimized out>) at kernel/qapplication_x11.cpp:4302
#32 0x00007f16fa60047a in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff68322f00) at kernel/qapplication_x11.cpp:3501
#33 0x00007f16fa62ab7a in x11EventSourceDispatch (s=0x2061730, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#34 0x00007f16f5c9426e in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#35 0x00007f16f5c97c28 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#36 0x00007f16f5c97d50 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#37 0x00007f16fb1e1913 in QEventDispatcherGlib::processEvents (this=0x2010450, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407
#38 0x00007f16fa62a77e in QGuiEventDispatcherGlib::processEvents (this=0x7fff68321310, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#39 0x00007f16fb1b6cf2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#40 0x00007f16fb1b70cc in QEventLoop::exec (this=0x7fff68323220, flags=) at kernel/qeventloop.cpp:201
#41 0x00007f16fb1bae0b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#42 0x0000000000439e25 in main (argc=<value optimized out>, argv=<value optimized out>) at /home/phil/kdemod/testing/kdebase/src/kdebase-4.3.85/apps/dolphin/src/main.cpp:94

Reported using DrKonqi
Comment 1 Dario Andres 2010-01-03 17:08:49 UTC
This looks mostly the same as bug 218485 Thanks
Comment 2 Christoph Feck 2010-01-04 14:10:45 UTC
SVN commit 1069933 by cfeck:

Fix crash with context menus on KMenu

CCBUG: 218485
CCBUG: 221123

This only fixes the crash, but the invoked action still
does not work. There seems to be a Qt 4.6 regression.



 M  +3 -0      kmenu.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1069933
Comment 3 Christoph Feck 2010-01-05 17:13:04 UTC
SVN commit 1070420 by cfeck:

Fix context menus on KMenu

QMenu::activeAction() is already 0 when the action is emitted.

BUG: 218485
BUG: 221123


 M  +6 -4      kmenu.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1070420
Comment 4 Christoph Feck 2010-01-18 01:09:06 UTC
*** Bug 222986 has been marked as a duplicate of this bug. ***