Version: unknown (using 4.1.60 (KDE 4.1.60 (KDE 4.2 >= 20080709)), compiled sources) Compiler: gcc-4.3 OS: Linux (i686) release 2.6.25-2-486 kdepimlibs rev. 831161 kdepim rev. 831164 Testcase : - Launch kontact, - switch to the Akregator module, - Open an article in a tab (Using the "Complete Story" link) - File / Quit The window will disappear, so will the systray icons but the Kontact process is still running. I tried to attach gdb to its pid without getting any useful information. Console output after clicking on quit : kontact(26071)/kparts KParts::MainWindow::createGUI: MainWindow::createGUI, part= QObject(0x0) "" kontact(26071)/kparts KParts::MainWindow::createGUI: deactivating GUI for Akregator::Part(0x9f75bb8) Akregator::Part "" kontact(26071)/kmail KMailPart::~KMailPart: Closing last KMMainWin: stopping mail check kontact(26071)/kparts KParts::Part::slotWidgetDestroyed: KPart::slotWidgetDestroyed(), deleting part "mViewer" kontact(26071)/khtml (part) KHTMLPart::~KHTMLPart: KHTMLPart(0x9a3e060, name = "mViewer") kontact(26071)/kparts KParts::PartManager::setActivePart: KParts::PartManager(0x9f39eb8, name = "khtml part manager") emitting activePartChanged QObject(0x0) kontact(26071)/kmail (storage internals) KMFolderMaildir::close: fclose(mIndexStream = 0x9c59ed8 ) kontact(26071)/kmail (storage internals) KMFolderMaildir::close: fclose(mIndexStream = 0x9cda570 ) kontact(26071)/kmail (storage internals) KMFolderMaildir::close: fclose(mIndexStream = 0x9c75460 ) kontact(26071)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: KCoreConfigSkeleton::writeConfig() kontact(26071)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::readConfig: KCoreConfigSkeleton::readConfig() kontact(26071)/kmail KMKernel::~KMKernel: kontact(26071)/kutils (KSettings::Dispatcher) KSettings::Dispatcher::DispatcherPrivate::unregisterComponent: componentName= "kmail" refcount= 0 kontact(26071)/kparts KParts::Part::~Part: deleting widget QWidget(0x9cfd698) "" kontact(26071)/kmail KMail::Vacation::~Vacation: ~Vacation() kontact(26071) Akregator::Part::~Part: Part::~Part() enter kontact(26071)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: KCoreConfigSkeleton::writeConfig() kontact(26071)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::readConfig: KCoreConfigSkeleton::readConfig() kontact(26071) Akregator::SubscriptionListModel::aboutToRemoveSubscription: 1256218933 kontact(26071) Akregator::SubscriptionListModel::aboutToRemoveSubscription: 1256218933 kontact(26071) Akregator::SubscriptionListModel::subscriptionRemoved: [cut] kontact(26071) Akregator::SubscriptionListView::saveHeaderSettings: 0 kontact(26071) Akregator::SubscriptionListView::saveHeaderSettings: 1 kontact(26071) Akregator::SubscriptionListView::saveHeaderSettings: 2 kontact(26071)/kparts KParts::Part::slotWidgetDestroyed: KPart::slotWidgetDestroyed(), deleting part "" kontact(26071)/khtml (part) KHTMLPart::~KHTMLPart: KHTMLPart(0x9fd19e8) kontact(26071)/kparts KParts::PartManager::setActivePart: KParts::PartManager(0x9fd3360, name = "khtml part manager") emitting activePartChanged QObject(0x0) kontact(26071)/kdecore (KAcceleratorManager) QWidgetStackAccelManager::currentChanged: invalid index provided kontact(26071)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: KCoreConfigSkeleton::writeConfig() kontact(26071)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::readConfig: KCoreConfigSkeleton::readConfig() kontact(26071) Akregator::Part::~Part: Part::~Part(): leaving kontact(26071)/kparts KParts::PartManager::setActivePart: KParts::PartManager(0x996d490) emitting activePartChanged QObject(0x0) kontact(26071)/kparts KParts::MainWindow::createGUI: MainWindow::createGUI, part= QObject(0x0) "" kontact(26071)/kparts KParts::Part::~Part: deleting widget Akregator::MainWidget(0x9f897c8, name = "akregator_view") "akregator_view" kontact(26071)/khtml (part) KHTMLPart::~KHTMLPart: KHTMLPart(0x9fd4150, name = "KHTML") kontact(26071)/kparts KParts::PartManager::setActivePart: KParts::PartManager(0xa78dd98, name = "khtml part manager") emitting activePartChanged QObject(0x0) kontact(26071)/khtml (part) KHTMLPart::~KHTMLPart: KHTMLPart(0xa693c40, name = "navbar-iframe") kontact(26071)/kparts KParts::PartManager::setActivePart: KParts::PartManager(0xa8a1388, name = "khtml part manager") emitting activePartChanged QObject(0x0) kontact(26071)/kparts KParts::Part::~Part: deleting widget KHTMLView(0xa8a0e58) "" kontact(26071)/kparts KParts::Part::~Part: deleting widget KHTMLView(0xa773bc8) "" kontact(26071) Akregator::OnlineSyncPlugin::~OnlineSyncPlugin: kontact(26071)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: KCoreConfigSkeleton::writeConfig() kontact(26071)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::readConfig: KCoreConfigSkeleton::readConfig() kontact(26071)/kparts KParts::Part::slotWidgetDestroyed: KPart::slotWidgetDestroyed(), deleting part "" kontact(26071)/khtml (part) KHTMLPart::~KHTMLPart: KHTMLPart(0x988c8c8) kontact(26071)/kparts KParts::PartManager::setActivePart: KParts::PartManager(0x988bf18, name = "khtml part manager") emitting activePartChanged QObject(0x0) kontact(26071)/kutils (KSettings::Dispatcher) KSettings::Dispatcher::DispatcherPrivate::unregisterComponent: componentName= "kontact" refcount=0
so far I am unable to reproduce this on my Fedora 9 system with trunk.
after many attempts, here's the bt if I attach gdb to the remaining process : 0xb7fdc430 in __kernel_vsyscall () (gdb) bt #0 0xb7fdc430 in __kernel_vsyscall () #1 0xb55f4b27 in poll () from /lib/i686/cmov/libc.so.6 #2 0xb53b97a2 in g_main_context_iterate (context=0x8bf1260, block=1, dispatch=1, self=0x8bee058) at /tmp/buildd/glib2.0-2.16.4/glib/gmain.c:2954 #3 0xb53b9ad1 in IA__g_main_context_iteration (context=0x8bf1260, may_block=1) at /tmp/buildd/glib2.0-2.16.4/glib/gmain.c:2708 #4 0xb6b7aed6 in QEventDispatcherGlib::processEvents (this=0x8bea2b8, flags={i = -1073776824}) at kernel/qeventdispatcher_glib.cpp:325 #5 0xb5a57118 in QGuiEventDispatcherGlib::processEvents (this=0x8bea2b8, flags={i = -1073776776}) at kernel/qguieventdispatcher_glib.cpp:204 #6 0xb6b4a2ac in QEventLoop::processEvents (this=0xbfff77f0, flags={i = -1073776716}) at kernel/qeventloop.cpp:149 #7 0xb6b4a4e9 in QEventLoop::exec (this=0xbfff77f0, flags={i = -1073776648}) at kernel/qeventloop.cpp:196 #8 0xb6b4da87 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845 #9 0xb59b2fa2 in QApplication::exec () at kernel/qapplication.cpp:3304 #10 0x0804b72d in main (argc=1, argv=0xbfff7a14) at /media/kde/src/KDE/kdepim/kontact/src/main.cpp:218
If I kill kontact at this point I get this btw : *** KMail got signal 15 (Exiting) kontact: /media/kde/src/KDE/kdepim/kmail/kmkernel.cpp:2096: static KMKernel* KMKernel::self(): assert « mySelf » failed. *** KMail got signal 6 (Crashing) kontact: /media/kde/src/KDE/kdepim/kmail/kmkernel.cpp:2096: static KMKernel* KMKernel::self(): assert « mySelf » failed.
Reverting Thomas' commit (830027) seems to solve my problem. I don't see the ghost process anymore after that.
After some more testing, reverting kdepim/kontact/src/main.cpp to 830026 is enough.
SVN commit 831845 by tmcguire: Also quit the event loop when a part still holds a reference to a KGlobal object, probably by a KJob which wasn't properly deleted. This fixes that the Kontact process was still running (without a window) after viewing an article in Akregator. The real fix would be to fix Akregator, it should take care of properly cleaning up each KJob. @David: maybe KJob::allowQuitWhileJobsAreRunning(bool) wasn't such a bad idea after all? CCBUG: 163479 BUG: 166367 M +6 -0 mainwindow.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=831845
SVN commit 831851 by tmcguire: Backport r831845 by tmcguire to the 4.1 branch: Also quit the event loop when a part still holds a reference to a KGlobal object, probably by a KJob which wasn't properly deleted. This fixes that the Kontact process was still running (without a window) after viewing an article in Akregator. The real fix would be to fix Akregator, it should take care of properly cleaning up each KJob. @David: maybe KJob::allowQuitWhileJobsAreRunning(bool) wasn't such a bad idea after all? CCCCBUG: 163479 CCBUG: 166367 M +6 -0 mainwindow.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=831851