Bug 101847 - kmail crash when sending via smtp with a password from kwallet
Summary: kmail crash when sending via smtp with a password from kwallet
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.8.1
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 105413 107172 107995 110515 111005 111299 112061 112606 112785 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-18 23:20 UTC by Fehér Gábor
Modified: 2007-09-14 12:17 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
debug outputs (11.08 KB, text/plain)
2005-03-18 23:22 UTC, Fehér Gábor
Details
Patch to fix the crash (606 bytes, patch)
2005-07-28 15:46 UTC, Gustavo Pichorim Boiko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fehér Gábor 2005-03-18 23:20:33 UTC
Version:           1.8 (using KDE 3.4.0 Level "a" , SUSE 9.2 UNSUPPORTED)
Compiler:          gcc version 3.3.4 (pre 3.3.5 20040809)
OS:                Linux (i686) release 2.6.8-24.11-default

This is a crash wich I can reproduce with a sepacial usage of kwallet and kmail:
I have a smtp server which requires authentiaction, and 
I store it's password in kwallet. 
The procedure: 
1. close my wallet (in wallet manager) containing the pw. of the smtp server
2. try to send a message
3. say cancel to the wallet password dialog, and say cancel to the smpt authorization dialog
4. open the wallet in the wallet manager
5. reopen the message from the outbox folder
6. try to send the message again -> crash

I played this little game several times, I restarted kde, and it remained the same. I attach some KDE crash handler debug logs also.
Comment 1 Fehér Gábor 2005-03-18 23:22:28 UTC
Created attachment 10182 [details]
debug outputs
Comment 2 Volker Krause 2005-03-19 15:16:16 UTC
CVS commit by vkrause: 

Fix crash when wallet password prompt has been canceled (same fix is already in networkaccount.cpp).

CCBUG: 101847


  M +9 -5      kmtransport.cpp   1.48


--- kdepim/kmail/kmtransport.cpp  #1.47:1.48
@@ -230,8 +230,12 @@ void KMTransportInfo::readPassword() con
   // ### workaround for broken Wallet::keyDoesNotExist() which returns wrong
   // results for new entries without closing and reopening the wallet
-  if ( Wallet::isOpen( Wallet::NetworkWallet() ) ?
-       !kmkernel->wallet()->hasEntry( "transport-" + QString::number(mId) ) :
-       Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "transport-" + QString::number(mId) ) )
+  if ( Wallet::isOpen( Wallet::NetworkWallet() ) ) {
+    Wallet* wallet = kmkernel->wallet();
+    if ( !wallet || !wallet->hasEntry( "transport-" + QString::number(mId) ) )
     return;
+  } else {
+    if ( Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "transport-" + QString::number(mId) ) )
+      return;
+  }
 
   if ( kmkernel->wallet() )
Comment 3 Volker Krause 2005-03-19 15:25:14 UTC
CVS commit by vkrause: 

Backport r1.48: Fix crash when wallet password prompt has been canceled.

BUG: 101847


  M +9 -5      kmtransport.cpp   1.47.2.1


--- kdepim/kmail/kmtransport.cpp  #1.47:1.47.2.1
@@ -230,8 +230,12 @@ void KMTransportInfo::readPassword() con
   // ### workaround for broken Wallet::keyDoesNotExist() which returns wrong
   // results for new entries without closing and reopening the wallet
-  if ( Wallet::isOpen( Wallet::NetworkWallet() ) ?
-       !kmkernel->wallet()->hasEntry( "transport-" + QString::number(mId) ) :
-       Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "transport-" + QString::number(mId) ) )
+  if ( Wallet::isOpen( Wallet::NetworkWallet() ) ) {
+    Wallet* wallet = kmkernel->wallet();
+    if ( !wallet || !wallet->hasEntry( "transport-" + QString::number(mId) ) )
     return;
+  } else {
+    if ( Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "transport-" + QString::number(mId) ) )
+      return;
+  }
 
   if ( kmkernel->wallet() )
Comment 4 Volker Krause 2005-05-14 12:37:25 UTC
*** Bug 105413 has been marked as a duplicate of this bug. ***
Comment 5 Malte S. Stretz 2005-06-07 11:48:25 UTC
I still see this in KDE 3.4.1 (KMail 1.8.1):

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 24008)]
[KCrash handler]
#5  0xb7c1ae43 in KMMsgBase::setTransferInProgress ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#6  0xb7bde07c in KMSender::doSendMsgAux ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#7  0xb7bddeb9 in KMSender::sendProcStarted ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#8  0xb7be1d58 in KMSender::qt_invoke ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#9  0xb52616b2 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#10 0xb5261dbd in QObject::activate_signal_bool ()
   from /usr/qt/3/lib/libqt-mt.so.3
