Bug 94043 - KMail crashes when applying a filter on a closed thread
Summary: KMail crashes when applying a filter on a closed thread
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: SVN (3.5 branch)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 94304 95675 97322 97747 100345 101176 101415 104397 104465 105242 110113 112480 112953 123949 126589 127293 128880 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-27 19:22 UTC by András Manţia
Modified: 2007-09-14 12:17 UTC (History)
19 users (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 András Manţia 2004-11-27 19:22:03 UTC
I have a thread in my inbox from a mailing list and I've created a filter to 
put the messages belonging to that list in a folder and rewrite the header 
meantime. When I apply on a thread, KMail CVS HEAD crashes (using KDE CVS 
HEAD). The crash is reproducible on the same thread and the backtrace is here: 
 
Using host libthread_db library "/lib/libthread_db.so.1". 
[Thread debugging using libthread_db enabled] 
[New Thread 16384 (LWP 3975)] 
[KCrash handler] 
#5  0x40264be5 in KMSortCacheItem::setId (this=0x0, id=941) 
    at /data/development/sources/kde-head/kdepim/kmail/kmheaders.cpp:145 
#6  0x40258413 in KMHeaders::msgRemoved (this=0x833b2c0, id=937, msgId= 
      {static null = {static null = <same as static member of an already seen 
type>, d = 0x804f610, static shared_null = 0x804f610}, d = 0x853dd20, static 
shared_null = 0x804f610}, strippedSubjMD5= 
      {static null = {static null = <same as static member of an already seen 
type>, d = 0x804f610, static shared_null = 0x804f610}, d = 0x84ad8f0, static 
shared_null = 0x804f610}) 
    at /data/development/sources/kde-head/kdepim/kmail/kmheaders.cpp:1564 
#7  0x40261ebc in KMHeaders::qt_invoke (this=0x833b2c0, _id=112, _o=0xbfffe2f0) 
    at kmheaders.moc:282 
#8  0x41b8aa2c in QObject::activate_signal () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#9  0x40290221 in KMFolder::msgRemoved (this=0x82f5f40, t0=937, t1= 
      {static null = {static null = <same as static member of an already seen 
type>, d = 0x804f610, static shared_null = 0x804f610}, d = 0x853dd20, static 
shared_null = 0x804f610}, t2= 
      {static null = {static null = <same as static member of an already seen 
type>, d = 0x804f610, static shared_null = 0x804f610}, d = 0x84ad8f0, static 
shared_null = 0x804f610}) at kmfolder.moc:249 
#10 0x40290c33 in KMFolder::qt_emit (this=0x82f5f40, _id=9, _o=0xbfffe420) 
    at kmfolder.moc:369 
#11 0x41b8aa5b in QObject::activate_signal () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#12 0x402aa8df in FolderStorage::msgRemoved (this=0x82f6048, t0=937, t1= 
      {static null = {static null = <same as static member of an already seen 
type>, d = 0x804f610, static shared_null = 0x804f610}, d = 0x853dd20, static 
shared_null = 0x804f610}, t2= 
      {static null = {static null = <same as static member of an already seen 
type>, d = 0x804f610, static shared_null = 0x804f610}, d = 0x84ad8f0, static 
shared_null = 0x804f610}) at folderstorage.moc:260 
#13 0x402a7ab7 in FolderStorage::take (this=0x82f6048, idx=937) 
    at /data/development/sources/kde-head/kdepim/kmail/folderstorage.cpp:409 
#14 0x4028e27c in KMFolder::take (this=0x82f5f40, idx=937) 
    at /data/development/sources/kde-head/kdepim/kmail/kmfolder.cpp:317 
#15 0x4033b91d in KMFolderMaildir::addMsg (this=0x8318b20, aMsg=0x85bef50,  
    index_return=0x0) 
    at /data/development/sources/kde-head/kdepim/kmail/kmfoldermaildir.cpp:432 
#16 0x402a8392 in FolderStorage::moveMsg (this=0x8318b20, aMsg=0x85bef50,  
    aIndex_ret=0x0) 
    at /data/development/sources/kde-head/kdepim/kmail/folderstorage.cpp:561 
