Bug 254066 - Kate crashed on new document (DBusMenu) [QAction::menu, DBusMenuExporterDBus::GetChildren, ...QDBusConnectionPrivate...]
Summary: Kate crashed on new document (DBusMenu) [QAction::menu, DBusMenuExporterDBus:...
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 250742 253684 263579 264965 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-13 15:45 UTC by Jesse Milette
Modified: 2011-06-05 17:40 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Milette 2010-10-13 15:45:21 UTC
Application: kate (3.5.2)
KDE Platform Version: 4.5.2 (KDE 4.5.2)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-22-generic i686
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:
Open Kate, press "new" or "close" or "open" -- anything that adds a document into the session.  Kate crashes.  I know by looking at the backtrace that this is to do with the dbus menu plasmoid that I use; however after a certain peroid of time (or maybe after I suspend/resume) kate will no longer crash when I try to reproduce this.

The crash can be reproduced every time.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
[KCrash Handler]
#7  0x00d7fcea in QAction::menu (this=0x93a5720) at kernel/qaction.cpp:748
#8  0x014ead94 in DBusMenuExporterDBus::GetChildren (this=0x9391898, parentId=408, names=...) at ../3rdparty/dbusmenu-qt/src/dbusmenuexporterdbus_p.cpp:47
#9  0x01503708 in DBusMenuExporterDBus::qt_metacall (this=0x9391898, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbf96fe5c) at .moc/release-shared/moc_dbusmenuexporterdbus_p.cpp:106
#10 0x003359dc in QDBusConnectionPrivate::deliverCall (this=0x914dac0, object=0x9391898, msg=..., metaTypes=..., slotIdx=8) at qdbusintegrator.cpp:919
#11 0x00336d25 in QDBusConnectionPrivate::activateCall (this=0x914dac0, object=0x9391898, flags=4080, msg=...) at qdbusintegrator.cpp:829
#12 0x0033749c in QDBusConnectionPrivate::activateObject (this=0x914dac0, node=..., msg=..., pathStartPos=10) at qdbusintegrator.cpp:1399
#13 0x00337a2a in QDBusActivateObjectEvent::placeMetaCall (this=0x95bdf88) at qdbusintegrator.cpp:1493
#14 0x06cff6a2 in QObject::event (this=0x9391898, e=0x95b8e58) at kernel/qobject.cpp:1219
#15 0x00d87fdc in QApplicationPrivate::notify_helper (this=0x91548b8, receiver=0x9391898, e=0x95bdf88) at kernel/qapplication.cpp:4396
#16 0x00d8e04e in QApplication::notify (this=0xbf9708dc, receiver=0x9391898, e=0x95bdf88) at kernel/qapplication.cpp:3798
#17 0x04203cfa in KApplication::notify (this=0xbf9708dc, receiver=0x9391898, event=0x95bdf88) at ../../kdeui/kernel/kapplication.cpp:310
#18 0x06cecb3b in QCoreApplication::notifyInternal (this=0xbf9708dc, receiver=0x9391898, event=0x95bdf88) at kernel/qcoreapplication.cpp:732
#19 0x06cefd8b in sendEvent (receiver=0x0, event_type=0, data=0x9135e98) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#20 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9135e98) at kernel/qcoreapplication.cpp:1373
#21 0x06ceff4d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
#22 0x06d1ba74 in sendPostedEvents (s=0x9157988) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#23 postEventSourceDispatch (s=0x9157988) at kernel/qeventdispatcher_glib.cpp:277
#24 0x003ce855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#25 0x003d2668 in ?? () from /lib/libglib-2.0.so.0
#26 0x003d2848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#27 0x06d1b565 in QEventDispatcherGlib::processEvents (this=0x9135b58, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#28 0x00e49be5 in QGuiEventDispatcherGlib::processEvents (this=0x9135b58, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#29 0x06ceb609 in QEventLoop::processEvents (this=0xbf9707d4, flags=) at kernel/qeventloop.cpp:149
#30 0x06ceba8a in QEventLoop::exec (this=0xbf9707d4, flags=...) at kernel/qeventloop.cpp:201
#31 0x06cf000f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#32 0x00d86e07 in QApplication::exec () at kernel/qapplication.cpp:3672
#33 0x0047a7b7 in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_kate.so
#34 0x0804859b in _start ()

Reported using DrKonqi
Comment 1 Jesse Milette 2010-10-13 16:10:38 UTC
if I disable compositing the crash goes away.  I have a similar crash with konquerer that also goes away if compositing is disabled.
Comment 2 Thomas Lübking 2010-10-14 00:37:30 UTC
is it related to kwin's compositing or compositing in general
(can you try "compiz --replace"?)
Comment 3 Jesse Milette 2010-10-14 22:06:41 UTC
compositing in general -- with compiz it did the same thing.
Comment 4 Thomas Lübking 2010-10-14 22:17:28 UTC
i blame plasma's compositing aware skinning support or dbusmenus usage of it then.
Comment 5 Jesse Milette 2010-10-20 15:56:00 UTC
I have noticed that it has to be restarted in order for it not to crash once compositing has been disabled.  If kate is started with compositing on, it will crash by clicking "new", "close" etc.  However if I start it with compositing off, then it won't crash.  Just thought I would throw those details in there.
Comment 6 Jesse Milette 2010-10-20 16:00:51 UTC
ok it is ARGB transparency.  I am currently using oxygen-argb (which crashes it).  it will also crash with Bespin with ARGB.  However, disabling ARGB fixes the crash.
Comment 7 Thomas Lübking 2010-10-20 17:02:32 UTC
You could try with xbar instead of dbus menu then, but it's likely that the latter ignores but somehow relies on the depth of the (render) visual =\

can you get longer backtraces (ie. deeper than "#7  QAction::menu")
Comment 8 Jesse Milette 2010-10-20 17:43:29 UTC
I ran kate in gdb and crashed it.  It said:


Program received signal SIGSEGV, Segmentation fault.
0x003bbcea in QAction::menu (this=0x82ce948) at kernel/qaction.cpp:748
748     kernel/qaction.cpp: No such file or directory.
        in kernel/qaction.cpp
(gdb) backtrace 
#0  0x003bbcea in QAction::menu (this=0x82ce948) at kernel/qaction.cpp:748
#1  0x00b26d94 in DBusMenuExporterDBus::GetChildren (this=0x82c1af0, parentId=408, names=...) at ../3rdparty/dbusmenu-qt/src/dbusmenuexporterdbus_p.cpp:47
#2  0x00b3f708 in DBusMenuExporterDBus::qt_metacall (this=0x82c1af0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbfffe27c)
    at .moc/release-shared/moc_dbusmenuexporterdbus_p.cpp:106
#3  0x0144a9dc in QDBusConnectionPrivate::deliverCall (this=0x8066ac8, object=0x82c1af0, msg=..., metaTypes=..., slotIdx=8) at qdbusintegrator.cpp:919
#4  0x0144bd25 in QDBusConnectionPrivate::activateCall (this=0x8066ac8, object=0x82c1af0, flags=4080, msg=...) at qdbusintegrator.cpp:829
#5  0x0144c49c in QDBusConnectionPrivate::activateObject (this=0x8066ac8, node=..., msg=..., pathStartPos=10) at qdbusintegrator.cpp:1399
#6  0x0144ca2a in QDBusActivateObjectEvent::placeMetaCall (this=0x8620070) at qdbusintegrator.cpp:1493
#7  0x0161c6a2 in QObject::event (this=0x82c1af0, e=0x84d5720) at kernel/qobject.cpp:1219
#8  0x003c3fdc in QApplicationPrivate::notify_helper (this=0x806aee0, receiver=0x82c1af0, e=0x8620070) at kernel/qapplication.cpp:4396
#9  0x003ca04e in QApplication::notify (this=0xbfffecfc, receiver=0x82c1af0, e=0x8620070) at kernel/qapplication.cpp:3798
#10 0x0124bcfa in KApplication::notify (this=0xbfffecfc, receiver=0x82c1af0, event=0x8620070) at ../../kdeui/kernel/kapplication.cpp:310
#11 0x01609b3b in QCoreApplication::notifyInternal (this=0xbfffecfc, receiver=0x82c1af0, event=0x8620070) at kernel/qcoreapplication.cpp:732
#12 0x0160cd8b in sendEvent (receiver=0x0, event_type=0, data=0x804ee98) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#13 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x804ee98) at kernel/qcoreapplication.cpp:1373
#14 0x0160cf4d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
#15 0x01638a74 in sendPostedEvents (s=0x806d730) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#16 postEventSourceDispatch (s=0x806d730) at kernel/qeventdispatcher_glib.cpp:277
#17 0x018c7855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#18 0x018cb668 in ?? () from /lib/libglib-2.0.so.0
#19 0x018cb848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#20 0x01638565 in QEventDispatcherGlib::processEvents (this=0x804eb58, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#21 0x00485be5 in QGuiEventDispatcherGlib::processEvents (this=0x804eb58, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#22 0x01608609 in QEventLoop::processEvents (this=0xbfffebf4, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
) at kernel/qeventloop.cpp:149
#23 0x01608a8a in QEventLoop::exec (this=0xbfffebf4, flags=...) at kernel/qeventloop.cpp:201
#24 0x0160d00f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#25 0x003c2e07 in QApplication::exec () at kernel/qapplication.cpp:3672
#26 0x001347b7 in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_kate.so
#27 0x0804859b in _start ()
(gdb) 