#11 0xb7be2152 in KMSendProc::started ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#12 0xb7bdf545 in KMSendProc::start ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#13 0xb7bdcf7a in KMSender::doSendMsg ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#14 0xb7bdc8b0 in KMSender::sendQueued ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#15 0xb7bdc693 in KMSender::send () from /usr/kde/3.4/lib/libkmailprivate.so
#16 0xb7b6b1ba in KMComposeWin::slotContinueDoSend ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#17 0xb7b5243f in KMComposeWin::qt_invoke ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#18 0xb52616b2 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#19 0xb5261dbd in QObject::activate_signal_bool ()
   from /usr/qt/3/lib/libqt-mt.so.3
#20 0xb7b51a92 in KMComposeWin::applyChangesDone ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#21 0xb7b603c4 in KMComposeWin::slotComposerDone ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#22 0xb7b52413 in KMComposeWin::qt_invoke ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#23 0xb52616b2 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#24 0xb5261dbd in QObject::activate_signal_bool ()
   from /usr/qt/3/lib/libqt-mt.so.3
#25 0xb7d85b41 in MessageComposer::done ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#26 0xb7d7c9bf in MessageComposer::doNextJob ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#27 0xb7d7caa1 in MessageComposer::slotDoNextJob ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#28 0xb7d85bf8 in MessageComposer::qt_invoke ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#29 0xb52616b2 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#30 0xb564092a in QSignal::signal () from /usr/qt/3/lib/libqt-mt.so.3
#31 0xb5281c0a in QSignal::activate () from /usr/qt/3/lib/libqt-mt.so.3
#32 0xb528bc31 in QSingleShotTimer::event () from /usr/qt/3/lib/libqt-mt.so.3
#33 0xb51f1dbe in QApplication::internalNotify ()
   from /usr/qt/3/lib/libqt-mt.so.3
#34 0xb51f1035 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#35 0xb5a848bb in KApplication::notify ()
   from /usr/kde/3.4/lib/libkdecore.so.4
#36 0xb51dd0b1 in QEventLoop::activateTimers ()
   from /usr/qt/3/lib/libqt-mt.so.3
#37 0xb518f699 in QEventLoop::processEvents ()
   from /usr/qt/3/lib/libqt-mt.so.3
#38 0xb52088e8 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#39 0xb5208704 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#40 0xb51f211f in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#41 0x0804abbe in ?? ()
#42 0xbffff130 in ?? ()
#43 0x00000000 in ?? ()
#44 0x00000000 in ?? ()
#45 0x00000000 in ?? ()
#46 0xb5877cc0 in vtable for QGArray () from /usr/qt/3/lib/libqt-mt.so.3
#47 0x082b40b0 in ?? ()
#48 0x0804d690 in typeinfo for QPtrCollection ()
#49 0x00000000 in ?? ()
#50 0xb7fd9d50 in vtable for KMKernel ()
   from /usr/kde/3.4/lib/libkmailprivate.so
#51 0xb4a2f63f in __libc_start_main () from /lib/libc.so.6
#52 0xb4a2f63f in __libc_start_main () from /lib/libc.so.6
#53 0x0804a821 in ?? ()
Comment 6 Thiago Macieira 2005-06-11 03:43:25 UTC
*** Bug 107172 has been marked as a duplicate of this bug. ***
Comment 7 arutha 2005-06-20 17:17:27 UTC
I don't know if this makes a difference but I don't use kwallet at all (disabled) and I can press cancel in the password dialog to make kmail crash 100% of the time, too. This is KMail 1.8.1 from KDE 3.4.1! I did not have this problem in 1.8.0!
Comment 8 andreas 2005-06-28 16:04:24 UTC
Confirmed here, kmail-1.8.1 from KDE-3.4.1. 100% reliable crash.
Comment 9 andreas 2005-06-28 16:07:32 UTC
I meant, confirmed *without* kwallet. Just press "cancel" at the smtp auth dialog box and the thing crashes.
Comment 10 Hasso Tepper 2005-07-02 05:00:32 UTC
Confirmed wit trunk. Backtrace below.