#17 0x4028e425 in KMFolder::moveMsg (this=0x83189e0, msg=0x85bef50,  
    index_return=0x0) 
    at /data/development/sources/kde-head/kdepim/kmail/kmfolder.cpp:357 
#18 0x402d7a3a in KMFilterMgr::process (this=0x82f7840, msg=0x85bef50,  
    set=Explicit) 
    at /data/development/sources/kde-head/kdepim/kmail/kmfiltermgr.cpp:260 
#19 0x40259035 in KMHeaders::slotFilterMsg (this=0x833b2c0, msg=0x85bef50) 
    at /data/development/sources/kde-head/kdepim/kmail/kmheaders.cpp:1733 
#20 0x4025999b in KMHeaders::applyFiltersOnMsg (this=0x833b2c0) 
    at /data/development/sources/kde-head/kdepim/kmail/kmheaders.cpp:1874 
#21 0x403bf21b in KMMainWidget::slotApplyFilters (this=0x8334730) 
    at /data/development/sources/kde-head/kdepim/kmail/kmmainwidget.cpp:1470 
#22 0x403b7922 in KMMainWidget::qt_invoke (this=0x8334730, _id=111,  
    _o=0xbfffe8a0) at kmmainwidget.moc:523 
#23 0x41b8aa2c in QObject::activate_signal () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#24 0x41b8b0cb in QObject::activate_signal () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#25 0x4145e255 in KAction::activated () at qshared.h:49 
#26 0x4145ed7d in KAction::slotActivated () at qshared.h:49 
#27 0x4145e0cc in KAction::qt_invoke () at qshared.h:49 
#28 0x41b8aa2c in QObject::activate_signal () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#29 0x41b8b0cb in QObject::activate_signal () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#30 0x41768b85 in KAccelPrivate::menuItemActivated () 
   from /opt/kde-cvs/lib/libkdecore.so.4 
#31 0x4176b0bc in KAccelPrivate::eventFilter () 
   from /opt/kde-cvs/lib/libkdecore.so.4 
#32 0x41b8b1aa in QObject::activate_filters () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#33 0x41b8b26d in QObject::event () from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#34 0x41bbbc42 in QWidget::event () from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#35 0x41c75fda in QMainWindow::event () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#36 0x41b2db64 in QApplication::internalNotify () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#37 0x41b2f758 in QApplication::notify () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#38 0x416e6337 in KApplication::notify () from /opt/kde-cvs/lib/libkdecore.so.4 
#39 0x4176d493 in KAccelEventHandler::x11Event () 
   from /opt/kde-cvs/lib/libkdecore.so.4 
#40 0x416db403 in KApplication::x11EventFilter () 
   from /opt/kde-cvs/lib/libkdecore.so.4 
#41 0x41ac1f52 in qt_set_x11_event_filter () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#42 0xbffff270 in ?? () 
#43 0x00000000 in ?? () 
#44 0x00000000 in ?? () 
#45 0x41fb19ec in ?? () from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#46 0x0000002c in ?? () 
#47 0xbffff148 in ?? () 
#48 0x41ad062e in QApplication::x11ProcessEvent () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#49 0xbffff4a0 in ?? () 
#50 0x080d1398 in ?? () 
#51 0x00000000 in ?? () 
#52 0x080d0b28 in ?? () 
#53 0x0823fa78 in ?? () 
#54 0x0823f4a0 in ?? () 
#55 0x082406f0 in ?? () 
#56 0x00000000 in ?? () 
#57 0x00000000 in ?? () 
#58 0x00000001 in ?? () 
#59 0xbffff5e4 in ?? () 
#60 0x0177ff00 in ?? () 
#61 0x00000000 in ?? () 
#62 0x08245a50 in ?? () 
#63 0x080ec930 in ?? () 
#64 0x08178cf0 in ?? () 
#65 0xbffff500 in ?? () 
#66 0x0804b34c in vtable for KMailApplication () 
#67 0x0817a458 in ?? () 
#68 0x0817bde0 in ?? () 
#69 0x08061a88 in ?? () 
#70 0x41f90f28 in vtable for QCString () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#71 0x08061258 in ?? () 
#72 0xbffff550 in ?? () 
#73 0x0817a2e0 in ?? () 
#74 0x08063008 in ?? () 
#75 0x0000012f in ?? () 
#76 0x000000ff in ?? () 
#77 0x00000009 in ?? () 
#78 0x00000000 in ?? () 
#79 0x08061a50 in ?? () 
#80 0x404f1501 in __CTOR_LIST__ () from /opt/kde-cvs/lib/libkmailprivate.so.0 
#81 0x41f82a48 in vtable for QPixmap () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#82 0x01000007 in ?? () 
#83 0x0823ce58 in ?? () 
#84 0x00000002 in ?? () 
#85 0x00000000 in ?? () 
#86 0x0817a328 in ?? () 
#87 0x41f82a48 in vtable for QPixmap () 
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3 
#88 0x01000001 in ?? () 
#89 0x0822c9b0 in ?? () 
#90 0x00000002 in ?? () 
#91 0x00000000 in ?? () 
#92 0x0820ed90 in ?? () 
#93 0x0818d948 in ?? () 
#94 0x08211448 in ?? () 
#95 0x42279d01 in __pthread_unlock () from /lib/libpthread.so.0
Comment 1 Till Adam 2005-01-02 17:37:43 UTC
Andras, does copying the thread to another folder make any difference? If it still crashes, can you provide the thread to me via private mail, as zipped mbox (File -> Save as). Thanks.
Comment 2 Till Adam 2005-01-02 20:43:30 UTC
*** Bug 95675 has been marked as a duplicate of this bug. ***
Comment 3 Till Adam 2005-01-06 22:57:23 UTC
CVS commit by tilladam: 