I don't really know how to get a longer one.

You were right, kate is fine with argb bespin and xbar.
Comment 9 Thomas Lübking 2010-10-20 17:58:17 UTC
you don't the trace is complete. my vague guess is that dbusmenu operates on a window type qwidget and it's x drawable which gets lost when setting the translucency flag (qt "silently" replaces the X drawable, ie. native window) and therefore stumbles over a dangeling pointer, but you should ask Aurélien on this...
Comment 10 Dominik Haumann 2010-11-21 11:05:41 UTC
*** Bug 250742 has been marked as a duplicate of this bug. ***
Comment 11 Dario Andres 2010-11-22 18:33:59 UTC
*** Bug 253684 has been marked as a duplicate of this bug. ***
Comment 12 Dario Andres 2010-11-22 18:36:45 UTC
[Comment from a bug triager]
Bug 257585 and bug 241060 both have similar backtraces (but under different
situations with other KDE apps) so they all may have a common root issue.
Comment 13 Aurelien Gateau 2010-11-25 13:50:04 UTC
(I am dbusmenu-qt maintainer) Interestingly, dbusmenu does not care about compositing: all it does is go through all the items of the menubar and expose them on dbus.

I can't reproduce the bug here (Ubuntu 10.10, KDE 4.5.2, just like you), but I am going to investigate nevertheless.
Comment 14 Thomas Lübking 2010-11-25 14:02:40 UTC
@aurelian
see comment #9 - setting the translucency flag changes the window (native) so if you've connections to QWidget::winId() before and after the change (usually happens at QStyle::polish(QWidget*), you might end up dealing with the wrong client...
Comment 15 Aurelien Gateau 2010-11-25 14:41:08 UTC
(In reply to comment #14)
> @aurelian
> see comment #9 - setting the translucency flag changes the window (native) so
> if you've connections to QWidget::winId() before and after the change (usually
> happens at QStyle::polish(QWidget*), you might end up dealing with the wrong
> client...

Very good point, I missed the fact the reporter was using oxygen-transparent. I just installed this style and can now reproduce the crash.
Comment 16 Aurelien Gateau 2010-12-06 10:28:41 UTC
Fixed in upcoming dbusmenu-qt 0.6.5. Would be great to get confirmation about the fix if you can build dbusmenu-qt from git.
Comment 17 Jesse Milette 2010-12-06 23:16:29 UTC
I did "git clone git://gitorious.org/dbusmenu/dbusmenu-qt.git" and compiled and installed the resulting program, ran kbuildsycoca4 --noincremental logged out and back in, but kate still crashes under the same situation with this backtrace:

"
Application: Kate (kate), signal: Segmentation fault
[KCrash Handler]
#7  QList (this=0x6c) at ../../include/QtCore/../../src/corelib/tools/qlist.h:118
#8  QWidget::actions (this=0x6c) at kernel/qwidget.cpp:3181
#9  0x01515e8d in DBusMenuExporterDBus::GetChildren (this=0x8ebeea0, parentId=408, names=...) at ../3rdparty/dbusmenu-qt/src/dbusmenuexporterdbus_p.cpp:53
#10 0x0152e708 in DBusMenuExporterDBus::qt_metacall (this=0x8ebeea0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbfd852dc) at .moc/release-shared/moc_dbusmenuexporterdbus_p.cpp:106
#11 0x004409dc in QDBusConnectionPrivate::deliverCall (this=0x8beb210, object=0x8ebeea0, msg=..., metaTypes=..., slotIdx=8) at qdbusintegrator.cpp:919
#12 0x00441d25 in QDBusConnectionPrivate::activateCall (this=0x8beb210, object=0x8ebeea0, flags=4080, msg=...) at qdbusintegrator.cpp:829
#13 0x0044249c in QDBusConnectionPrivate::activateObject (this=0x8beb210, node=..., msg=..., pathStartPos=10) at qdbusintegrator.cpp:1399
#14 0x00442a2a in QDBusActivateObjectEvent::placeMetaCall (this=0x90ab5f8) at qdbusintegrator.cpp:1493
#15 0x0067b6a2 in QObject::event (this=0x8ebeea0, e=0xbfd85128) at kernel/qobject.cpp:1219
#16 0x00db2fdc in QApplicationPrivate::notify_helper (this=0x8bf3548, receiver=0x8ebeea0, e=0x90ab5f8) at kernel/qapplication.cpp:4396
#17 0x00db904e in QApplication::notify (this=0xbfd85d5c, receiver=0x8ebeea0, e=0x90ab5f8) at kernel/qapplication.cpp:3798
#18 0x03ab905a in KApplication::notify (this=0xbfd85d5c, receiver=0x8ebeea0, event=0x90ab5f8) at ../../kdeui/kernel/kapplication.cpp:310
#19 0x00668b3b in QCoreApplication::notifyInternal (this=0xbfd85d5c, receiver=0x8ebeea0, event=0x90ab5f8) at kernel/qcoreapplication.cpp:732
#20 0x0066bd8b in sendEvent (receiver=0x0, event_type=0, data=0x8bd2e98) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#21 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8bd2e98) at kernel/qcoreapplication.cpp:1373
#22 0x0066bf4d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
#23 0x00697a74 in sendPostedEvents (s=0x8bf5728) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#24 postEventSourceDispatch (s=0x8bf5728) at kernel/qeventdispatcher_glib.cpp:277
#25 0x00a3c855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#26 0x00a40668 in ?? () from /lib/libglib-2.0.so.0
#27 0x00a40848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#28 0x00697565 in QEventDispatcherGlib::processEvents (this=0x8bd2b58, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#29 0x00e74be5 in QGuiEventDispatcherGlib::processEvents (this=0x8bd2b58, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#30 0x00667609 in QEventLoop::processEvents (this=0xbfd85c54, flags=) at kernel/qeventloop.cpp:149
#31 0x00667a8a in QEventLoop::exec (this=0xbfd85c54, flags=...) at kernel/qeventloop.cpp:201
#32 0x0066c00f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#33 0x00db1e07 in QApplication::exec () at kernel/qapplication.cpp:3672
#34 0x00bc37b7 in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_kate.so
#35 0x0804859b in _start ()
"

Note that I did not uninstall my currently installed version of dbus menu qt, I figured that the new compile would overwrite it.  Please correct me if I am wrong.
Comment 18 Dario Andres 2010-12-06 23:28:19 UTC
[Comment from a bug triager]
- Check if the installation path of your compiled version is the same as the default one.
The path of the code in the backtrace doesn't seem to match a "locally/manually" installed version:

example: in

#9  0x01515e8d in DBusMenuExporterDBus::GetChildren (this=0x8ebeea0,
parentId=408, names=...) at
../3rdparty/dbusmenu-qt/src/dbusmenuexporterdbus_p.cpp:53

