Version: (using KDE KDE 3.4.0) Installed from: SuSE RPMs OS: Linux to reproduce: - new message - select two recipients from addressbook on two different lines - go to third line, press backspace and keep it pressed - second recipient/line is cancelled, first recipient/line is cancelled - kontact crashes with this backtrace Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread 1105411648 (LWP 7060)] [KCrash handler] #7 0x42570a39 in RecipientLine::activate () from /opt/kde3/lib/libkmailprivate.so #8 0x42762e7a in RecipientsView::slotDeleteLine () from /opt/kde3/lib/libkmailprivate.so #9 0x4276301a in RecipientsView::qt_invoke () from /opt/kde3/lib/libkmailprivate.so #10 0x4154b31e in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #11 0x4189d132 in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #12 0x41568873 in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3 #13 0x415702c3 in QSingleShotTimer::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #14 0x414e8baf in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #15 0x414ea773 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #16 0x41173631 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4 #17 0x414dd35c in QEventLoop::activateTimers () from /usr/lib/qt3/lib/libqt-mt.so.3 #18 0x41496156 in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #19 0x41500b41 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #20 0x41500986 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #21 0x414ea63f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #22 0x08063ca5 in main () ciao Stefano
it seems you can trick the widget into deleting two widget before the timer is fired, which will then try to call activate() on a 0 widget. (recpientseditor.cpp, around line 482). I have a hard time to reproduce it though. Cornelius, any idea for a sane workaround?
SVN commit 449530 by tokoe: Prevent crashes when the lineedit is deleted before the slot is called. BUG:103439 M +3 -0 recipientseditor.cpp M +2 -1 recipientseditor.h --- branches/KDE/3.5/kdepim/kmail/recipientseditor.cpp #449529:449530 @@ -477,6 +477,9 @@ void RecipientsView::slotDeleteLine() { + if ( !mCurDelLine ) + return; + RecipientLine *line = mCurDelLine; int pos = mLines.find( line ); --- branches/KDE/3.5/kdepim/kmail/recipientseditor.h #449529:449530 @@ -26,6 +26,7 @@ #include <qwidget.h> #include <qscrollview.h> +#include <qguardedptr.h> #include <qlineedit.h> #include <qtooltip.h> @@ -232,7 +233,7 @@ private: QPtrList<RecipientLine> mLines; - RecipientLine* mCurDelLine; + QGuardedPtr<RecipientLine> mCurDelLine; int mLineHeight; int mFirstColumnWidth; bool mModified;