Don't crash when a filter changes the subject of a message which results
in the attempt to remove it from the tree of subject threading messages
failing and the detached child looking for a new parent finding the old
parent as the new parent, which in turn results in the child being deleted
with the old (and new) parent, which is not a good idea, since it is
still referenced.

(This is only fixing the symptom for now, not the real issue)

BUG: 94043


  M +6 -3      kmheaders.cpp   1.697


--- kdepim/kmail/kmheaders.cpp  #1.696:1.697
@@ -1034,7 +1034,10 @@ void KMHeaders::msgRemoved(int id, QStri
       SortCacheItem *sci = item->sortCacheItem();
       SortCacheItem *parent = findParent( sci );
-      if (!parent) parent = findParentBySubject( sci );
+      if ( !parent && mSubjThreading ) 
+        parent = findParentBySubject( sci );
+
+      Q_ASSERT( !parent || parent->item() != removedItem );
       myParent->takeItem(lvi);
-      if (parent && parent->item() != item)
+      if ( parent && parent->item() != item && parent->item() != removedItem )
           parent->item()->insertItem(lvi);
       else


Comment 4 András Manţia 2005-01-07 21:06:15 UTC
The problem is that it still crashes for me...
Now without debug enabled, but I will recompile if you want.

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 8301)]
[KCrash handler]
#5  0x00000000 in ?? ()
#6  0x403520aa in KMHeaders::msgRemoved ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#7  0x40353943 in KMHeaders::qt_invoke ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#8  0x41d73bac in QObject::activate_signal ()
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3
#9  0x401eaec3 in KMFolder::msgRemoved ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#10 0x4020cf27 in KMFolder::qt_emit ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#11 0x41d73bdb in QObject::activate_signal ()
   from /usr/lib/qt-copy-3.3/lib/libqt-mt.so.3
#12 0x401eaa93 in FolderStorage::msgRemoved ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#13 0x40317544 in FolderStorage::take ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#14 0x40159f5c in KMFolder::take () 
from /opt/kde-cvs/lib/libkmailprivate.so.0
#15 0x403deb56 in KMFolderMaildir::addMsgInternal ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#16 0x403dfd6d in KMFolderMaildir::addMsg ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#17 0x401d9165 in FolderStorage::moveMsg ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#18 0x4015a060 in KMFolder::moveMsg ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#19 0x402797a0 in KMFilterMgr::process ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#20 0x4030c657 in KMHeaders::slotFilterMsg ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0
#21 0x08751ea8 in ?? ()
#22 0x00000004 in ?? ()
#23 0x00000002 in ?? ()
#24 0x0805bfd8 in ?? ()
#25 0x08751ea8 in ?? ()
#26 0xbfffe808 in ?? ()
#27 0x40306cde in KMMsgBase::getMsgSerNum ()
   from /opt/kde-cvs/lib/libkmailprivate.so.0

