Bug 185708 - kate and klipper crash on close in QMenu
Summary: kate and klipper crash on close in QMenu
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 186870 189127 190787 192068 192182 192356 192738 193106 194711 194848 194914 197869 199571 199915 201279 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-27 14:23 UTC by Christoph Thielecke
Modified: 2010-02-16 13:16 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace (2.82 KB, text/plain)
2009-02-27 14:24 UTC, Christoph Thielecke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Thielecke 2009-02-27 14:23:56 UTC
Version:            (using Devel)
Installed from:    Compiled sources

It crashes on close.
Comment 1 Christoph Thielecke 2009-02-27 14:24:23 UTC
Created attachment 31683 [details]
backtrace
Comment 2 Pino Toscano 2009-02-27 14:55:56 UTC
Pasting the backtrace inline:

Anwendung: Kate (kate), Signal SIGSEGV
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".

Thread 1 (Thread 0xb5d626c0 (LWP 9065)):
[KCrash Handler]
#6  0xb749d872 in QMenu::findIdForAction (this=0x8323f60, act=0x814e9f8) at /home/kde-devel/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:3152
#7  0xb749f04d in QMenuPrivate::activateCausedStack (this=0x8318100, causedStack=@0xbfbb63c8, action=0x814e9f8, action_e=QAction::Trigger, self=true)
    at /home/kde-devel/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:960
#8  0xb74a5711 in QMenuPrivate::activateAction (this=0x8318100, action=0x814e9f8, action_e=QAction::Trigger, self=<value optimized out>)
    at /home/kde-devel/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:1053
#9  0xb74a6492 in QMenu::mouseReleaseEvent (this=0x8329020, e=0xbfbb6aac) at /home/kde-devel/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:2247
#10 0xb7b92f95 in KMenu::mouseReleaseEvent (this=0x8329020, e=0xbfbb6aac) at /home/kde-devel/kdesvn/kdelibs/kdeui/widgets/kmenu.cpp:454
#11 0xb70df8ea in QWidget::event (this=0x8329020, event=0xbfbb6aac) at /home/kde-devel/kdesvn/qt-copy/src/gui/kernel/qwidget.cpp:7511
#12 0xb74a6f09 in QMenu::event (this=0x8329020, e=0xbfbb6aac) at /home/kde-devel/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:2346
#13 0xb708c34c in QApplicationPrivate::notify_helper (this=0x80539d0, receiver=0x8329020, e=0xbfbb6aac) at /home/kde-devel/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:4051
#14 0xb7094716 in QApplication::notify (this=0xbfbb73e8, receiver=0x8329020, e=0xbfbb6aac) at /home/kde-devel/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3753
#15 0xb7aad35d in KApplication::notify (this=0xbfbb73e8, receiver=0x8329020, event=0xbfbb6aac) at /home/kde-devel/kdesvn/kdelibs/kdeui/kernel/kapplication.cpp:307
#16 0xb6c1a5ab in QCoreApplication::notifyInternal (this=0xbfbb73e8, receiver=0x8329020, event=0xbfbb6aac) at /home/kde-devel/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:593
#17 0xb7095b9e in QApplicationPrivate::sendMouseEvent (receiver=0x8329020, event=0xbfbb6aac, alienWidget=0x0, nativeWidget=0x8329020, buttonDown=0xb77886c0, lastMouseReceiver=@0xb77886c4)
    at ../../include/QtCore/../../../../qt-copy/src/corelib/kernel/qcoreapplication.h:211
#18 0xb70f6af5 in QETWidget::translateMouseEvent (this=0x8329020, event=0xbfbb6ffc) at /home/kde-devel/kdesvn/qt-copy/src/gui/kernel/qapplication_x11.cpp:4348
#19 0xb70f5964 in QApplication::x11ProcessEvent (this=0xbfbb73e8, event=0xbfbb6ffc) at /home/kde-devel/kdesvn/qt-copy/src/gui/kernel/qapplication_x11.cpp:3532
#20 0xb711c84a in x11EventSourceDispatch (s=0x8056840, callback=0, user_data=0x0) at /home/kde-devel/kdesvn/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:141
#21 0xb602d1b8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0xb6030853 in ?? () from /usr/lib/libglib-2.0.so.0
#23 0x08055ad0 in ?? ()
#24 0x00000000 in ?? ()
Comment 3 Nicolas L. 2009-03-06 02:13:11 UTC
i have this bug but not only in kate, with klipper too ( kde 4.2.1 and Qt4.5 )
Comment 4 Sergio Martins 2009-03-06 02:18:06 UTC
Crissi, what version of Qt are you using?


