[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Big trouble: Problems with moved folders (crash)
From:       "Malte S. Stretz" <msquadrat.nospamplease () gmx ! net>
Date:       2003-02-26 16:55:31
[Download RAW message or body]

Moin,

this one is so complex, I don't know how to file a bug. I'll try to explain 
it here (hope I won't forget half the things.) First, that's what the bug 
wizard says about my system:

Version: 1.5 (using KDE 3.1.0)
Installed from: SuSE
Compiler: gcc version 2.95.3 20010315 (SuSE)
OS: Linux (i686) release 2.4.18

Ok, let's start: I found a pretty reliable way to crash KMail. Maybe two. 
They sound complicated but are pretty easy to discover in real world usage: 
I've got a folder "KMail" and "KMail/Bugs" with the corresponding filters 
and I just moved it below a new folder "KDE".


I. The first one is about moving folders.
1. Disable "Settings->Configure->Folders->Warn before expiring" and enable
   both "...->On Exit...->Compact all folders" and "...->On Exit...->Expire
   old messages".
2. Create a folder /test under your Local Folders
3. Create a folder /test/foo
4. Create a folder /test/foo/bar
5. Create a folder /test/baz
6. Select "Properties..." of foo and change "Belongs to" to "baz". You now
   have /test/baz/foo/bar.
7. Exit KMail

What happens now:
1. The PassivePopup "Compacting folders" appears
2. Folders are compatced till 100%
3. The PassivePopup disappears
4. KMail crashes (backtrace "kmail.1.bt" attached)


II. The second one is about filters not being updated. It seems like KMail 
recognizes moved folders in filters only if you went to "Settings-> 
Configure Filters..." and select the filter in question, right?
1. Create again the hirarchy /test/foo/bar
2. Go to "Settings->Configure Filters..."
3. Create a dummy filter like this:
   "From" "doesn't contain" "@" => "move to folder" "/test/foo/bar"
4. Create another filter:
   "To" "doesn't contain" "@" => "move to folder" "/test/foo"
   Make sure that this filter is *above* the previous
5. Press OK. Now you should have this in your kmailrc:
| [Filter #0]
| StopProcessingHere=true
| action-args-0=.test.directory/foo
| action-name-0=transfer
| actions=1
| apply-on=check-mail,manual-filtering
| contentsA=@
| fieldA=To
| funcA=contains-not
| name=<To>:@
| operator=and
| rules=1
| 
| [Filter #1]
| StopProcessingHere=true
| action-args-0=.test.directory/.foo.directory/bar
| action-name-0=transfer
| actions=1
| apply-on=check-mail,manual-filtering
| contentsA=@
| fieldA=From
| funcA=contains-not
| name=<From>:@
| operator=and
| rules=1
6. Create another folder /test/baz
7. Move foo below /test/baz. Now you've got /test/baz/foo/bar (again)
8. Open the "Filter rules" dialog
9. Select only the first filter. *don't touch the second one*
10. Press "OK". You kmailrc now reads:
| [Filter #0]
| StopProcessingHere=true
| action-args-0=.test.directory/foo
| action-name-0=transfer
| actions=1
| apply-on=check-mail,manual-filtering
| contentsA=@
| fieldA=To
| funcA=contains-not
| name=<To>:@
| operator=and
| rules=1
| 
| [Filter #1]
| StopProcessingHere=true
| action-args-0=.test.directory/.foo.directory/bar
| action-name-0=transfer
| actions=1
| apply-on=check-mail,manual-filtering
| contentsA=@
| fieldA=From
| funcA=contains-not
| name=<From>:@
| operator=and
| rules=1

The second filter was not updated. Now you may have much fun with your 
KMail: If now some message arrives which is processed by the broken Filter 
#1, you get two nice messages:
1. Kmail says: Error opening bar. Either this is not a valid maildir folder
   or you don't have sufficient permissions.
2. KNotify says: KMail encountered a fatal error and will terminate now. The
   error was: Not enough free disk space.
KMail shuts down cleanly now.

Hmmm... First I couldn't reproduce it. But got another nice crash: Whenever 
I click(ed) on the moved bar, I got the message "Error opening bar. Either 
this is not a valid maildir folder or you don't have sufficient 
permissions." The folder structure looked alright though. Could it be 
possible that KMail still had the old directory cached? Whatever, I went to 
the Folter dialog and deleted both the filters and pressed OK. Then I 
changed to the inbox and KMail crashed again (kmail.2.bt).

Ok, that's it I think. Have fun puzzling :o)

Cheers,
Malte
["kmail.1.bt" (text/plain)]

[New Thread 1024 (LWP 29983)]
0x41379099 in wait4 () from /lib/libc.so.6
#0  0x41379099 in wait4 () from /lib/libc.so.6
#1  0x413f18e4 in __DTOR_END__ () from /lib/libc.so.6
#2  0x41236177 in waitpid () from /lib/libpthread.so.0
#3  0x409fb5ae in KCrash::defaultCrashHandler ()
   from /opt/kde3/lib/libkdecore.so.4
#4  0x41233bc4 in pthread_sighandler () from /lib/libpthread.so.0
#5  <signal handler called>
#6  0x40f28b8d in QGArray::resize () from /usr/lib/qt3/lib/libqt-mt.so.3
#7  0x40f28c15 in QGArray::resize () from /usr/lib/qt3/lib/libqt-mt.so.3
#8  0x08158bb9 in KMMsgDict::deleteRentry (entry=0x84eec08) at kmmsgdict.cpp:73
#9  0x08126f8e in KMFolder::~KMFolder (this=0x83a5730, __in_chrg=3)
    at kmfolder.cpp:127
#10 0x081aa60c in KMFolderMaildir::~KMFolderMaildir (this=0x83a5730, 
    __in_chrg=3) at kmfoldermaildir.cpp:56
#11 0x081fd763 in QPtrList<KMFolderNode>::deleteItem (this=0x839c310, 
    d=0x83a5730) at /usr/lib/qt3/include/qptrlist.h:119
#12 0x40f2d525 in QGList::clear () from /usr/lib/qt3/lib/libqt-mt.so.3
#13 0x081651d9 in KMFolderDir::~KMFolderDir (this=0x839c2d8, __in_chrg=3)
    at /usr/lib/qt3/include/qptrlist.h:78
#14 0x081fd763 in QPtrList<KMFolderNode>::deleteItem (this=0x8646f88, 
    d=0x839c2d8) at /usr/lib/qt3/include/qptrlist.h:119
#15 0x40f2d525 in QGList::clear () from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0x081651d9 in KMFolderDir::~KMFolderDir (this=0x8646f50, __in_chrg=3)
    at /usr/lib/qt3/include/qptrlist.h:78
#17 0x081fd763 in QPtrList<KMFolderNode>::deleteItem (this=0x83a3030, 
    d=0x8646f50) at /usr/lib/qt3/include/qptrlist.h:119
#18 0x40f2d525 in QGList::clear () from /usr/lib/qt3/lib/libqt-mt.so.3
#19 0x081651d9 in KMFolderDir::~KMFolderDir (this=0x83a2ff8, __in_chrg=3)
    at /usr/lib/qt3/include/qptrlist.h:78
#20 0x081fd763 in QPtrList<KMFolderNode>::deleteItem (this=0x8386d5c, 
    d=0x83a2ff8) at /usr/lib/qt3/include/qptrlist.h:119
#21 0x40f2d525 in QGList::clear () from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0x081650c4 in KMFolderRootDir::~KMFolderRootDir (this=0x8386d24, 
    __in_chrg=2) at /usr/lib/qt3/include/qptrlist.h:78