Comment 5 Tom Albers 2005-01-07 21:15:43 UTC
Reopen
Comment 6 Andreas Gungl 2005-02-05 23:38:01 UTC
The problem is caused by an invalid "parent" in kmheaders.cpp lines 1040 ff.

It's easy to reproduce following the description in the original post. There is no problem if the source folder is not threaded.
Comment 7 Andreas Gungl 2005-02-05 23:39:32 UTC
*** Bug 94304 has been marked as a duplicate of this bug. ***
Comment 8 Andreas Gungl 2005-02-12 20:49:48 UTC
To make things more clear: KMail crashes when he subject header is rewritten for messages which are moved out of a folder in subject threading mode using filters. Other cases are no longer reproducible.
Comment 9 Andreas Gungl 2005-02-12 21:07:29 UTC
*** Bug 97322 has been marked as a duplicate of this bug. ***
Comment 10 Till Adam 2005-02-16 21:13:28 UTC
CVS commit by tilladam: 

Find a way to do subject threading without needing to have the subject
remain stable during the lifetime of a message. In other words, don't
crash when changing the subject header of a message which is part of
the current subject threading trees. Pfew, this one was a bugger to fix.

BUGS: 94043


  M +2 -12     folderstorage.cpp   1.48
  M +2 -2      folderstorage.h   1.43
  M +9 -2      headeritem.h   1.7
  M +2 -2      kmfolder.cpp   1.347
  M +1 -1      kmfolder.h   1.170
  M +9 -9      kmheaders.cpp   1.704
  M +1 -1      kmheaders.h   1.170
  M +1 -1      kmmainwidget.cpp   1.318



Comment 11 Andreas Gungl 2005-02-27 07:19:53 UTC
*** Bug 100345 has been marked as a duplicate of this bug. ***
Comment 12 Andreas Gungl 2005-03-13 10:25:28 UTC
*** Bug 101415 has been marked as a duplicate of this bug. ***
Comment 13 Andreas Gungl 2005-03-13 10:27:36 UTC
*** Bug 101176 has been marked as a duplicate of this bug. ***
Comment 14 Tobias Powalowski 2005-03-18 09:29:27 UTC
it is still there in kmail final in 3.4.0
Comment 15 Tom Albers 2005-03-18 14:23:54 UTC
Reopen since it is reported now with kmail 1.8
Comment 16 Andreas Gungl 2005-03-18 21:17:58 UTC
Tobias, can you please provide detailed information about how to trigger that crash? I would like to see a backtrace as well. We've put considerable effort into analyzing and fixing that threading crash. Perhaps we've overlooked a constellation, but we need help to track this down further. Please make sure as well that you didn't run into http://bugs.kde.org/show_bug.cgi?id=97274 which is slightly different.
Comment 17 Tobias Powalowski 2005-03-19 00:51:43 UTC
sorry i can't reproduce this again, but wait i deleted 3 clamav filters, perhaps this is the reason why this is not happening anymore.
have to look at it further tomorrow.
Comment 18 Tobias Powalowski 2005-03-19 09:02:39 UTC
hi
i added again the clamav filter and then here we go:
it crashed kmail in a way that it can happen, that the index files of maildir are damaged and mails appear with nothing in it and when you try to delete those mails the next one becomes the same as the deleted one. A real horror.
deleting index file of the maildir helps to get rid of this again.

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(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)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1254790560 (LWP 7311)]
(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)
[KCrash handler]
#7  0xb7eb1660 in KMHeaders::msgAdded () from /opt/kde/lib/libkmailprivate.so
#8  0xb7ebb48f in KMHeaders::qt_invoke () from /opt/kde/lib/libkmailprivate.so
#9  0xb62e076a in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#10 0xb62e0e0b in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#11 0xb7c91d23 in KMFolder::msgAdded () from /opt/kde/lib/libkmailprivate.so
#12 0xb7c92532 in KMFolder::qt_emit () from /opt/kde/lib/libkmailprivate.so
#13 0xb62e085c in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#14 0xb62e0e0b in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#15 0xb7c96e03 in FolderStorage::msgAdded ()
   from /opt/kde/lib/libkmailprivate.so
#16 0xb7e405ef in FolderStorage::emitMsgAddedSignals ()
   from /opt/kde/lib/libkmailprivate.so
#17 0xb7ebc19d in KMFolderMaildir::addMsgInternal ()
   from /opt/kde/lib/libkmailprivate.so
#18 0xb7ebc8f9 in KMFolderMaildir::addMsg ()
   from /opt/kde/lib/libkmailprivate.so
#19 0xb7f35602 in FolderStorage::addMsgKeepUID ()
   from /opt/kde/lib/libkmailprivate.so
#20 0xb7c905d8 in KMFolder::addMsgKeepUID ()
   from /opt/kde/lib/libkmailprivate.so
#21 0xb7e9db32 in KMFilterMgr::endFiltering ()
   from /opt/kde/lib/libkmailprivate.so
#22 0xb7e9de59 in KMFilterMgr::process () from /opt/kde/lib/libkmailprivate.so
#23 0xb7ebb751 in KMHeaders::slotFilterMsg ()
   from /opt/kde/lib/libkmailprivate.so
#24 0xb7ebb6df in KMHeaders::applyFiltersOnMsg ()
   from /opt/kde/lib/libkmailprivate.so
#25 0xb7ce165a in KMMainWidget::slotApplyFilters ()
   from /opt/kde/lib/libkmailprivate.so
#26 0xb7f1df11 in KMMainWidget::qt_invoke ()
   from /opt/kde/lib/libkmailprivate.so
#27 0xb62e07e4 in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#28 0xb62e0f7c in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#29 0xb6b554e9 in KAction::activated () from /opt/kde/lib/libkdeui.so.4
#30 0xb6c1013a in KAction::slotActivated () from /opt/kde/lib/libkdeui.so.4
#31 0xb6c82fe9 in KAction::slotPopupActivated ()
   from /opt/kde/lib/libkdeui.so.4
#32 0xb6c831f8 in KAction::qt_invoke () from /opt/kde/lib/libkdeui.so.4
#33 0xb62e07e4 in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#34 0xb66360ed in QSignal::signal () from /opt/qt/lib/libqt-mt.so.3
#35 0xb62fb1f1 in QSignal::activate () from /opt/qt/lib/libqt-mt.so.3
#36 0xb63f03e7 in QPopupMenu::mouseReleaseEvent ()
   from /opt/qt/lib/libqt-mt.so.3
#37 0xb6b4f554 in KPopupMenu::mouseReleaseEvent ()
   from /opt/kde/lib/libkdeui.so.4
#38 0xb631a4d4 in QWidget::event () from /opt/qt/lib/libqt-mt.so.3
#39 0xb627cd8f in QApplication::internalNotify ()
   from /opt/qt/lib/libqt-mt.so.3
#40 0xb627d14a in QApplication::notify () from /opt/qt/lib/libqt-mt.so.3
#41 0xb69862c5 in KApplication::notify () from /opt/kde/lib/libkdecore.so.4
#42 0xb6216565 in QETWidget::translateMouseEvent ()
   from /opt/qt/lib/libqt-mt.so.3
#43 0xb621456e in QApplication::x11ProcessEvent ()
   from /opt/qt/lib/libqt-mt.so.3
#44 0xb62281e5 in QEventLoop::processEvents () from /opt/qt/lib/libqt-mt.so.3
#45 0xb6293461 in QEventLoop::enterLoop () from /opt/qt/lib/libqt-mt.so.3
#46 0xb627bf2f in QApplication::enter_loop () from /opt/qt/lib/libqt-mt.so.3
#47 0xb63f403f in QPopupMenu::exec () from /opt/qt/lib/libqt-mt.so.3
#48 0xb7ea3425 in KMHeaders::slotRMB () from /opt/kde/lib/libkmailprivate.so
#49 0xb7ea375a in KMHeaders::rightButtonPressed ()
   from /opt/kde/lib/libkmailprivate.so
#50 0xb7ebb15d in KMHeaders::qt_invoke () from /opt/kde/lib/libkmailprivate.so
#51 0xb62e07e4 in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#52 0xb66496d5 in QListView::contextMenuRequested ()
   from /opt/qt/lib/libqt-mt.so.3
#53 0xb63ca444 in QListView::contentsContextMenuEvent ()
   from /opt/qt/lib/libqt-mt.so.3
#54 0xb63fd0c5 in QScrollView::viewportContextMenuEvent ()
   from /opt/qt/lib/libqt-mt.so.3
#55 0xb63ff079 in QScrollView::eventFilter () from /opt/qt/lib/libqt-mt.so.3
#56 0xb63cc0c8 in QListView::eventFilter () from /opt/qt/lib/libqt-mt.so.3
#57 0xb7c844bf in KMHeaders::eventFilter ()
   from /opt/kde/lib/libkmailprivate.so
#58 0xb62ddbef in QObject::activate_filters () from /opt/qt/lib/libqt-mt.so.3
#59 0xb62ddcc4 in QObject::event () from /opt/qt/lib/libqt-mt.so.3
#60 0xb6319f4f in QWidget::event () from /opt/qt/lib/libqt-mt.so.3
#61 0xb627cd8f in QApplication::internalNotify ()
   from /opt/qt/lib/libqt-mt.so.3
#62 0xb627d389 in QApplication::notify () from /opt/qt/lib/libqt-mt.so.3
#63 0xb69862c5 in KApplication::notify () from /opt/kde/lib/libkdecore.so.4
#64 0xb62166eb in QETWidget::translateMouseEvent ()
   from /opt/qt/lib/libqt-mt.so.3
#65 0xb621456e in QApplication::x11ProcessEvent ()
   from /opt/qt/lib/libqt-mt.so.3
#66 0xb62281e5 in QEventLoop::processEvents () from /opt/qt/lib/libqt-mt.so.3
#67 0xb6293461 in QEventLoop::enterLoop () from /opt/qt/lib/libqt-mt.so.3
#68 0xb62933b6 in QEventLoop::exec () from /opt/qt/lib/libqt-mt.so.3
#69 0xb627beff in QApplication::exec () from /opt/qt/lib/libqt-mt.so.3
#70 0x0804a3f6 in ?? ()
#71 0xbffff530 in ?? ()
#72 0xbffff440 in ?? ()
#73 0x00000000 in ?? ()
#74 0x00000000 in ?? ()
#75 0xb6a35820 in av_ () from /opt/kde/lib/libkdecore.so.4
#76 0xffffffff in ?? ()
#77 0x00000090 in ?? ()
#78 0xb6a35420 in spinlock () from /opt/kde/lib/libkdecore.so.4
#79 0xb673a190 in vtable for QGArray () from /opt/qt/lib/libqt-mt.so.3
#80 0x08194c78 in ?? ()
#81 0xb69d95b1 in mALLOc () from /opt/kde/lib/libkdecore.so.4
#82 0xb5b9019d in __libc_start_main () from /lib/tls/libc.so.6
#83 0x0804a161 in ?? ()
Comment 19 Andreas Gungl 2005-03-25 21:38:02 UTC
Hm, the backtrace is not that usefull. Did you compile with full debug info?

Can you describe what the clamav filters are supposed to do? Can you provide a folder containing as few messages as possible which triggers the crash when filtering?
Do you use an IMAP account? Do you update that account while filtering?
Comment 20 Robert Wenner 2005-03-26 03:33:00 UTC
Hi,

On Friday 25 March 2005 14:38, Andreas Gungl wrote:
> ------- Hm, the backtrace is not that usefull. Did you compile with
> full debug info?

I did not compile it myself, this is the version that shipped with SuSE 
9.2 professional. (1.7.1 from KDE 3.3.0 as of the Info box.)

> Can you describe what the clamav filters are supposed to do? 

I have usually filters that place mails in folders for mailing lists.
I used manual filtering to move mails from one folder from different 
mailing lists in sub folders, since the main folder got too full.

> Can you 
> provide a folder containing as few messages as possible which triggers
> the crash when filtering? 

I copied the messages to a test folder and tried to reproduce the crash, 
but without success.
Maybe I already lost the mails that triggered the crash?

> Do you use an IMAP account? Do you update that account while filtering?

No, all messages were fetched with POP and local on my hard disk, when 
that crash occurred.

