Bug 286308

Summary: kded4 crashes on exit
Product: [Plasma] khotkeys Reporter: Hussam Al-Tayeb <ht990332>
Component: generalAssignee: Michael Jansen <kde>
Status: RESOLVED FIXED    
Severity: crash CC: adaptee, cfeck, ht990332, l.lunak, majewsky, shubhadeepc
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.0
Attachments: Proposed patch

Description Hussam Al-Tayeb 2011-11-10 23:37:23 UTC
Application: kded4 ($Id$)
KDE Platform Version: 4.7.3 (4.7.3) (Compiled from sources)
Qt Version: 4.8.0
Operating System: Linux 3.1.0-4-ARCH i686
Distribution (Platform): Archlinux Packages

-- Information about the crash:
kded4 crashes it I type killall kded4 in a terminal window. This happens almost everytime.

-- Backtrace:
Application: KDE Daemon (kded4), signal: Segmentation fault
[Current thread is 1 (Thread 0xb548e710 (LWP 12860))]

Thread 4 (Thread 0xad58eb70 (LWP 12863)):
#0  0xb7874424 in __kernel_vsyscall ()
#1  0xb77831ae in poll () from /lib/libc.so.6
#2  0xb599609b in g_poll () from /usr/lib/libglib-2.0.so.0
#3  0xb59875e6 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb598797a in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0xb6082b37 in QEventDispatcherGlib::processEvents (this=0x88e2a40, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0xb604a85d in QEventLoop::processEvents (this=0xad58e1e0, flags=...) at kernel/qeventloop.cpp:149
#7  0xb604aaf9 in QEventLoop::exec (this=0xad58e1e0, flags=...) at kernel/qeventloop.cpp:204
#8  0xb5f26c6d in QThread::exec (this=0x88e1338) at thread/qthread.cpp:501
#9  0xb6025663 in QInotifyFileSystemWatcherEngine::run (this=0x88e1338) at io/qfilesystemwatcher_inotify.cpp:248
#10 0xb5f29fba in QThreadPrivate::start (arg=0x88e1338) at thread/qthread_unix.cpp:298
#11 0xaf6f170c in ?? () from /usr/lib/libGL.so.1
#12 0x00000000 in ?? ()

Thread 3 (Thread 0xac90eb70 (LWP 12864)):
#0  0xb7874424 in __kernel_vsyscall ()
#1  0xb7786aa1 in select () from /lib/libc.so.6
#2  0xb60237f4 in QProcessManager::run (this=0xb61b89f8) at io/qprocess_unix.cpp:244
#3  0xb5f29fba in QThreadPrivate::start (arg=0xb61b89f8) at thread/qthread_unix.cpp:298
#4  0xaf6f170c in ?? () from /usr/lib/libGL.so.1
#5  0x00000000 in ?? ()

Thread 2 (Thread 0xabf58b70 (LWP 12867)):
#0  0xb7874424 in __kernel_vsyscall ()
#1  0xb77831ae in poll () from /lib/libc.so.6
#2  0xb599609b in g_poll () from /usr/lib/libglib-2.0.so.0
#3  0xb59875e6 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb5987ceb in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#5  0xac030cba in ?? () from /usr/lib/libgio-2.0.so.0
#6  0xb59ae2d4 in ?? () from /usr/lib/libglib-2.0.so.0
#7  0xaf6f170c in ?? () from /usr/lib/libGL.so.1
#8  0x00000000 in ?? ()