Here's my valgrind report with KDE 4.2.1 and Qt4.5

==16151== Invalid read of size 4                                                
==16151==    at 0x4F0A9FA: QMenuPrivate::q_func() (qmenu_p.h:126)               
==16151==    by 0x4F01C7A:
QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*,
QAction::ActionEvent, bool) (qmenu.cpp:965)                                     
==16151==    by 0x4F07D06: QMenuPrivate::activateAction(QAction*,
QAction::ActionEvent, bool) (qmenu.cpp:1058)                              
==16151==    by 0x4F0A4C7: QMenu::mouseReleaseEvent(QMouseEvent*)
(qmenu.cpp:2252)                                                          
==16151==    by 0x46867BB: KMenu::mouseReleaseEvent(QMouseEvent*)
(kmenu.cpp:454)                                                           
==16151==    by 0x4AA0E85: QWidget::event(QEvent*) (qwidget.cpp:7516)           
==16151==    by 0x4F05A67: QMenu::event(QEvent*) (qmenu.cpp:2351)               
==16151==    by 0x4A3F0DE: QApplicationPrivate::notify_helper(QObject*,
QEvent*) (qapplication.cpp:4084)                                    
==16151==    by 0x4A3FE4C: QApplication::notify(QObject*, QEvent*)
(qapplication.cpp:3786)                                                  
==16151==    by 0x458998F: KApplication::notify(QObject*, QEvent*)
(kapplication.cpp:307)                                                   
==16151==    by 0x5653DBD: QCoreApplication::notifyInternal(QObject*, QEvent*)
(qcoreapplication.cpp:598)                                   
==16151==    by 0x4A4AE6C: QCoreApplication::sendSpontaneousEvent(QObject*,
QEvent*) (qcoreapplication.h:216)                               
==16151==  Address 0x9a689ac is 4 bytes inside a block of size 408 free'd       
==16151==    at 0x402292C: operator delete(void*) (vg_replace_malloc.c:342)     
==16151==    by 0x4F0B6AC: QMenuPrivate::~QMenuPrivate() (qmenu_p.h:151)        
==16151==    by 0x566B157: QObject::~QObject() (qobject.cpp:865)                
==16151==    by 0x4A9B899: QWidget::~QWidget() (qwidget.cpp:1386)               
==16151==    by 0x4F00578: QMenu::~QMenu() (qmenu.cpp:1373)                     
==16151==    by 0x46879F4: KMenu::~KMenu() (kmenu.cpp:173)                      
==16151==    by 0x5663CF5: QObjectPrivate::deleteChildren() (qobject.cpp:1854)  
==16151==    by 0x4A9B7EC: QWidget::~QWidget() (qwidget.cpp:1373)               
==16151==    by 0x4ED7F4E: QMainWindow::~QMainWindow() (qmainwindow.cpp:328)    
==16151==    by 0x4684B79: KMainWindow::~KMainWindow() (kmainwindow.cpp:467)    
==16151==    by 0x46CAD9B: KXmlGuiWindow::~KXmlGuiWindow()
(kxmlguiwindow.cpp:127)                                                         
==16151==    by 0x40D41BF: KParts::MainWindow::~MainWindow()
(mainwindow.cpp:77)
Comment 5 A. Spehr 2009-03-11 04:15:28 UTC
I get about the same with Qt 4.5 and kdelibs trunk r937775 (4.2.66); kate r937636
but I don't think this is a kate bug...
Comment 6 Dario Andres 2009-03-11 23:23:26 UTC
*** Bug 186870 has been marked as a duplicate of this bug. ***
Comment 7 A. Spehr 2009-03-12 00:39:12 UTC
http://lists.trolltech.com/pipermail/qt-interest/2009-March/003200.html

Can anyone try this under an earlier Qt version?
Comment 8 Sergio Pistone 2009-04-12 21:20:53 UTC
I had a very similar problem (backtrace even) with Subtitle Composer. The problem turned up to be that the action was being deleted in its handler. Using deleteLater() instead of delete operator was enough to fix the issue.
Comment 9 Christoph Feck 2009-04-24 00:52:29 UTC
*** Bug 189127 has been marked as a duplicate of this bug. ***
Comment 10 Christoph Feck 2009-04-24 03:56:52 UTC
Looking at http://websvn.kde.org/trunk/qt-copy/src/gui/widgets/qmenu.cpp?r1=958369&r2=958368&pathrev=958369 I feel this is fixed with Qt 4.5.1 (see change in QMenuPrivate::activateCausedStack). Also I cannot reproduce it. Can anyone reproduce with Qt 4.5.1?
Comment 11 Andreas Pakulat 2009-04-27 08:27:32 UTC
*** Bug 190787 has been marked as a duplicate of this bug. ***
Comment 12 Christoph Cullmann 2009-04-30 12:28:41 UTC
SVN commit 961550 by cullmann:

fix crash on exit, not that beautiful, but works
BUG: 185708


 M  +6 -0      katemainwindow.cpp  
 M  +1 -0      katemainwindow.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=961550
Comment 13 Dario Andres 2009-05-08 20:42:25 UTC
*** Bug 192068 has been marked as a duplicate of this bug. ***
Comment 14 Dominik Haumann 2009-05-10 02:25:36 UTC
*** Bug 192182 has been marked as a duplicate of this bug. ***
Comment 15 Dario Andres 2009-05-12 16:22:05 UTC
*** Bug 192356 has been marked as a duplicate of this bug. ***
Comment 16 Dominik Haumann 2009-05-15 11:18:07 UTC
*** Bug 192738 has been marked as a duplicate of this bug. ***
Comment 17 Andreas Pakulat 2009-05-18 14:01:30 UTC
*** Bug 193106 has been marked as a duplicate of this bug. ***
Comment 18 Andreas Pakulat 2009-05-31 10:31:30 UTC
*** Bug 194711 has been marked as a duplicate of this bug. ***
Comment 19 Andreas Pakulat 2009-06-01 23:56:16 UTC
*** Bug 194914 has been marked as a duplicate of this bug. ***
Comment 20 Hemant Kumar 2009-06-06 08:04:44 UTC
The bug still exists with Kate version that comes with KDE 4.2.4. When closing Kate from Menu it still crashes.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5a89700 (LWP 30387)]
0xb73966d2 in QMenu::findIdForAction () from /usr/lib/libQtGui.so.4
Comment 21 FranJPR 2009-07-08 15:46:59 UTC
KDE 4.2.2 Kate 3.2.2, Kate crashes on exit signal 11. Backtrace:

Application: Kate (kate), signal SIGSEGV