Robert
Comment 21 Tobias Powalowski 2005-03-26 11:53:49 UTC
hi
sorry archlinux uses strip and no-debug on packages
i have a folder with approx. 100 mails.
and there i use apply filter and then the crash happens.
to get the clamav filter use the wizard in kmail. then it adds a rule to filters.
clamav is a virus filter provided as wizard in kmail.
i don't use imap in kmail.
the problem happens when you use the filters on already received messages.
Comment 22 Andreas Gungl 2005-03-26 20:27:16 UTC
Robert, the problem was worked on in KMail 1.8, if you use version 1.7.x then you will have to further live with that crash.

Tobias, what are your settings for the folder? Do you thread messages? If yes, is threading on subject activated? Does it crash when you filter the messages while threading on subject is deactivated? Does the crash happen after a restart of KMail when the index files for that folder have been deleted before?
Could you "tgz" the folder in question and send it to me in private mail? Then I could try to reproduce the crash. Sorry for those many questions, but this crash is extremely difficult to hunt down.
Comment 23 Tobias Powalowski 2005-03-31 10:27:47 UTC
ok here my answers:
yes i use threaded view on the folder, it doesn't matter if threading on subject is also activated.
the crash doesn't happen when threading is disabled. 
Deleting index files doesn't help.
it happens also when only 2 mails are threaded and you apply the filter on it.
you don'T need masses of mails 2 mails are enough.
It only happens when i add the /opt/kde/bin/kmail_clamav.sh to the filters.
overthe antivir wizard or by hand that also doesn't make a difference.
perhaps the script has something bad in it that doesn't work with threading.
Comment 24 Andreas Gungl 2005-03-31 11:37:37 UTC
Tobias, is there any chance that you can use KMail from CVS? There has been a fix for filtering messages in threaded folders about two days ago. The fix will be in KDE 3.4.1, a similar problem has been reported to be fixed by that (102134).

I think I gonna check clamav myself, but this might take some time though. So if you could test the CVS version, this could save me some effort.
Comment 25 Andreas Gungl 2005-04-01 14:45:00 UTC
Closing as success of a recent fix was reported in private mail. (it was the  double pointers in the list thingy)
Comment 26 Andreas Gungl 2005-04-30 13:51:16 UTC
*** Bug 104465 has been marked as a duplicate of this bug. ***
Comment 27 Andreas Gungl 2005-04-30 13:52:12 UTC
*** Bug 104397 has been marked as a duplicate of this bug. ***
Comment 28 Thiago Macieira 2005-08-07 04:32:43 UTC
*** Bug 105242 has been marked as a duplicate of this bug. ***
Comment 29 Thiago Macieira 2005-08-07 04:33:00 UTC
*** Bug 110113 has been marked as a duplicate of this bug. ***
Comment 30 Thiago Macieira 2005-09-13 03:59:47 UTC
*** Bug 112480 has been marked as a duplicate of this bug. ***
Comment 31 Dave Hahn 2005-09-13 15:42:10 UTC
Bug 112480 was marked as a duplicate of this bug.  However, I do not have any filters in place nor, do I believe am I using threading.  I configured KMail to point to an existing IMAP mailbox with messages and folders.  As soon as I tried to delete a message, the crashing started.