#23 0x081667db in KMFolderMgr::~KMFolderMgr (this=0x8386cf8, __in_chrg=3)
    at kmfoldermgr.cpp:47
#24 0x081bc2b8 in KMKernel::cleanupLoop (this=0xbffff2cc) at kmkernel.cpp:846
#25 0x081bda3b in KMKernel::qt_invoke (this=0xbffff2cc, _id=8, _o=0xbfffee54)
    at kmkernel.moc:121
#26 0x40d35554 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0x40f8fc95 in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3
#28 0x40d4a93d in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3
#29 0x40d4fd40 in QSingleShotTimer::event ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#30 0x40cec8aa in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#31 0x40cec6b7 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#32 0x40998ebf in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#33 0x40cc6b55 in QEventLoop::activateTimers ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#34 0x40caa54d in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#35 0x40cfcc50 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#36 0x40ceca96 in QApplication::enter_loop ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#37 0x081bbcac in KMKernel::cleanup (this=0xbffff2cc) at kmkernel.cpp:740
#38 0x081bf1dd in main (argc=7, argv=0xbffff594) at main.cpp:352
#39 0x412ee7ee in __libc_start_main () from /lib/libc.so.6

["kmail.2.bt" (text/plain)]

[New Thread 1024 (LWP 31430)]
0x41379099 in wait4 () from /lib/libc.so.6
#0  0x41379099 in wait4 () from /lib/libc.so.6
#1  0x413f18e4 in __DTOR_END__ () from /lib/libc.so.6
#2  0x41236177 in waitpid () from /lib/libpthread.so.0
#3  0x409fb5ae in KCrash::defaultCrashHandler ()
   from /opt/kde3/lib/libkdecore.so.4
