Bug 282371 - crash on mail filtering (sent mail)
Summary: crash on mail filtering (sent mail)
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 4.8
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-20 00:07 UTC by Milian Wolff
Modified: 2011-09-23 11:14 UTC (History)
0 users

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 Milian Wolff 2011-09-20 00:07:24 UTC
Application: kmail (4.8 pre)
KDE Platform Version: 4.7.1 (4.7.1)
Qt Version: 4.7.4
Operating System: Linux 3.0-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
I wrote an email, pressed send and kmail crashed.

I have lots of filters, some also apply to outgoing/sent email like this one, which is probably related looking at the bt.

-- Backtrace:
Application: KMail (kmail), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f5870b10780 (LWP 25311))]

Thread 6 (Thread 0x7f5854888700 (LWP 25312)):
#0  0x00007f586a066613 in select () from /lib/libc.so.6
#1  0x00007f586adf64a1 in ?? () from /usr/lib/libQtCore.so.4
#2  0x00007f586ad2dbc5 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f586aaa3da0 in start_thread () from /lib/libpthread.so.0
#4  0x00007f586a06c7dd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f5853e8e700 (LWP 25334)):
#0  0x00007f586aaa7b04 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f5863e535ba in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007f5863e536a9 in ?? () from /usr/lib/libQtWebKit.so.4
#3  0x00007f586aaa3da0 in start_thread () from /lib/libpthread.so.0
#4  0x00007f586a06c7dd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f5853575700 (LWP 25335)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007f5853574b60 in ?? ()
#2  0x00007fff781ff7e7 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0x7f584b873700 (LWP 6342)):
#0  0x00007f586aaa7e7b in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f586ad2dfde in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f586ad2297f in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f586ad2dbc5 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f586aaa3da0 in start_thread () from /lib/libpthread.so.0
#5  0x00007f586a06c7dd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f58517ff700 (LWP 6343)):
#0  0x00007f586aaa7e7b in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f586ad2dfde in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f586ad2297f in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f586ad2dbc5 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f586aaa3da0 in start_thread () from /lib/libpthread.so.0
#5  0x00007f586a06c7dd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f5870b10780 (LWP 25311)):
[KCrash Handler]
#6  0x00007f586708baab in QBasicAtomicInt::ref (this=0x64007000750020) at /usr/include/QtCore/qatomic_x86_64.h:121
#7  0x00007f586708d2aa in QString::QString (this=0x7fff7805eff0, other=...) at /usr/include/QtCore/qstring.h:729
#8  0x00007f58670d4545 in MailCommon::MailFilter::identifier (this=0x1505930) at /home/milian/projects/kde4/kdepim/mailcommon/mailfilter.cpp:112
#9  0x00007f586f8891e6 in KMFilterActionCommand::execute (this=0x7e37ff0) at /home/milian/projects/kde4/kdepim/kmail/kmcommands.cpp:1338
#10 0x00007f586f881a99 in KMCommand::slotPostTransfer (this=0x7e37ff0, result=KMCommand::OK) at /home/milian/projects/kde4/kdepim/kmail/kmcommands.cpp:267
#11 0x00007f586f88abf3 in KMCommand::qt_metacall (this=0x7e37ff0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fff7805f190) at /home/milian/projects/.build/kde4/kdepim/kmail/kmcommands.moc:88
#12 0x00007f586f88bfd6 in KMFilterActionCommand::qt_metacall (this=0x7e37ff0, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fff7805f190) at /home/milian/projects/.build/kde4/kdepim/kmail/kmcommands.moc:1230
#13 0x00007f586ae275ea in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#14 0x00007f586f88ac7c in KMCommand::messagesTransfered (this=0x7e37ff0, _t1=KMCommand::OK) at /home/milian/projects/.build/kde4/kdepim/kmail/kmcommands.moc:103
#15 0x00007f586f882066 in KMCommand::slotJobFinished (this=0x7e37ff0) at /home/milian/projects/kde4/kdepim/kmail/kmcommands.cpp:377
#16 0x00007f586f88ac1d in KMCommand::qt_metacall (this=0x7e37ff0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff7805f310) at /home/milian/projects/.build/kde4/kdepim/kmail/kmcommands.moc:90
#17 0x00007f586f88bfd6 in KMFilterActionCommand::qt_metacall (this=0x7e37ff0, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fff7805f310) at /home/milian/projects/.build/kde4/kdepim/kmail/kmcommands.moc:1230
#18 0x00007f586ae275ea in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#19 0x00007f586ff3a6c2 in KJob::result(KJob*) () from /usr/lib/libkdecore.so.5
#20 0x00007f586ff3a700 in KJob::emitResult() () from /usr/lib/libkdecore.so.5
#21 0x00007f586d0d3332 in Akonadi::JobPrivate::delayedEmitResult (this=0x809e9c0) at /home/milian/projects/kde4/kdepimlibs/akonadi/job.cpp:144
#22 0x00007f586d0d44b7 in Akonadi::Job::qt_metacall (this=0x75eeaa0, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x8047f10) at /home/milian/projects/.build/kde4/kdepimlibs/akonadi/job.moc:91
#23 0x00007f586d0c0559 in Akonadi::ItemFetchJob::qt_metacall (this=0x75eeaa0, _c=QMetaObject::InvokeMetaMethod, _id=34, _a=0x8047f10) at /home/milian/projects/.build/kde4/kdepimlibs/akonadi/itemfetchjob.moc:73
#24 0x00007f586ae2b18e in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#25 0x00007f586baf0ae4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#26 0x00007f586baf5951 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#27 0x00007f5870529c96 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#28 0x00007f586ae1489c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#29 0x00007f586ae17c2f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#30 0x00007f586ae3f1a3 in ?? () from /usr/lib/libQtCore.so.4
#31 0x00007f586062729d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#32 0x00007f5860627a78 in ?? () from /usr/lib/libglib-2.0.so.0
#33 0x00007f5860627d09 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#34 0x00007f586ae3f606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0x00007f586bb93eee in ?? () from /usr/lib/libQtGui.so.4
#36 0x00007f586ae13a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#37 0x00007f586ae13c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#38 0x00007f586ae17eab in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#39 0x0000000000403686 in main (argc=1, argv=0x7fff7805fe18) at /home/milian/projects/kde4/kdepim/kmail/main.cpp:145

Reported using DrKonqi
Comment 1 Tobias Koenig 2011-09-23 11:14:56 UTC
Git commit abaacef5280b17191afce2e3348240fd020a641a by Tobias Koenig.
Committed on 23/09/2011 at 13:12.
Pushed by tokoe into branch 'master'.

Store the filter id instead of the filter object

Prevent possible crashes by just storing the filter id
and not the filter objects itself which might become invalidated.

BUG: 282371

M  +6    -6    kmail/kmcommands.cpp
M  +4    -5    kmail/kmcommands.h
M  +1    -1    kmail/kmmainwidget.cpp

http://commits.kde.org/kdepim/abaacef5280b17191afce2e3348240fd020a641a