So, I'm not sure this is a dup of this bug at all.
Comment 32 Thiago Macieira 2005-09-21 04:00:09 UTC
*** Bug 97747 has been marked as a duplicate of this bug. ***
Comment 33 Thiago Macieira 2005-09-21 04:00:41 UTC
*** Bug 112953 has been marked as a duplicate of this bug. ***
Comment 34 Thiago Macieira 2006-03-24 19:07:50 UTC
*** Bug 123949 has been marked as a duplicate of this bug. ***
Comment 35 Thiago Macieira 2006-05-04 20:02:02 UTC
*** Bug 126589 has been marked as a duplicate of this bug. ***
Comment 36 Thiago Macieira 2006-06-17 21:45:52 UTC
*** Bug 128880 has been marked as a duplicate of this bug. ***
Comment 37 Thiago Macieira 2006-06-17 21:46:04 UTC
*** Bug 127293 has been marked as a duplicate of this bug. ***
Comment 38 Juliano F. Ravasi 2006-09-20 22:33:20 UTC
Either this bug is NOT fixed, or there is another real bug wandering about (reports #112480, #112953, #123949, #126589, etc...) which is being improperly being marked as a duplicate of this bug.

I'm getting 100% reproducible crashes with Kmail 1.9.3, released AFTER this bug was supposedly fixed. The backtrace is compatible with the bugs listed below. The crash happens on QGDict::look_string().

All the following bugs were (directly or indirectly) marked as a dupe of this one, but ALL of them reports crashes on QGDict::look_string(), which was NOT reported on this bug. And these reports were reported for NEWER versions of Kmail:

Bug 105242 - kontact closes when deleting message from imap account
Bug 110113 - crash on marking spam or filtering
Bug 112480 - KMail crashing when deleting messages from an IMAP account
Bug 112816 - crash when emptying trash while having it open
Bug 112953 - Kmail stürzt ab, wenn ausgewählte E-Mails in anderen Ordner verschoben werden sollen
Bug 114072 - Kmail crash on deleting mail with the DEL key
Bug 123949 - kmail crash while deleting subfolder of local trash
Bug 126589 - moving a group of mails to the trash from an imap account crashes kmail
Bug 127293 - SIGFPE crash when deleting message from nested remote IMAP folder
Bug 128880 - Crash when delete on IMAP

So, it looks like we have ANOTHER bug here. Please, stop marking bugs as dupe of this one, and reopen this issue (or one of the ones wrongly marked as duplicate).
Comment 39 Juliano F. Ravasi 2006-09-20 22:37:33 UTC
CC: thiago@kde.org

Thiago, since you were marking the bugs as dupe of this one, please read my previous comment and check the proper action for these last reports.
Comment 40 Philip Rodrigues 2006-09-20 23:28:46 UTC
Juliano, If you still encounter the problem, please provide the information necessary to reproduce it.
Comment 41 Juliano F. Ravasi 2006-09-21 01:14:15 UTC
Philip: the information necessary is all over the 10 bugs I listed above.

For the lazy: With kmail 1.9.3, KDE 3.5.4, "Threaded message list" enabled, no filters, inbox of an IMAP account. I click on the "Date (Order of arrival)" header and kmail crashes. If running inside kontact, it crashes also. If I select a message and try to move it to another folder, kmail crashes. If I select a message and try to delete it, kmail crashes.

The backtrace is always similar to the bugs listed above. Always on QGDict::look_string().
Comment 42 Andreas Gungl 2006-09-21 05:05:39 UTC
Am Donnerstag, 21. September 2006 01:14 schrieb Juliano Ferraz Ravasi:
> For the lazy: With kmail 1.9.3, KDE 3.5.4, "Threaded message list" enabled,
> no filters, inbox of an IMAP account. I click on the "Date (Order of
> arrival)" header and kmail crashes. If running inside kontact, it crashes
> also. If I select a message and try to move it to another folder, kmail
> crashes. If I select a message and try to delete it, kmail crashes.


Juliano, if it were that easy to reproduce, it would have been fixed for long. 
If I follow your advice, KMail doesn't crash at all.

The main problem to make the crash reproducible is to describe exactly the 
constellation of some threaded messages which causes KMail to crash. I even 
had cases were it was not enough to send the content of a folder to a 
developer. His system didn't crash, but mine did. In the end, he was able to 
provide some patched files for me. In turn, I had to compile KMail based on 
that patches and send back the output. It took some iterations to get that 
specific constellation fixed.

So, it's understandable that this bug report was marked as fixed after several 
constellations have been fixed. After every fix you think, this was the last 
place which broke the application. Unfortunately the threading algorithm 
seems to be all but easy. If you want to make KMail a lot more stable, 
consider switching off the threading options.
Comment 43 Juliano F. Ravasi 2006-09-29 05:33:27 UTC
I have some news. With what you said, I tried running KMail on my laptop, with an exact copy of my desktop's home directory, and it didn't crash. The same content of the whole ~/.kde folder, the same operating system (Fedora Core 5), the same version of KDE and KMail. It is very strange that I can reproduce the bug in only one computer, while everything, except for the hardware, is identical.

I also tried the suggested workaround in bug 133812 (cmt 3) - deleting the lock file - and the crashes disappeared temporarily. I could reorder the messages, delete messages and move them around, but then, kmail crashed while opening an attachment. Of cource, a new lock file was left in kmail directory, and the problem reappeared.