Bug 185365 - Crash at close when it's closed
Summary: Crash at close when it's closed
Status: CLOSED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Unspecified
: NOR crash
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-23 18:55 UTC by BRULE Herman
Modified: 2009-08-14 11:44 UTC (History)
2 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 BRULE Herman 2009-02-23 18:55:49 UTC
Version:            (using KDE 4.2.0)
Installed from:    Gentoo Packages

Hello,
Kalarm have crash at close. See back trace:

Application: KAlarm (kalarm), signal SIGSEGV
0x00007f6aebfd9901 in nanosleep () from /lib/libc.so.6
Current language:  auto; currently c
[Current thread is 0 (LWP 5531)]

Thread 2 (Thread 0x7f6ae14be950 (LWP 5542)):
#0  0x00007f6aec003682 in select () from /lib/libc.so.6
#1  0x00007f6aee046f05 in QProcessManager::run (this=0x2056d10) at io/qprocess_unix.cpp:300
#2  0x00007f6aedf86a69 in QThreadPrivate::start (arg=0x2056d10) at thread/qthread_unix.cpp:184
#3  0x00007f6aedd12007 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#4  0x00007f6aec009f7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f6af1164750 (LWP 5531)):
[KCrash Handler]
#5  0x00007f6aecfbea0e in QMenu::findIdForAction (this=0x21f3c20, act=0x220bef0) at widgets/qmenu.cpp:3152
#6  0x00007f6aecfbfa7c in QMenuPrivate::activateCausedStack (this=0x21f10c0, causedStack=@0x7ffff91a41d0, action=0x220bef0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:960
#7  0x00007f6aecfc603b in QMenuPrivate::activateAction (this=0x21f10c0, action=0x220bef0, action_e=36403456, self=true) at widgets/qmenu.cpp:1053
#8  0x00007f6aeeca6cf5 in KMenu::mouseReleaseEvent (this=0x22b7900, e=0x7ffff91a4d80) at /var/tmp/portage/kde-base/kdelibs-4.2.0-r3/work/kdelibs-4.2.0/kdeui/widgets/kmenu.cpp:454
#9  0x00007f6aecc2b670 in QWidget::event (this=0x22b7900, event=0x7ffff91a4d80) at kernel/qwidget.cpp:7511
#10 0x00007f6aecfc75e3 in QMenu::event (this=0x22b7900, e=0x7ffff91a4d80) at widgets/qmenu.cpp:2346
#11 0x00007f6aecbd884d in QApplicationPrivate::notify_helper (this=0x2053130, receiver=0x22b7900, e=0x7ffff91a4d80) at kernel/qapplication.cpp:4051
#12 0x00007f6aecbe1b1d in QApplication::notify (this=<value optimized out>, receiver=0x22b7900, e=0x7ffff91a4d80) at kernel/qapplication.cpp:3753
#13 0x00007f6aeebee2a1 in KApplication::notify (this=0x2046390, receiver=0x22b7900, event=0x7ffff91a4d80)
    at /var/tmp/portage/kde-base/kdelibs-4.2.0-r3/work/kdelibs-4.2.0/kdeui/kernel/kapplication.cpp:307
#14 0x00007f6aee065963 in QCoreApplication::notifyInternal (this=0x2046390, receiver=0x22b7900, event=0x7ffff91a4d80) at kernel/qcoreapplication.cpp:590
#15 0x00007f6aecbe0ca2 in QApplicationPrivate::sendMouseEvent (receiver=0x22b7900, event=0x7ffff91a4d80, alienWidget=0x0, nativeWidget=0x22b7900, buttonDown=<value optimized out>, 
    lastMouseReceiver=@0x7f6aed57afd0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:211
