Bug 236729 - Saving message as draft with encryption active crashes
Summary: Saving message as draft with encryption active crashes
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: akonadi-ports-regression
Depends on:
Blocks: 223438
  Show dependency treegraph
 
Reported: 2010-05-07 18:43 UTC by Thomas McGuire
Modified: 2010-05-11 16:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas McGuire 2010-05-07 18:43:17 UTC
1. Have an identity with correct OpenPGP keys configured
2. Have the option "Never encrypt when saving as draft" enabled
3. Open a composer, fill out a bit of text, the subject and add an attachment.
   Leave the recipients empty.
4. Activate encryption in the toolbar
5. Save as draft

Result: Crash

kmail: /media/kdedev/trunk/src/KDE/kdepim-git/libkleo/ui/keyapprovaldialog.cpp:114: Kleo::KeyApprovalDialog::KeyApprovalDialog(const std::vector<Kleo::KeyApprovalDialog::Item, std:
:allocator<Kleo::KeyApprovalDialog::Item> >&, const std::vector<GpgME::Key, std::allocator<GpgME::Key> >&, QWidget*): Assertion `!recipients.empty()' failed.

#0  0x00007ffff103a645 in raise () from /lib64/libc.so.6
#1  0x00007ffff103bc33 in abort () from /lib64/libc.so.6
#2  0x00007ffff1033329 in __assert_fail () from /lib64/libc.so.6
#3  0x00007fffed3440ee in Kleo::KeyApprovalDialog::KeyApprovalDialog (this=0x7fffffffa600, recipients=std::vector of length 0, capacity 0, sender=std::vector of length 1, capacity 1 = {...}, parent=0x0) at /media/kdedev/trunk/src/KDE/kdepim-git/libkleo
/ui/keyapprovaldialog.cpp:114
#4  0x00007ffff69e26fe in Kleo::KeyResolver::showKeyApprovalDialog (this=0x13a2690) at /media/kdedev/trunk/src/KDE/kdepim-git/kmail/keyresolver.cpp:1444
#5  0x00007ffff69ef850 in Kleo::KeyResolver::resolveEncryptionKeys (this=0x13a2690, signingRequested=false) at /media/kdedev/trunk/src/KDE/kdepim-git/kmail/keyresolver.cpp:1104
#6  0x00007ffff69f0c6d in Kleo::KeyResolver::resolveAllKeys (this=0x13a2690, signingRequested=@0x7fffffffb2ff, encryptionRequested=@0x7fffffffb2fe) at /media/kdedev/trunk/src/KDE/kdepim-git/kmail/keyresolver.cpp:1050
#7  0x00007ffff6a4cc3d in KMComposeWin::generateCryptoMessages (this=0x12c8d80, sign=false, encrypt=true) at /media/kdedev/trunk/src/KDE/kdepim-git/kmail/kmcomposewin.cpp:2199
#8  0x00007ffff6a53120 in KMComposeWin::slotEmailAddressResolved (this=0x12c8d80, job=0x1289e30) at /media/kdedev/trunk/src/KDE/kdepim-git/kmail/kmcomposewin.cpp:2114
#9  0x00007ffff6a734ab in KMComposeWin::qt_metacall (this=0x12c8d80, _c=InvokeMetaMethod, _id=61, _a=0x7fffffffbc50) at /media/kdedev/trunk/build/KDE/kdepim-git/kmail/kmcomposewin.moc:270
#10 0x00007ffff1ec886f in QMetaObject::metacall (object=0x12c8d80, cl=InvokeMetaMethod, idx=111, argv=0x7fffffffbc50) at kernel/qmetaobject.cpp:237
#11 0x00007ffff1eddbe0 in QMetaObject::activate (sender=0x1289e30, m=0x7ffff76f4780, local_signal_index=3, argv=0x7fffffffbc50) at kernel/qobject.cpp:3293
#12 0x00007ffff7344411 in KJob::result (this=0x1289e30, _t1=0x1289e30) at /media/kdedev/trunk/build/KDE/kdelibs/kdecore/kjob.moc:194
#13 0x00007ffff73447fd in KJob::emitResult (this=0x1289e30) at /media/kdedev/trunk/src/KDE/kdelibs/kdecore/jobs/kjob.cpp:312
#14 0x00007ffff6a9f091 in EmailAddressResolveJob::slotAliasExpansionDone (this=0x1289e30, job=0xed9640) at /media/kdedev/trunk/src/KDE/kdepim-git/kmail/emailaddressresolvejob.cpp:103
#15 0x00007ffff6a9f0fc in EmailAddressResolveJob::qt_metacall (this=0x1289e30, _c=InvokeMetaMethod, _id=0, _a=0x7fffffffbf10) at /media/kdedev/trunk/build/KDE/kdepim-git/kmail/emailaddressresolvejob.moc:73
#16 0x00007ffff1ec886f in QMetaObject::metacall (object=0x1289e30, cl=InvokeMetaMethod, idx=26, argv=0x7fffffffbf10) at kernel/qmetaobject.cpp:237
#17 0x00007ffff1eddbe0 in QMetaObject::activate (sender=0xed9640, m=0x7ffff76f4780, local_signal_index=3, argv=0x7fffffffbf10) at kernel/qobject.cpp:3293
#18 0x00007ffff7344411 in KJob::result (this=0xed9640, _t1=0xed9640) at /media/kdedev/trunk/build/KDE/kdelibs/kdecore/kjob.moc:194
#19 0x00007ffff73447fd in KJob::emitResult (this=0xed9640) at /media/kdedev/trunk/src/KDE/kdelibs/kdecore/jobs/kjob.cpp:312
#20 0x00007ffff6a9be2d in AliasesExpandJob::finishExpansion (this=0xed9640) at /media/kdedev/trunk/src/KDE/kdepim-git/kmail/aliasesexpandjob.cpp:248
#21 0x00007ffff6a9c329 in AliasesExpandJob::slotNicknameExpansionDone (this=0xed9640, job=0xfc3830) at /media/kdedev/trunk/src/KDE/kdepim-git/kmail/aliasesexpandjob.cpp:202
#22 0x00007ffff6a9dcf4 in AliasesExpandJob::qt_metacall (this=0xed9640, _c=InvokeMetaMethod, _id=1, _a=0x7fffffffc450) at /media/kdedev/trunk/build/KDE/kdepim-git/kmail/aliasesexpandjob.moc:76
#23 0x00007ffff1ec886f in QMetaObject::metacall (object=0xed9640, cl=InvokeMetaMethod, idx=27, argv=0x7fffffffc450) at kernel/qmetaobject.cpp:237
#24 0x00007ffff1eddbe0 in QMetaObject::activate (sender=0xfc3830, m=0x7ffff76f4780, local_signal_index=3, argv=0x7fffffffc450) at kernel/qobject.cpp:3293
#25 0x00007ffff7344411 in KJob::result (this=0xfc3830, _t1=0xfc3830) at /media/kdedev/trunk/build/KDE/kdelibs/kdecore/kjob.moc:194
#26 0x00007ffff73447fd in KJob::emitResult (this=0xfc3830) at /media/kdedev/trunk/src/KDE/kdelibs/kdecore/jobs/kjob.cpp:312
#27 0x00007ffff4625f4c in Akonadi::JobPrivate::delayedEmitResult (this=0x11c1440) at /media/kdedev/trunk/src/KDE/kdepimlibs-git/akonadi/job.cpp:143
#28 0x00007ffff462658c in Akonadi::Job::qt_metacall (this=0xfc3830, _c=InvokeMetaMethod, _id=6, _a=0x7fffffffc680) at /media/kdedev/trunk/build/KDE/kdepimlibs-git/akonadi/job.moc:91
#29 0x00007ffff460df5b in Akonadi::ItemSearchJob::qt_metacall (this=0xfc3830, _c=InvokeMetaMethod, _id=34, _a=0x7fffffffc680) at /media/kdedev/trunk/build/KDE/kdepimlibs-git/akonadi/itemsearchjob.moc:72
#30 0x00007ffff5b36d2f in Akonadi::ContactSearchJob::qt_metacall (this=0xfc3830, _c=InvokeMetaMethod, _id=34, _a=0x7fffffffc680) at /media/kdedev/trunk/build/KDE/kdepimlibs-git/akonadi/contact/contactsearchjob.moc:64
#31 0x00007ffff1ec886f in QMetaObject::metacall (object=0xfc3830, cl=InvokeMetaMethod, idx=34, argv=0x7fffffffc680) at kernel/qmetaobject.cpp:237
#32 0x00007ffff1eddbe0 in QMetaObject::activate (sender=0xfa94c0, m=0x7ffff22353e0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3293
#33 0x00007ffff1ee7966 in QSingleShotTimer::timeout (this=0xfa94c0) at .moc/debug-shared/qtimer.moc:82
#34 0x00007ffff1ee7aa7 in QSingleShotTimer::timerEvent (this=0xfa94c0) at kernel/qtimer.cpp:308
#35 0x00007ffff1ed8426 in QObject::event (this=0xfa94c0, e=0x7fffffffd230) at kernel/qobject.cpp:1212
#36 0x00007ffff2f6aa1b in QApplicationPrivate::notify_helper (this=0x650f10, receiver=0xfa94c0, e=0x7fffffffd230) at kernel/qapplication.cpp:4304
#37 0x00007ffff2f6aea4 in QApplication::notify (this=0x7fffffffd7c0, receiver=0xfa94c0, e=0x7fffffffd230) at kernel/qapplication.cpp:3708
#38 0x00007ffff794a7c7 in KApplication::notify (this=0x7fffffffd7c0, receiver=0xfa94c0, event=0x7fffffffd230) at /media/kdedev/trunk/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#39 0x00007ffff1ec0a69 in QCoreApplication::notifyInternal (this=0x7fffffffd7c0, receiver=0xfa94c0, event=0x7fffffffd230) at kernel/qcoreapplication.cpp:704
#40 0x00007ffff2f67d1b in QCoreApplication::sendEvent (receiver=0xfa94c0, event=0x7fffffffd230) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#41 0x00007ffff1f00097 in QTimerInfoList::activateTimers (this=0x654450) at kernel/qeventdispatcher_unix.cpp:603
#42 0x00007ffff1efd76f in timerSourceDispatch (source=0x6543f0) at kernel/qeventdispatcher_glib.cpp:184
#43 0x00007ffff1efd7a9 in idleTimerSourceDispatch (source=0x6544b0) at kernel/qeventdispatcher_glib.cpp:231
#44 0x00007fffe79f20fb in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#45 0x00007fffe79f58cd in ?? () from /usr/lib64/libglib-2.0.so.0
#46 0x00007fffe79f5a8b in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#47 0x00007ffff1efc491 in QEventDispatcherGlib::processEvents (this=0x616330, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#48 0x00007ffff305ed67 in QGuiEventDispatcherGlib::processEvents (this=0x616330, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#49 0x00007ffff1ebce63 in QEventLoop::processEvents (this=0x7fffffffd630, flags=...) at kernel/qeventloop.cpp:149
#50 0x00007ffff1ebd087 in QEventLoop::exec (this=0x7fffffffd630, flags=...) at kernel/qeventloop.cpp:201
#51 0x00007ffff1ec14b3 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#52 0x00007ffff2f6d9ac in QApplication::exec () at kernel/qapplication.cpp:3583
#53 0x0000000000403f79 in main (argc=2, argv=0x7fffffffd948) at /media/kdedev/trunk/src/KDE/kdepim-git/kmail/main.cpp:147
Comment 1 Thomas McGuire 2010-05-07 18:46:30 UTC
Btw, since the "never encrypt/sign when saving as draft" option was activated, it probably shouldn't even try to resolve any keys.
Comment 2 Leo Franchi 2010-05-11 16:56:45 UTC
SVN commit 1125493 by lfranchi:

Don't erroneously try to follow attachment crypto settings when saving as draft.

BUG: 236729


 M  +4 -2      kmail/kmcomposewin.cpp  
 M  +10 -1     messagecomposer/composer.cpp  
 M  +2 -0      messagecomposer/composer.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1125493