Version: 1.9.6 (using KDE KDE 3.5.6) Installed from: Gentoo Packages Compiler: gcc-Version 4.1.1 (Gentoo 4.1.1-r3) CFLAGS="-ggdb -O2 -march=nocona -msse3 -pipe -fomit-frame-pointer -fvar-tracking" OS: Linux Reproducable: Create a new mail Activate GnuPG signature Keep GnuPG encryption deactivated Send mail Cancel the dialog asking: "Valid trusted encryption keys were found for all recipients. Encrypt this message?" Settings: -> Security -> Composing -> All checkboxes are active -> Warnings -> All checkboxes are active Versions: KDE/KMail (see above) gnupg-1.9.21 Backtrace: Using host libthread_db library "/lib/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -1250888016 (LWP 20232)] [New Thread -1279775856 (LWP 20236)] [New Thread -1271383152 (LWP 20235)] [New Thread -1262990448 (LWP 20234)] [New Thread -1254597744 (LWP 20233)] [KCrash handler] #9 0xb7e566f9 in MessageComposer::emitDone (this=0x84bd0b8, b=false) at messagecomposer.cpp:364 #10 0xb7e5681e in MessageComposer::doNextJob (this=0x84bd0b8) at messagecomposer.cpp:352 #11 0xb7e56864 in MessageComposer::slotDoNextJob (this=0x84bd0b8) at messagecomposer.cpp:389 #12 0xb7e5691d in MessageComposer::qt_invoke (this=0x84bd0b8, _id=2, _o=0xbf815e44) at messagecomposer.moc:95 #13 0xb5fce29e in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #14 0xb62e07f7 in QSignal::signal () from /usr/qt/3/lib/libqt-mt.so.3 #15 0xb5fe8459 in QSignal::activate () from /usr/qt/3/lib/libqt-mt.so.3 #16 0xb5feefc9 in QSingleShotTimer::event () from /usr/qt/3/lib/libqt-mt.so.3 #17 0xb5f72fe5 in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3 #18 0xb5f73b42 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3 #19 0xb6601938 in KApplication::notify (this=0xbf8162f0, receiver=0x82acd88, event=0xbf8160f4) at kapplication.cpp:550 #20 0xb5f68d5a in QEventLoop::activateTimers () from /usr/qt/3/lib/libqt-mt.so.3 #21 0xb5f25cf4 in QEventLoop::processEvents () from /usr/qt/3/lib/libqt-mt.so.3 #22 0xb5f889ad in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3 #23 0xb5f88852 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3 #24 0xb5f72b0b in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3 #25 0x0804a47a in main (argc=139428056, argv=0x819f400) at main.cpp:110 #26 0xb572a824 in __libc_start_main () from /lib/libc.so.6 #27 0x0804a201 in _start () Thank you!
*** Bug 148706 has been marked as a duplicate of this bug. ***
I can confirm this, with kmail 1.9.7, also on gentoo (gcc 4.1.2). Steps to reproduce: * Try to send an email with encryption, click on "Send email" * in the key approval dialog, click "Cancel" * click on "Send email" again * in the key approval dialog, click "Cancel" Actual result: Kmail crashes. Expected result: Kmail does not crash. This could also be reproduced by people in #kontact on irc.freenode.net
SVN commit 700035 by wstephens: When sending an encrypted message, with an empty body, and the encryption key selection or encryption prefs selection dialogs were cancelled, mNewBodyPart was deleted without ever having been initialised. Also init some other vars ASAP. I've looked for cases of things being used uninitialised and this should be safe. BUG:144303 M +18 -1 messagecomposer.cpp --- branches/kdepim/enterprise/kdepim/kmail/messagecomposer.cpp #700034:700035 @@ -287,7 +287,24 @@ MessageComposer::MessageComposer( KMComposeWin* win, const char* name ) : QObject( win, name ), mComposeWin( win ), mCurrentJob( 0 ), - mKeyResolver( 0 ), mIdentityUid( 0 ), mPerformingSignOperation( false ) + mReferenceMessage( 0 ), mKeyResolver( 0 ), + mUseOpportunisticEncryption( false ), + mSignBody( false ), mEncryptBody( false ), + mSigningRequested( false ), mEncryptionRequested( false ), + mDoSign( false ), mDoEncrypt( false ), + mAllowedCryptoMessageFormats( 0 ), + mDisableCrypto( false ), + mDisableBreaking( false ), + mDebugComposerCrypto( false ), + mAutoCharset( true ), + mIsRichText( false ), + mIdentityUid( 0 ), mRc( true ), + mHoldJobs( false ), + mNewBodyPart( 0 ), + mEarlyAddAttachments( false ), mAllAttachmentsAreInBody( false ), + mPreviousBoundaryLevel( 0 ), + mEncryptWithChiasmus( false ), + mPerformingSignOperation( false ) { }
SVN commit 700038 by wstephens: Backport r700035 to 3.5 branch. (fix #144303 - Kmail/Kontact crashes when cancelling GnuPG singing a new (empty) message. CCBUG:144303 M +18 -1 messagecomposer.cpp --- branches/KDE/3.5/kdepim/kmail/messagecomposer.cpp #700037:700038 @@ -287,7 +287,24 @@ MessageComposer::MessageComposer( KMComposeWin* win, const char* name ) : QObject( win, name ), mComposeWin( win ), mCurrentJob( 0 ), - mKeyResolver( 0 ), mIdentityUid( 0 ), mPerformingSignOperation( false ) + mReferenceMessage( 0 ), mKeyResolver( 0 ), + mUseOpportunisticEncryption( false ), + mSignBody( false ), mEncryptBody( false ), + mSigningRequested( false ), mEncryptionRequested( false ), + mDoSign( false ), mDoEncrypt( false ), + mAllowedCryptoMessageFormats( 0 ), + mDisableCrypto( false ), + mDisableBreaking( false ), + mDebugComposerCrypto( false ), + mAutoCharset( true ), + mIsRichText( false ), + mIdentityUid( 0 ), mRc( true ), + mHoldJobs( false ), + mNewBodyPart( 0 ), + mEarlyAddAttachments( false ), mAllAttachmentsAreInBody( false ), + mPreviousBoundaryLevel( 0 ), + mEncryptWithChiasmus( false ), + mPerformingSignOperation( false ) { }
SVN commit 700042 by wstephens: Forward port r700035 - (#144303 KMail/Kontact crash on cancelling signing an new (empty) message ) CCBUG:144303 M +18 -1 messagecomposer.cpp --- trunk/KDE/kdepim/kmail/messagecomposer.cpp #700041:700042 @@ -314,7 +314,24 @@ MessageComposer::MessageComposer( KMComposeWin *win ) : QObject( win ), mComposeWin( win ), mCurrentJob( 0 ), - mKeyResolver( 0 ), mIdentityUid( 0 ), mPerformingSignOperation( false ) + mReferenceMessage( 0 ), mKeyResolver( 0 ), + mUseOpportunisticEncryption( false ), + mSignBody( false ), mEncryptBody( false ), + mSigningRequested( false ), mEncryptionRequested( false ), + mDoSign( false ), mDoEncrypt( false ), + mAllowedCryptoMessageFormats( 0 ), + mDisableCrypto( false ), + mDisableBreaking( false ), + mDebugComposerCrypto( false ), + mAutoCharset( true ), + mIsRichText( false ), + mIdentityUid( 0 ), mRc( true ), + mHoldJobs( false ), + mNewBodyPart( 0 ), + mEarlyAddAttachments( false ), mAllAttachmentsAreInBody( false ), + mPreviousBoundaryLevel( 0 ), + mEncryptWithChiasmus( false ), + mPerformingSignOperation( false ) { }
Thank you for fixing this!
*** Bug 149561 has been marked as a duplicate of this bug. ***