Bug 129007

Summary: Crash while running in background
Product: [Unmaintained] kmail Reporter: David Jarvie <djarvie>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description David Jarvie 2006-06-12 00:16:33 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Compiled From Sources
Compiler:          gcc 4.0.4 
OS:                Linux

KMail crashed while running in the background. It could perhaps have been doing its 10-minutely check of a POP account, but who knows?

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
...
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1250474304 (LWP 8399)]
[New Thread -1279587408 (LWP 8407)]
[New Thread -1271194704 (LWP 8406)]
[New Thread -1262802000 (LWP 8405)]
[New Thread -1254409296 (LWP 8404)]
(no debugging symbols found)
...
(no debugging symbols found)
[KCrash handler]
#6  0xb72a1cad in KPIM::ProgressItem::setComplete ()
   from /opt/kde3.5/lib/libkdepim.so.1
#7  0xb7cfa7c4 in KMail::PopAccount::slotJobFinished ()
   from /opt/kde3.5/lib/libkmailprivate.so
#8  0xb7cfdda8 in KMail::PopAccount::slotResult ()
   from /opt/kde3.5/lib/libkmailprivate.so
#9  0xb7d00037 in KMail::PopAccount::qt_invoke ()
   from /opt/kde3.5/lib/libkmailprivate.so
#10 0xb5fc87a9 in QObject::activate_signal ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#11 0xb6b835ea in KIO::Job::result () from /opt/kde3.5/lib/libkio.so.4
#12 0xb6be27fc in KIO::Job::emitResult () from /opt/kde3.5/lib/libkio.so.4
#13 0xb6be295e in KIO::SimpleJob::slotFinished ()
   from /opt/kde3.5/lib/libkio.so.4
#14 0xb6be307d in KIO::TransferJob::slotFinished ()
   from /opt/kde3.5/lib/libkio.so.4
#15 0xb6be4ca8 in KIO::TransferJob::qt_invoke ()
   from /opt/kde3.5/lib/libkio.so.4
#16 0xb5fc87a9 in QObject::activate_signal ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#17 0xb5fc8c44 in QObject::activate_signal ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#18 0xb6b7e5bc in KIO::SlaveInterface::finished ()
   from /opt/kde3.5/lib/libkio.so.4
#19 0xb6bf5e9f in KIO::SlaveInterface::dispatch ()
   from /opt/kde3.5/lib/libkio.so.4
#20 0xb6bc8a7e in KIO::SlaveInterface::dispatch ()
   from /opt/kde3.5/lib/libkio.so.4
#21 0xb6bbd6ab in KIO::Slave::gotInput () from /opt/kde3.5/lib/libkio.so.4
#22 0xb6bc1b59 in KIO::Slave::qt_invoke () from /opt/kde3.5/lib/libkio.so.4
#23 0xb5fc87a9 in QObject::activate_signal ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#24 0xb5fc8d91 in QObject::activate_signal ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#25 0xb62f9810 in QSocketNotifier::activated ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#26 0xb5fe705f in QSocketNotifier::event ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#27 0xb5f6b06a in QApplication::internalNotify ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#28 0xb5f6b9ff in QApplication::notify () from /opt/qt-3.3.4/lib/libqt-mt.so.3
#29 0xb6684a42 in KApplication::notify () from /opt/kde3.5/lib/libkdecore.so.4
#30 0xb5f5ef0d in QEventLoop::activateSocketNotifiers ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#31 0xb5f1b262 in QEventLoop::processEvents ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#32 0xb5f814ed in QEventLoop::enterLoop ()
   from /opt/qt-3.3.4/lib/libqt-mt.so.3
#33 0xb5f813f6 in QEventLoop::exec () from /opt/qt-3.3.4/lib/libqt-mt.so.3
#34 0xb5f6aa7f in QApplication::exec () from /opt/qt-3.3.4/lib/libqt-mt.so.3
#35 0x0804a742 in ?? ()
#36 0xbfb49398 in ?? ()
#37 0xbfb49584 in ?? ()
#38 0x00000000 in ?? ()
Comment 1 Andreas Kling 2006-09-17 19:50:49 UTC
SVN commit 585670 by kling:

Use a QGuardedPtr for the KPIM::ProgressItem in KMAccount.
Fixes a bazillion crashes when dereferencing deleted items.

BUG: 105701
BUG: 114953
BUG: 114197
BUG: 117475
BUG: 118083
BUG: 128131
BUG: 129007
BUG: 133023
BUG: 133745


 M  +1 -1      kmaccount.h  


--- branches/KDE/3.5/kdepim/kmail/kmaccount.h #585669:585670
@@ -309,7 +309,7 @@
   QValueList<KMMessage*> mReceipts;
   QPtrList<FolderJob>  mJobList;
   bool mHasInbox : 1;
-  ProgressItem *mMailCheckProgressItem;
+  QGuardedPtr<ProgressItem> mMailCheckProgressItem;
 
 private:
     /**