Thread 1 (Thread 0xb548e710 (LWP 12860)):
[KCrash Handler]
#7  0x00000000 in ?? ()
#8  0xacbd1196 in qDeleteAll<QList<KHotKeys::ActionDataBase*>::const_iterator> (begin=..., end=...) at /usr/include/QtCore/qalgorithms.h:322
#9  0xacbd15b5 in qDeleteAll<QList<KHotKeys::ActionDataBase*> > (c=...) at /usr/include/QtCore/qalgorithms.h:330
#10 0xacbd0ff4 in KHotKeys::ActionDataGroup::~ActionDataGroup (this=0x8960c98, __in_chrg=<optimized out>) at /home/hussam/packages/kdebase-workspace/src/kde-workspace/khotkeys/libkhotkeysprivate/action_data/action_data_group.cpp:37
#11 0xacbd1042 in KHotKeys::ActionDataGroup::~ActionDataGroup (this=0x8960c98, __in_chrg=<optimized out>) at /home/hussam/packages/kdebase-workspace/src/kde-workspace/khotkeys/libkhotkeysprivate/action_data/action_data_group.cpp:39
#12 0xacbd1196 in qDeleteAll<QList<KHotKeys::ActionDataBase*>::const_iterator> (begin=..., end=...) at /usr/include/QtCore/qalgorithms.h:322
#13 0xacbd15b5 in qDeleteAll<QList<KHotKeys::ActionDataBase*> > (c=...) at /usr/include/QtCore/qalgorithms.h:330
#14 0xacbd0ff4 in KHotKeys::ActionDataGroup::~ActionDataGroup (this=0x895ee80, __in_chrg=<optimized out>) at /home/hussam/packages/kdebase-workspace/src/kde-workspace/khotkeys/libkhotkeysprivate/action_data/action_data_group.cpp:37
#15 0xacbd1042 in KHotKeys::ActionDataGroup::~ActionDataGroup (this=0x895ee80, __in_chrg=<optimized out>) at /home/hussam/packages/kdebase-workspace/src/kde-workspace/khotkeys/libkhotkeysprivate/action_data/action_data_group.cpp:39
#16 0xacbd1196 in qDeleteAll<QList<KHotKeys::ActionDataBase*>::const_iterator> (begin=..., end=...) at /usr/include/QtCore/qalgorithms.h:322
#17 0xacbd15b5 in qDeleteAll<QList<KHotKeys::ActionDataBase*> > (c=...) at /usr/include/QtCore/qalgorithms.h:330
#18 0xacbd0ff4 in KHotKeys::ActionDataGroup::~ActionDataGroup (this=0x88d9a88, __in_chrg=<optimized out>) at /home/hussam/packages/kdebase-workspace/src/kde-workspace/khotkeys/libkhotkeysprivate/action_data/action_data_group.cpp:37
#19 0xacbd1042 in KHotKeys::ActionDataGroup::~ActionDataGroup (this=0x88d9a88, __in_chrg=<optimized out>) at /home/hussam/packages/kdebase-workspace/src/kde-workspace/khotkeys/libkhotkeysprivate/action_data/action_data_group.cpp:39
#20 0xacbe1fc8 in KHotKeys::Settings::~Settings (this=0x88df7d0, __in_chrg=<optimized out>) at /home/hussam/packages/kdebase-workspace/src/kde-workspace/khotkeys/libkhotkeysprivate/settings.cpp:49
#21 0xb2527724 in KHotKeysModule::~KHotKeysModule (this=0x88df7c0, __in_chrg=<optimized out>) at /home/hussam/packages/kdebase-workspace/src/kde-workspace/khotkeys/app/kded.cpp:84
#22 0xb2527762 in KHotKeysModule::~KHotKeysModule (this=0x88df7c0, __in_chrg=<optimized out>) at /home/hussam/packages/kdebase-workspace/src/kde-workspace/khotkeys/app/kded.cpp:88
#23 0xb783e3b2 in Kded::~Kded (this=0x86d0c80, __in_chrg=<optimized out>) at /home/hussam/packages/kdelibs/src/kdelibs/kded/kded.cpp:170
#24 0xb783e452 in Kded::~Kded (this=0x86d0c80, __in_chrg=<optimized out>) at /home/hussam/packages/kdelibs/src/kdelibs/kded/kded.cpp:172
#25 0xb783e027 in kdemain (argc=1, argv=0xbfe94144) at /home/hussam/packages/kdelibs/src/kdelibs/kded/kded.cpp:926
#26 0x0804850b in main (argc=1, argv=0xbfe94144) at /home/hussam/packages/kdelibs/src/build/kded/kded4_dummy.cpp:3

Reported using DrKonqi
Comment 1 Christoph Feck 2011-11-11 12:10:50 UTC
Created attachment 65522 [details]
Proposed patch
Comment 2 Christoph Feck 2011-11-11 12:12:10 UTC
Please test/review attached patch.
Comment 3 Hussam Al-Tayeb 2011-11-11 13:00:06 UTC
crash stopped with this patch. thank you very much :)
Comment 4 Hussam Al-Tayeb 2011-11-23 22:47:29 UTC
will this patch make it into upstream git sources? it fixes the crash for me.
Comment 5 Lubos Lunak 2011-12-02 12:59:58 UTC
The patch is a no-op as far as I can say, so I don't see how it can actually fix anything. The problem seems to be elsewhere.
Comment 6 Jekyll Wu 2011-12-02 13:29:09 UTC
This looks like another problem due to the qDeleteAll in Qt 4.8 . See comment #9 in bug 284889 .
Comment 7 Lubos Lunak 2011-12-02 13:35:55 UTC
There's no comment #9 in that bugreport, but I've been told elsewhere meanwhile, so fair enough.
Can somebody please commit the patch then?
Comment 8 Christoph Feck 2011-12-05 01:13:12 UTC
*** Bug 288191 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2011-12-05 18:32:15 UTC
Git commit 6ce80cc2c84d951596911d649060fb36d4feb427 by Christoph Feck.
Committed on 05/12/2011 at 19:28.
Pushed by cfeck into branch 'master'.

Fix crash with Qt 4.8 qDeleteAll()

For more information, read bug 284989
BUG: 286308
FIXED-IN: 4.8.0

M  +4    -2    khotkeys/libkhotkeysprivate/action_data/action_data_group.cpp

http://commits.kde.org/kde-workspace/6ce80cc2c84d951596911d649060fb36d4feb427
Comment 10 Christoph Feck 2011-12-21 23:47:38 UTC
*** Bug 289547 has been marked as a duplicate of this bug. ***
Comment 11 Christoph Feck 2011-12-21 23:48:24 UTC
*** Bug 289542 has been marked as a duplicate of this bug. ***