[KCrash handler]
#4  0xb4ebaa1b in KMMsgBase::setTransferInProgress (this=0x0, value=false,
    force=false) at kmmsgbase.cpp:1064
#5  0xb4e89076 in KMSender::doSendMsgAux (this=0x84ba330) at kmsender.cpp:532
#6  0xb4e88ed1 in KMSender::sendProcStarted (this=0x84ba330, success=true)
    at kmsender.cpp:515
#7  0xb4e8c5d2 in KMSender::qt_invoke (this=0x84ba330, _id=5, _o=0xbfe56750)
    at kmsender.moc:104
#8  0xb64e33dd in QObject::activate_signal (this=0x8cd3f30, clist=0x8cd3f90,
    o=0xbfe56750) at kernel/qobject.cpp:2355
#9  0xb64e3d0e in QObject::activate_signal_bool (this=0x8cd3f30, signal=3,
    param=true) at kernel/qobject.cpp:2451
#10 0xb4e8c857 in KMSendProc::started (this=0x8cd3f30, t0=true)
    at kmsender_p.moc:93
#11 0xb4e8a2b5 in KMSendProc::start (this=0x8cd3f30) at kmsender.cpp:817
#12 0xb4e88cc0 in KMSender::doSendMsg (this=0x84ba330) at kmsender.cpp:481
#13 0xb4e87690 in KMSender::doSendQueued (this=0x84ba330,
    customTransport=@0x8071448) at kmsender.cpp:227
#14 0xb4e8db6d in KMail::MessageSender::sendQueued (this=0x84ba358,
    transport=@0x8071448) at messagesender.h:77
#15 0xb4e87447 in KMSender::doSend (this=0x84ba330, aMsg=0x8d9fa30, sendNow=1)
    at kmsender.cpp:178
#16 0xb4e063c1 in KMail::MessageSender::send (this=0x84ba358, msg=0x8d9fa30,
    method=SendImmediate) at messagesender.h:65
#17 0xb4e3bdd1 in KMComposeWin::slotContinueDoSend (this=0x8a15680,
    sentOk=true) at kmcomposewin.cpp:3828
#18 0xb4e2257f in KMComposeWin::qt_invoke (this=0x8a15680, _id=167,
    _o=0xbfe56b30) at kmcomposewin.moc:481
#19 0xb64e33dd in QObject::activate_signal (this=0x8a15680, clist=0x8a19730,
    o=0xbfe56b30) at kernel/qobject.cpp:2355
#20 0xb64e3d0e in QObject::activate_signal_bool (this=0x8a15680, signal=6,
    param=true) at kernel/qobject.cpp:2451
#21 0xb4e21b74 in KMComposeWin::applyChangesDone (this=0x8a15680, t0=true)
    at kmcomposewin.moc:384
#22 0xb4e31c3e in KMComposeWin::slotComposerDone (this=0x8a15680, rc=true)
    at kmcomposewin.cpp:2096
#23 0xb4e22550 in KMComposeWin::qt_invoke (this=0x8a15680, _id=166,
    _o=0xbfe56c70) at kmcomposewin.moc:480
#24 0xb64e33dd in QObject::activate_signal (this=0x8e03de0, clist=0x8c37af0,
    o=0xbfe56c70) at kernel/qobject.cpp:2355
#25 0xb64e3d0e in QObject::activate_signal_bool (this=0x8e03de0, signal=2,
    param=true) at kernel/qobject.cpp:2451
#26 0xb4ff7158 in MessageComposer::done (this=0x8e03de0, t0=true)
    at messagecomposer.moc:89
#27 0xb4fee7d8 in MessageComposer::doNextJob (this=0x8e03de0)
    at messagecomposer.cpp:323
#28 0xb4fee99f in MessageComposer::slotDoNextJob (this=0x8e03de0)
    at messagecomposer.cpp:361
#29 0xb4ff7195 in MessageComposer::qt_invoke (this=0x8e03de0, _id=2,
    _o=0xbfe56db0) at messagecomposer.moc:95
#30 0xb64e33dd in QObject::activate_signal (this=0x821c9e8, clist=0x8bf2c80,
    o=0xbfe56db0) at kernel/qobject.cpp:2355
#31 0xb6847067 in QSignal::signal (this=0x821c9e8, t0=@0x821ca10)
    at .moc/debug-shared-mt/moc_qsignal.cpp:100