Thread 1 (Thread 0xb5ac1700 (LWP 6279)):
[KCrash Handler]
#6  0xb73d06d2 in QMenu::findIdForAction (this=0x91c1330, act=0x90d7e40) at widgets/qmenu.cpp:3157
#7  0xb73d1ead in QMenuPrivate::activateCausedStack (this=0x91d0f08, causedStack=@0xbfb95f98, action=0x90d7e40, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:965
#8  0xb73d876b in QMenuPrivate::activateAction (this=0x91d0f08, action=0x90d7e40, action_e=QAction::Trigger, self=<value optimized out>) at widgets/qmenu.cpp:1058
#9  0xb73d9242 in QMenu::mouseReleaseEvent (this=0x91d2e08, e=0xbfb965d8) at widgets/qmenu.cpp:2252
#10 0xb7c677e5 in KMenu::mouseReleaseEvent (this=0x91d2e08, e=0xbfb965d8) at /build/buildd/kde4libs-4.2.2/kdeui/widgets/kmenu.cpp:454
#11 0xb6fb3b43 in QWidget::event (this=0x91d2e08, event=0xbfb965d8) at kernel/qwidget.cpp:7516
#12 0xb73db629 in QMenu::event (this=0x91d2e08, e=0xbfb965d8) at widgets/qmenu.cpp:2351
#13 0xb6f5ce9c in QApplicationPrivate::notify_helper (this=0x8f24de8, receiver=0x91d2e08, e=0xbfb965d8) at kernel/qapplication.cpp:4084
#14 0xb6f65b11 in QApplication::notify (this=0xbfb97018, receiver=0x91d2e08, e=0xbfb965d8) at kernel/qapplication.cpp:3786
#15 0xb7b8094d in KApplication::notify (this=0xbfb97018, receiver=0x91d2e08, event=0xbfb965d8) at /build/buildd/kde4libs-4.2.2/kdeui/kernel/kapplication.cpp:307
#16 0xb6a8ba3b in QCoreApplication::notifyInternal (this=0xbfb97018, receiver=0x91d2e08, event=0xbfb965d8) at kernel/qcoreapplication.cpp:602
#17 0xb6f64b7e in QApplicationPrivate::sendMouseEvent (receiver=0x91d2e08, event=0xbfb965d8, alienWidget=0x0, nativeWidget=0x91d2e08, buttonDown=0xb7807200, lastMouseReceiver=@0xb7807204)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
#18 0xb6fd4c06 in QETWidget::translateMouseEvent (this=0x91d2e08, event=0xbfb96c1c) at kernel/qapplication_x11.cpp:4359
#19 0xb6fd3ca7 in QApplication::x11ProcessEvent (this=0xbfb97018, event=0xbfb96c1c) at kernel/qapplication_x11.cpp:3421
#20 0xb6ffec6a in x11EventSourceDispatch (s=0x8f27e00, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#21 0xb5e3fb88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0xb5e430eb in ?? () from /usr/lib/libglib-2.0.so.0
#23 0xb5e43268 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#24 0xb6ab7438 in QEventDispatcherGlib::processEvents (this=0x8f11c68, flags={i = -1078366760}) at kernel/qeventdispatcher_glib.cpp:323
#25 0xb6ffe365 in QGuiEventDispatcherGlib::processEvents (this=0x8f11c68, flags={i = -1078366712}) at kernel/qguieventdispatcher_glib.cpp:202
#26 0xb6a8a06a in QEventLoop::processEvents (this=0xbfb96e80, flags={i = -1078366648}) at kernel/qeventloop.cpp:149
#27 0xb6a8a4aa in QEventLoop::exec (this=0xbfb96e80, flags={i = -1078366584}) at kernel/qeventloop.cpp:200
#28 0xb6a8c959 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#29 0xb6f5cd17 in QApplication::exec () at kernel/qapplication.cpp:3553
#30 0xb805f73d in kdemain () from /usr/lib/libkdeinit4_kate.so
#31 0x08048672 in _start ()
Comment 22 Andreas Pakulat 2009-07-09 20:54:17 UTC
*** Bug 199571 has been marked as a duplicate of this bug. ***
Comment 23 Christoph Feck 2009-07-22 15:28:36 UTC
*** Bug 194848 has been marked as a duplicate of this bug. ***
Comment 24 Christoph Feck 2009-07-22 15:31:21 UTC
*** Bug 199915 has been marked as a duplicate of this bug. ***
Comment 25 Andreas Pakulat 2009-07-24 00:26:55 UTC
*** Bug 201279 has been marked as a duplicate of this bug. ***
Comment 26 Dario Andres 2009-09-05 15:40:36 UTC
*** Bug 197869 has been marked as a duplicate of this bug. ***
Comment 27 Peter Davis 2009-09-28 22:53:50 UTC
If it's been fixed, why does my Crash Handler still report a Fatal Error signal 11 (SIGSEGV) when I quit my Kate from her File menu?  I'm unable to create a valid backtrace, and don't know how to take advantage of the fix.
Comment 28 Dominik Haumann 2010-02-16 13:16:33 UTC
SVN commit 1090955 by dhaumann:

better fix for crash:  kate crash on close in QMenu
-> use QtConnection instead of singleShot timer

CCBUG: 185708


 M  +4 -8      katemainwindow.cpp  
 M  +0 -1      katemainwindow.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1090955