#16 0x00007f6aecc41bdb in QETWidget::translateMouseEvent (this=0x22b7900, event=<value optimized out>) at kernel/qapplication_x11.cpp:4348
#17 0x00007f6aecc408c5 in QApplication::x11ProcessEvent (this=0x2046390, event=0x7ffff91a5720) at kernel/qapplication_x11.cpp:3532
#18 0x00007f6aecc65d9c in x11EventSourceDispatch (s=0x20563d0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:141
#19 0x00007f6ae7019212 in IA__g_main_context_dispatch (context=0x2054310) at gmain.c:2144
#20 0x00007f6ae701c92d in g_main_context_iterate (context=0x2054310, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2778
#21 0x00007f6ae701caeb in IA__g_main_context_iteration (context=0x2054310, may_block=1) at gmain.c:2841
#22 0x00007f6aee08d49f in QEventDispatcherGlib::processEvents (this=0x204ef70, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:318
#23 0x00007f6aecc655ff in QGuiEventDispatcherGlib::processEvents (this=0x21f3c20, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:197
#24 0x00007f6aee064602 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -115713520}) at kernel/qeventloop.cpp:144
#25 0x00007f6aee064795 in QEventLoop::exec (this=0x7ffff91a5a50, flags={i = -115713440}) at kernel/qeventloop.cpp:191
#26 0x00007f6aee069356 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:872
#27 0x000000000045875b in main (argc=3, argv=0x7ffff91a6928) at /var/tmp/portage/kde-base/kalarm-4.2.0/work/kalarm-4.2.0/kalarm/main.cpp:123
Comment 1 David Jarvie 2009-02-23 19:44:19 UTC
How exactly did you close KAlarm?
What version of Qt are you using?
Comment 2 BRULE Herman 2009-02-23 20:04:45 UTC
Qt 4.5
I have never used kalarm, just open, restart kde, close kalarm.
Comment 3 David Jarvie 2009-02-23 20:30:15 UTC
But what method did you use to close KAlarm? Did you use the menu File -> Quit? or what?
Comment 4 BRULE Herman 2009-02-24 08:12:33 UTC
The cross on the with (top, and most at right).
Comment 5 Dario Andres 2009-02-24 23:53:48 UTC
Bug 185017 seems to have a similar backtrace, but in another app and situation. May be it's a Qt4.5 bug (or KDE4.2+Qt4.5 bug)
Comment 6 Nils Christian Roscher-Nielsen 2009-03-04 16:37:06 UTC
I have had a look at this through Valgrind,and it looks like kalarm is deleting the QAction (KActionCollection::~KActionCollection() ), and then later when QMenu::findIdForAction(QAction*) is called, QAction::d_func() will be invalid. 

This seems to be an implementation error in kalarm. From this reasoning, I am guessing that 185017 is not a Qt bug either.

valgrind output:

==12479== Invalid read of size 8
==12479==    at 0x8683464: QAction::d_func() (qaction.h:67)
==12479==    by 0x8BF904C: QMenu::findIdForAction(QAction*) const (qmenu.cpp:3157)
==12479==    by 0x8BFCD6B: QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) (qmenu.cpp:965)
==12479==    by 0x8C01938: QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) (qmenu.cpp:1058)
==12479==    by 0x8C0392B: QMenu::mouseReleaseEvent(QMouseEvent*) (qmenu.cpp:2252)
==12479==    by 0x793E270: KMenu::mouseReleaseEvent(QMouseEvent*) (in /usr/lib/libkdeui.so.5.2.0)
==12479==    by 0x86F7BBE: QWidget::event(QEvent*) (qwidget.cpp:7516)
==12479==    by 0x8C02C5B: QMenu::event(QEvent*) (qmenu.cpp:2351)
==12479==    by 0x8686EC6: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
==12479==    by 0x8687CBD: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3786)
==12479==    by 0x786D5DA: KApplication::notify(QObject*, QEvent*) (in /usr/lib/libkdeui.so.5.2.0)
==12479==    by 0x9BECEF6: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:602)
==12479==  Address 0x14e2a7c8 is 8 bytes inside a block of size 24 free'd
==12479==    at 0x4C24DAD: operator delete(void*) (vg_replace_malloc.c:342)
==12479==    by 0x9C009D8: QObjectPrivate::deleteChildren() (qobject.cpp:1845)
==12479==    by 0x9C09BE8: QObject::~QObject() (qobject.cpp:844)
==12479==    by 0x7797475: KActionCollection::~KActionCollection() (in /usr/lib/libkdeui.so.5.2.0)
==12479==    by 0x78EC07E: KSystemTrayIcon::~KSystemTrayIcon() (in /usr/lib/libkdeui.so.5.2.0)
==12479==    by 0x4DD139: (within /usr/bin/kalarm)
==12479==    by 0x4ABE92: (within /usr/bin/kalarm)
==12479==    by 0x4AA47A: (within /usr/bin/kalarm)
==12479==    by 0x49B2D8: (within /usr/bin/kalarm)
==12479==    by 0x49B8DE: (within /usr/bin/kalarm)
==12479==    by 0x4DC297: (within /usr/bin/kalarm)
==12479==    by 0x9C086B5: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3060)
==12479==
Comment 7 David Jarvie 2009-03-04 22:06:15 UTC
Now fixed for KDE 4.2.2 (SVN commits 935343, 935344).
Comment 8 David Jarvie 2009-03-04 22:09:03 UTC
Now fixed for KDE 4.2.2 (SVN commits 935343, 935344).