#32 0xb6500b6a in QSignal::activate (this=0x821c9e8) at kernel/qsignal.cpp:212
#33 0xb650852c in QSingleShotTimer::event (this=0x821c9c0)
    at kernel/qtimer.cpp:286
#34 0xb647ff99 in QApplication::internalNotify (this=0xbfe57310,
    receiver=0x821c9c0, e=0xbfe57070) at kernel/qapplication.cpp:2635
#35 0xb647f4d1 in QApplication::notify (this=0xbfe57310, receiver=0x821c9c0,
    e=0xbfe57070) at kernel/qapplication.cpp:2358
#36 0xb6b92f54 in KApplication::notify (this=0xbfe57310, receiver=0x821c9c0,
    event=0xbfe57070) at kapplication.cpp:549
#37 0xb780b172 in QApplication::sendEvent (receiver=0x821c9c0,
    event=0xbfe57070) at qapplication.h:491
#38 0xb646e676 in QEventLoop::activateTimers (this=0x809e3c0)
    at kernel/qeventloop_unix.cpp:556
#39 0xb642596f in QEventLoop::processEvents (this=0x809e3c0, flags=4)
    at kernel/qeventloop_x11.cpp:389
#40 0xb649462d in QEventLoop::enterLoop (this=0x809e3c0)
    at kernel/qeventloop.cpp:198
#41 0xb6494546 in QEventLoop::exec (this=0x809e3c0)
    at kernel/qeventloop.cpp:145
#42 0xb6480105 in QApplication::exec (this=0xbfe57310)
    at kernel/qapplication.cpp:2758
#43 0x0805ca85 in main (argc=1, argv=0xbfe574e4) at main.cpp:177
Comment 11 Gilles Schintgen 2005-07-10 01:07:21 UTC
I got this backtrace when I wanted to cancel sending of a message. First I canceled the pinentry-qt dialog, then kwallet and kmails smtp password dialog. Instead of letting me edit the mail, it crashed :-/

Using host libthread_db library "/lib/libthread_db.so.1".
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread -1208179024 (LWP 13188)]
[KCrash handler]
#4  KMMsgBase::setTransferInProgress (this=0x4e10f16c, value=false, 
    force=false) at kmmsgbase.cpp:1050
#5  0x4f7dbccb in KMSender::doSendMsgAux (this=0x83dba38) at kmsender.cpp:516
#6  0x4f7dbb3b in KMSender::sendProcStarted (this=0x83dba38, success=true)
    at kmsender.cpp:499
#7  0x4f7dd60b in KMSender::qt_invoke (this=0x83dba38, _id=1, _o=0x4fa21188)
    at kmsender.moc:102
#8  0x4d9826f4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#9  0x4d98283c in QObject::activate_signal_bool ()
   from /usr/qt/3/lib/libqt-mt.so.3
#10 0x4f7dd8b1 in KMSendProc::started (this=0x0, t0=200) at kmsender.moc:196
#11 0x4f7ddbb5 in KMSendProc::start (this=0x0) at kmsender.cpp:801
#12 0x4f7dfac9 in KMSender::doSendMsg (this=0xbfffe1a0) at kmsender.cpp:480
#13 0x4f7dba07 in KMSender::sendQueued (this=0x83dba38) at kmsender.cpp:229
#14 0x4f7db7cb in KMSender::send (this=0x83dba38, aMsg=0x8850638, sendNow=1)
    at kmsender.cpp:177
#15 0x4f78951f in KMComposeWin::slotContinueDoSend (this=0x87bd548, 
    sentOk=240) at kmcomposewin.cpp:3752
#16 0x4f7901c0 in KMComposeWin::qt_invoke (this=0x87bd548, _id=162, 
    _o=0x4de04f60) at kmcomposewin.moc:969
#17 0x4d9826f4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#18 0x4d98283c in QObject::activate_signal_bool ()
   from /usr/qt/3/lib/libqt-mt.so.3
#19 0x4f76f7b1 in KMComposeWin::applyChangesDone (this=0x0, t0=200)
    at kmcomposewin.moc:873
#20 0x4f789a8b in KMComposeWin::slotComposerDone (this=0xbfffe6a0, rc=true)
    at kmcomposewin.cpp:2009
#21 0x4f7901f1 in KMComposeWin::qt_invoke (this=0x87bd548, _id=-1073747916, 
    _o=0x1) at kmcomposewin.moc:968
#22 0x4d9826f4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#23 0x4d98283c in QObject::activate_signal_bool ()
   from /usr/qt/3/lib/libqt-mt.so.3