#4  0x41233bc4 in pthread_sighandler () from /lib/libpthread.so.0
#5  <signal handler called>
#6  0x41337818 in fflush () from /lib/libc.so.6
#7  0x0815a592 in KMMsgDict::touchFolderIds (this=0x83cd478, folder=0x864dca0)
    at kmmsgdict.cpp:121
#8  0x0812d321 in KMFolder::touchMsgDict (this=0x864dca0) at kmfolder.cpp:1423
#9  0x081abc99 in KMFolderMaildir::close (this=0x864dca0, aForced=false)
    at kmfoldermaildir.cpp:207
#10 0x080f845c in KMHeaders::setFolder (this=0x84f7bf0, aFolder=0x838d388, 
    jumpToFirst=false) at kmheaders.cpp:843
#11 0x080aaead in KMMainWin::folderSelected (this=0x83693a8, 
    aFolder=0x838d388, jumpToUnread=false) at kmmainwin.cpp:1594
#12 0x080aab8c in KMMainWin::folderSelected (this=0x83693a8, aFolder=0x838d388)
    at kmmainwin.cpp:1543
#13 0x080a321f in KMMainWin::qt_invoke (this=0x83693a8, _id=76, _o=0xbfffe7e4)
    at kmmainwin.moc:455
#14 0x40d35554 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#15 0x080eec7b in KMFolderTree::folderSelected (this=0x8372128, t0=0x838d388)
    at kmfoldertree.moc:205
#16 0x080ebc23 in KMFolderTree::doFolderSelected (this=0x8372128, 
    qlvi=0x85134e0) at kmfoldertree.cpp:781
#17 0x080eef6f in KMFolderTree::qt_invoke (this=0x8372128, _id=108, 
    _o=0xbfffe904) at kmfoldertree.moc:263
#18 0x40d355f5 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#19 0x40f9fc76 in QListView::currentChanged ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#20 0x40de15de in QListView::setCurrentItem ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0x40dddf95 in QListView::contentsMousePressEventEx ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0x40ddd8a3 in QListView::contentsMousePressEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0x40819927 in KListView::contentsMousePressEvent ()
   from /opt/kde3/lib/libkdeui.so.4
#24 0x40e01ec7 in QScrollView::viewportMousePressEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#25 0x40e017db in QScrollView::eventFilter ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0x40ddd5d1 in QListView::eventFilter () from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0x080eea8b in KMFolderTree::eventFilter (this=0x8372128, o=0x85244a8, 
    e=0xbfffef20) at kmfoldertree.cpp:1446
#28 0x40d33448 in QObject::activate_filters ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#29 0x40d33301 in QObject::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#30 0x40d5f1d5 in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#31 0x40cec8aa in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#32 0x40cec11e in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#33 0x40998ebf in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#34 0x40c9bd3b in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#35 0x40c99f99 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#36 0x40ca9ffa in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#37 0x40cfcc50 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#38 0x40cfcb97 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#39 0x40ceca26 in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#40 0x081bf1d2 in main (argc=7, argv=0xbffff594) at main.cpp:349
#41 0x412ee7ee in __libc_start_main () from /lib/libc.so.6

_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic