Bug 233783 - ktorrent crashes on exit
Summary: ktorrent crashes on exit
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 235552 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-08 23:45 UTC by Bruno Bigras
Modified: 2010-05-03 08:56 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 Bruno Bigras 2010-04-08 23:45:10 UTC
Application: ktorrent (4.0beta1)
KDE Platform Version: 4.4.71 (KDE 4.4.71 (KDE 4.5 >= 20100407)) (Compiled from sources)
Qt Version: 4.6.2
Operating System: Linux 2.6.31-21-generic x86_64
Distribution: Ubuntu 9.10

-- Information about the crash:
Everytime I quit Ktorrent, it crashes.

Still happen after I cleared my KDE config files.

The crash can be reproduced every time.

-- Backtrace:
Application: KTorrent (ktorrent), signal: Segmentation fault
The current source language is "auto; currently c".
[KCrash Handler]
#6  0x0000000000000001 in ?? ()
#7  0x00007f8a041023f6 in qDeleteAll<QList<QWidget*>::const_iterator> (begin=) at /kdeqt/4.6/include/QtCore/qalgorithms.h:322
#8  0x00007f8a041024ec in qDeleteAll<QList<QWidget*> > (c=...) at /kdeqt/4.6/include/QtCore/qalgorithms.h:330
#9  0x00007f8a041019d0 in KWidgetItemDelegatePool::fullClear (this=0x2326c90) at /home/bruno/kde4/trunk/src/KDE/kdelibs/kdeui/itemviews/kwidgetitemdelegatepool.cpp:152
#10 0x00007f8a0410030a in ~KWidgetItemDelegatePrivate (this=0x2326ba0, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/KDE/kdelibs/kdeui/itemviews/kwidgetitemdelegate.cpp:67
#11 0x00007f8a040ffa01 in ~KWidgetItemDelegate (this=0x2325190, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/KDE/kdelibs/kdeui/itemviews/kwidgetitemdelegate.cpp:174
#12 0x00007f89ec77e238 in ~ScriptDelegate (this=0x2325190, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/network/ktorrent/plugins/scripting/scriptdelegate.cpp:41
#13 0x00007f8a029f04fa in QObjectPrivate::deleteChildren (this=0x2321340) at /home/bruno/kde4/trunk/src/qt/qt/src/corelib/kernel/qobject.cpp:1986
#14 0x00007f8a01850ed6 in ~QWidget (this=0x2320e10, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/qt/qt/src/gui/kernel/qwidget.cpp:1469
#15 0x00007f8a01d3d144 in ~QFrame (this=0x2320e10, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/qt/qt/src/gui/widgets/qframe.cpp:242
#16 0x00007f8a01df4c90 in ~QAbstractScrollArea (this=0x2320e10, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/qt/qt/src/gui/widgets/qabstractscrollarea.cpp:524
#17 0x00007f8a01eb9fc4 in ~QAbstractItemView (this=0x2320e10, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/qt/qt/src/gui/itemviews/qabstractitemview.cpp:598
#18 0x00007f8a01ede2f8 in ~QListView (this=0x2320e10, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/qt/qt/src/gui/itemviews/qlistview.cpp:207
#19 0x00007f8a029f04fa in QObjectPrivate::deleteChildren (this=0x1e84770) at /home/bruno/kde4/trunk/src/qt/qt/src/corelib/kernel/qobject.cpp:1986
#20 0x00007f8a01850ed6 in ~QWidget (this=0x1e84510, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/qt/qt/src/gui/kernel/qwidget.cpp:1469
#21 0x00007f89ec779d71 in ~ScriptManager (this=0x2460260, __in_chrg=<value optimized out>) at /home/bruno/kde4/trunk/src/network/ktorrent/plugins/scripting/scriptmanager.cpp:115
#22 0x00007f89ec776401 in kt::ScriptingPlugin::unload (this=0x2050f30) at /home/bruno/kde4/trunk/src/network/ktorrent/plugins/scripting/scriptingplugin.cpp:132
#23 0x00007f8a04d40d4e in kt::PluginManager::unloadAll (this=0x1c17580) at /home/bruno/kde4/trunk/src/network/ktorrent/libktcore/plugin/pluginmanager.cpp:189
#24 0x000000000042cedc in kt::Core::onExit (this=0x1c094b0) at /home/bruno/kde4/trunk/src/network/ktorrent/ktorrent/core.cpp:894
#25 0x00000000004358fa in kt::GUI::queryExit (this=0x1c08020) at /home/bruno/kde4/trunk/src/network/ktorrent/ktorrent/gui.cpp:563
#26 0x00007f8a041d9494 in KMainWindowPrivate::_k_shuttingDown (this=<value optimized out>) at /home/bruno/kde4/trunk/src/KDE/kdelibs/kdeui/widgets/kmainwindow.cpp:1145
#27 0x00007f8a041dc1c8 in KMainWindow::qt_metacall (this=0x1c08020, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff36750cd0)
    at /home/bruno/kde4/trunk/bld/KDE/kdelibs/kdeui/kmainwindow.moc:102
#28 0x00007f8a04211685 in KXmlGuiWindow::qt_metacall (this=0x2460260, _c=913639232, _id=0, _a=0x11) at /home/bruno/kde4/trunk/bld/KDE/kdelibs/kdeui/kxmlguiwindow.moc:102
#29 0x0000000000437d60 in kt::GUI::qt_metacall (this=0x2460260, _c=913639232, _id=0, _a=0x11) at /home/bruno/kde4/trunk/bld/network/ktorrent/ktorrent/gui.moc:102
#30 0x00007f8a029dd3cf in QMetaObject::metacall (object=0x1c08020, cl=QMetaObject::InvokeMetaMethod, idx=38, argv=0x7fff36750cd0)
    at /home/bruno/kde4/trunk/src/qt/qt/src/corelib/kernel/qmetaobject.cpp:237
#31 0x00007f8a029f3841 in QMetaObject::activate (sender=0x7fff36750de0, m=0x7f8a02d53960, local_signal_index=0, argv=0x0) at /home/bruno/kde4/trunk/src/qt/qt/src/corelib/kernel/qobject.cpp:3293
#32 0x00007f8a02a5a8ff in QCoreApplication::aboutToQuit (this=0x7fff36750de0) at .moc/debug-shared/moc_qcoreapplication.cpp:131
#33 0x00007f8a029d59d7 in QCoreApplication::exec () at /home/bruno/kde4/trunk/src/qt/qt/src/corelib/kernel/qcoreapplication.cpp:986
#34 0x00007f8a017ed9b0 in QApplication::exec () at /home/bruno/kde4/trunk/src/qt/qt/src/gui/kernel/qapplication.cpp:3583
#35 0x000000000042a2a1 in main (argc=<value optimized out>, argv=<value optimized out>) at /home/bruno/kde4/trunk/src/network/ktorrent/ktorrent/main.cpp:173

Possible duplicates by query: bug 190024.

Reported using DrKonqi
Comment 1 Joris Guisson 2010-04-09 21:32:17 UTC
This is a kdelibs bug, probably a 0 pointer in KWidgetItemDelegatePool
Comment 2 Christoph Feck 2010-04-10 06:43:09 UTC
Frederik, similar crash I once reported...
Comment 3 Joris Guisson 2010-04-27 17:48:31 UTC
*** Bug 235552 has been marked as a duplicate of this bug. ***
Comment 4 Frederik Gladhorn 2010-05-03 08:56:31 UTC
SVN commit 1122087 by gladhorn:

ktorrent uses kwidgetitemdelegate in a way that broke with making it possible to delete the delegate without simultanously removing the view.
It passes the view as parent and view into KWidgetItemDelegate(QAbstractItemView *itemView, QObject *parent = 0).
When the view is deleted, the delegate will be deleted in the qobject destructor that deletes the view children. This leads to double deletion of the widgets created by kwidgetitemdelegate, since they are reparented by the view.
This patch makes ktorrent work again.

BUG: 233783


 M  +14 -0     kwidgetitemdelegatepool.cpp  
 M  +2 -0      kwidgetitemdelegatepool_p.h  


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