#24 0x4f9207f0 in MessageComposer::done (this=0x0, t0=72)
    at messagecomposer.moc:89
#25 0x4f9299ed in MessageComposer::doNextJob (this=0xbfffe820)
    at messagecomposer.cpp:332
#26 0x4f929a9f in MessageComposer::slotDoNextJob (this=0x897e080)
    at messagecomposer.cpp:360
#27 0x4f929b7a in MessageComposer::qt_invoke (this=0x897e080, _id=2, _o=0x0)
    at messagecomposer.moc:95
#28 0x4d9826f4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#29 0x4dcd442d in QSignal::signal () from /usr/qt/3/lib/libqt-mt.so.3
#30 0x4d99cc53 in QSignal::activate () from /usr/qt/3/lib/libqt-mt.so.3
#31 0x4d9a45e3 in QSingleShotTimer::event () from /usr/qt/3/lib/libqt-mt.so.3
#32 0x4d91fc6f in QApplication::internalNotify ()
   from /usr/qt/3/lib/libqt-mt.so.3
#33 0x4d91fe0c in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#34 0x4df936b5 in KApplication::notify (this=0xbffff130, receiver=0x8460318, 
    event=0xbfffee00) at kapplication.cpp:549
#35 0x4d91340c in QEventLoop::activateTimers ()
   from /usr/qt/3/lib/libqt-mt.so.3
#36 0x4d8cce1b in QEventLoop::processEvents ()
   from /usr/qt/3/lib/libqt-mt.so.3
#37 0x4d936250 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#38 0x4d9361a6 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#39 0x4d91ee1f in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#40 0x0804aa5e in main (argc=0, argv=0x0) at main.cpp:95
Comment 12 Gustavo Pichorim Boiko 2005-07-28 15:46:02 UTC
Created attachment 11970 [details]
Patch to fix the crash

The attached patch fixes the crash by checking the pointers of mCurrentMsg and
mOutboxFolder before trying to access them.
Comment 13 Till Adam 2005-07-29 14:26:53 UTC
SVN commit 439964 by tilladam:

Crash guards, inspired by a patch by Gustavo Pichorim Boiko. Thanks,
dude.
BUG: 101847


 M  +10 -5     kmsender.cpp  


--- branches/KDE/3.4/kdepim/kmail/kmsender.cpp #439963:439964
@@ -519,8 +519,10 @@
 	       .arg(mCurrentMsg->subject()));
   if (!mSendProc->send(mCurrentMsg))
   {
-    mCurrentMsg->setTransferInProgress( false );
-    mOutboxFolder->unGetMsg( mFailedMessages );
+    if ( mCurrentMsg )
+      mCurrentMsg->setTransferInProgress( false );
+    if ( mOutboxFolder )
+      mOutboxFolder->unGetMsg( mFailedMessages );
     mCurrentMsg = 0;
     cleanup();
     setStatusMsg(i18n("Failed to send (some) queued messages."));
@@ -596,7 +598,8 @@
     // sending of message aborted
     if ( mCurrentMsg ) {
       mCurrentMsg->setTransferInProgress( false );
-      mOutboxFolder->unGetMsg( mFailedMessages );
+      if ( mOutboxFolder )
+        mOutboxFolder->unGetMsg( mFailedMessages );
       mCurrentMsg = 0;
     }
     msg = i18n("Sending aborted:\n%1\n"
@@ -610,8 +613,10 @@
     setStatusMsg( i18n( "Sending aborted." ) );
   } else {
     if (!mSendProc->sendOk()) {
-      mCurrentMsg->setTransferInProgress( false );
-      mOutboxFolder->unGetMsg( mFailedMessages );
+      if ( mCurrentMsg )
+        mCurrentMsg->setTransferInProgress( false );
+      if ( mOutboxFolder )
+        mOutboxFolder->unGetMsg( mFailedMessages );
       mCurrentMsg = 0;
       mFailedMessages++;
       // Sending of message failed.
Comment 14 Volker Krause 2005-07-30 22:59:30 UTC
*** Bug 107995 has been marked as a duplicate of this bug. ***
Comment 15 Volker Krause 2005-08-11 10:04:01 UTC
*** Bug 110515 has been marked as a duplicate of this bug. ***
Comment 16 Volker Krause 2005-08-23 10:28:42 UTC
*** Bug 111299 has been marked as a duplicate of this bug. ***
Comment 17 Volker Krause 2005-09-05 16:58:06 UTC
*** Bug 112061 has been marked as a duplicate of this bug. ***
Comment 18 Volker Krause 2005-09-14 22:21:16 UTC
*** Bug 112606 has been marked as a duplicate of this bug. ***
Comment 19 Andreas Gungl 2005-09-19 09:20:06 UTC
*** Bug 112785 has been marked as a duplicate of this bug. ***
Comment 20 Thiago Macieira 2005-10-05 12:50:27 UTC
*** Bug 111005 has been marked as a duplicate of this bug. ***
Comment 21 Sebastian Reitenbach 2005-10-11 19:56:32 UTC
is this bug fixed? still experiencing it in kde 3.4.2 on suse 9.3 (installed suse rpms)

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 1105401568 (LWP 26537)]
[KCrash handler]
#7  KMMsgBase::setTransferInProgress (this=0x0, value=false, force=false)
    at kmmsgbase.cpp:1050
#8  0x42761b11 in KMSender::doSendMsgAux (this=0x8566058) at kmsender.cpp:522
#9  0x42761c51 in KMSender::sendProcStarted (this=0x8566058, success=true)
    at kmsender.cpp:505
#10 0x426eb832 in KMSender::qt_invoke (this=0x8566058, _id=5, _o=0xbf9bb360)
    at qucom_p.h:369
#11 0x410a820e in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#12 0x410a8363 in QObject::activate_signal_bool ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#13 0x42742f69 in KMSendProc::started (this=0x0, t0=true) at qmetaobject.h:261
#14 0x427430a6 in KMSendProc::start (this=0x0) at kmsender.cpp:807
#15 0x42914050 in KMSender::doSendMsg (this=0x8566058) at kmsender.cpp:486
#16 0x4269c677 in KMSender::sendQueued (this=0x8566058) at kmsender.cpp:229
#17 0x42923506 in KMSender::send (this=0x8566058, aMsg=0x8e08e90, sendNow=1)
    at qstring.h:848
#18 0x4293a77c in KMComposeWin::slotContinueDoSend (this=0x8dd15d8, 
    sentOk=true) at kmkernel.h:151
#19 0x42941ffa in KMComposeWin::qt_invoke (this=0x8dd15d8, _id=163, 
    _o=0xbf9bb810) at qucom_p.h:369
#20 0x410a820e in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0x410a8363 in QObject::activate_signal_bool ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0x427430e9 in KMComposeWin::applyChangesDone (this=0x0, t0=true)
    at qmetaobject.h:261
#23 0x427431b5 in KMComposeWin::slotComposerDone (this=0x8dd15d8, rc=true)
    at kmcomposewin.cpp:2009
#24 0x4294200f in KMComposeWin::qt_invoke (this=0x8dd15d8, _id=162, 
    _o=0xbf9bb990) at qucom_p.h:369
#25 0x410a820e in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0x410a8363 in QObject::activate_signal_bool ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0x427424e8 in MessageComposer::done (this=0x0, t0=true)
    at qmetaobject.h:261
#28 0x42742673 in MessageComposer::doNextJob (this=0xbf9bb9b8)
    at messagecomposer.cpp:332
#29 0x42742779 in MessageComposer::slotDoNextJob (this=0x881e250)
    at messagecomposer.cpp:360
#30 0x42742818 in MessageComposer::qt_invoke (this=0x881e250, _id=2, _o=0x0)
    at messagecomposer.moc:95
#31 0x410a820e in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#32 0x413fa122 in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3
#33 0x410c5763 in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3
#34 0x410cd1b3 in QSingleShotTimer::event ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#35 0x41045a5f in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#36 0x41047623 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#37 0x40d5b971 in KApplication::notify (this=0xbf9bc240, receiver=0x8191c70, 
    event=0xbf9bbfe0) at kapplication.cpp:551
#38 0x4103a20c in QEventLoop::activateTimers ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#39 0x40ff2ff6 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#40 0x4105d9f1 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#41 0x4105d836 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#42 0x410474ef in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#43 0x08063595 in main (argc=0, argv=0x0) at main.cpp:156
#44 0x41600e80 in __libc_start_main () from /lib/tls/libc.so.6
#45 0x080583d1 in _start () at start.S:119
Comment 22 Volker Krause 2005-10-12 10:17:16 UTC
it's fixed in KDE 3.4.3/3.5.