"../3rdparty/dbusmenu-qt/src/dbusmenuexporterdbus_p.cpp:53" could be something like "/home/user/buildpath/src/dbusmenuexporterdbus_p.cpp:53"

Regards
Comment 19 Jesse Milette 2010-12-07 01:46:04 UTC
My cmake install prefix is /usr.  I have compared the output from "make install" and the package listing from synaptic.  The .so is getting installed in /usr/lib, which is the correct location.  I have noticed however, that the library I compiled from git installs libdbusmenu-qt.so.2.3.2 in /usr/lib, while my kubuntu package is libdbusmenu-qt.so.2.3.4.

Also, I did not set the CMAKE_BUILD_TYPE flag in ccmake, could that be the problem?  

Sorry, I am new at this!
Comment 20 Aurelien Gateau 2010-12-10 14:20:09 UTC
I messed up with the version numbers, that is why dbusmenu-qt version 0.6.5 came with a library version of 2.3.2... I released version 0.6.6 to fix this.

Unfortunately this new release actually won't help you much because the patch is in Qt. Kubuntu version of Qt has been patched for appmenu support, but because of circular dependencies the appmenu patch includes its own copy of dbusmenu-qt. This patch needs to be updated to include the new dbusmenu-qt.

I want to avoid this duplication for the next Kubuntu release, but I am afraid that for now unless you rebuild Qt yourself, you will have to either disable appmenu or use the regular Oxygen style.
Comment 21 Pino Toscano 2011-01-18 21:33:19 UTC
*** Bug 263579 has been marked as a duplicate of this bug. ***
Comment 22 Christoph Cullmann 2011-06-05 17:40:47 UTC
*** Bug 264965 has been marked as a duplicate of this bug. ***