Bug 133745

Summary: Kontact crashed when left running overnight
Product: [Applications] kontact Reporter: Andrey Brozhko <andrey>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrey Brozhko 2006-09-08 08:47:59 UTC
Version:           unknown (using KDE 3.5.3-4.1, Fedora Core release 5 (Bordeaux))
Compiler:          Target: x86_64-redhat-linux
OS:                Linux (x86_64) release 2.6.17-1.2157_FC5

I left kontact (in kmail) running overnight and when came in the morning there was this crash report. I am sorry I don't know how to reproduce it. It's been left running overnight before with no crashes (however after a while mail will stop being be collected from my POP server - see kmail bug 131013). Here is the crash backtrace:


(no debugging symbols found)
Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 46912496342464 (LWP 22611)]
[New Thread 1115699520 (LWP 22615)]
[New Thread 1105209664 (LWP 22614)]
[New Thread 1094719808 (LWP 22613)]
[New Thread 1084229952 (LWP 22612)]
[KCrash handler]
#5  0x0000003e2255fac7 in QObject::receivers ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#6  0x00000031b76ce973 in KPIM::ProgressItem::progressItemStatus (this=)
    at progressmanager.moc:177
#7  0x00000031b76ff674 in KPIM::BroadcastStatus::setStatusMsgTransmissionCompleted (this=) at broadcaststatus.cpp:147
#8  0x00000036c2e6e67b in KMail::PopAccount::slotJobFinished (this=)
    at popaccount.cpp:784
#9  0x00000036c2e6eaf9 in KMail::PopAccount::slotResult (this=)
    at popaccount.cpp:984
#10 0x00000036c2e6ecd5 in KMail::PopAccount::qt_invoke (this=)
    at popaccount.moc:120
#11 0x0000003e2255e499 in QObject::activate_signal ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#12 0x0000003e21595a82 in KIO::Job::result (this=) at jobclasses.moc:162
#13 0x0000003e215d7c21 in KIO::Job::emitResult (this=) at job.cpp:226
#14 0x0000003e215d8088 in KIO::SimpleJob::slotFinished (this=) at job.cpp:574
#15 0x0000003e215d86ba in KIO::TransferJob::slotFinished (this=)
    at job.cpp:944
#16 0x0000003e215d7808 in KIO::TransferJob::qt_invoke (this=)
    at jobclasses.moc:1071
#17 0x0000003e2255e499 in QObject::activate_signal ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#18 0x0000003e2255f240 in QObject::activate_signal ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#19 0x0000003e215d6b95 in KIO::SlaveInterface::dispatch (this=)
    at slaveinterface.cpp:243
#20 0x0000003e215f2a9e in KIO::SlaveInterface::dispatch (this=)
    at slaveinterface.cpp:173
#21 0x0000003e215a1f3b in KIO::Slave::gotInput (this=) at slave.cpp:300
#22 0x0000003e215ce478 in KIO::Slave::qt_invoke (this=) at slave.moc:113
#23 0x0000003e2255e499 in QObject::activate_signal ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#24 0x0000003e2255f0e8 in QObject::activate_signal ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#25 0x0000003e2257b8ab in QSocketNotifier::event ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#26 0x0000003e224fd925 in QApplication::internalNotify ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#27 0x0000003e224fede4 in QApplication::notify ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#28 0x0000003e20fde348 in KApplication::notify (this=) at kapplication.cpp:550
#29 0x0000003e224f26fb in QEventLoop::activateSocketNotifiers ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#30 0x0000003e224abf2e in QEventLoop::processEvents ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#31 0x0000003e22515117 in QEventLoop::enterLoop ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#32 0x0000003e22514ff2 in QEventLoop::exec ()
   from /usr/lib64/qt-3.3/lib/libqt-mt.so.3
#33 0x00000000004173ba in main ()
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:
     /**