Bug 152881 - Crash when attempting to remove IMAP account
Summary: Crash when attempting to remove IMAP account
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: enterprise
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 153338 154267 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-25 15:52 UTC by Jacob Wintersmith
Modified: 2007-12-18 21:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
this patch removes the problem (644 bytes, patch)
2007-12-18 14:12 UTC, Thorsten Staerk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Wintersmith 2007-11-25 15:52:39 UTC
Version:           1.9.6 (using KDE KDE 3.5.8)
Installed from:    Ubuntu Packages

I have an IMAP account I wish to delete. When I attempt to do so, Kmail reliably crashes immediately after I press the Ok/Apply button. Backtrace is pasted below.

(no debugging symbols found)
Using host libthread_db library "/lib/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)
[Thread debugging using libthread_db enabled]
[New Thread 47298916813728 (LWP 22425)]
[New Thread 1107310928 (LWP 22429)]
[New Thread 1098918224 (LWP 22428)]
[New Thread 1090525520 (LWP 22427)]
[New Thread 1082132816 (LWP 22426)]
(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)
[KCrash handler]
#5  0x0000000000000000 in ?? ()
#6  0x00002b0497bd9a0a in KMFolderMgr::removeFolderAux ()
   from /usr/lib/libkmailprivate.so
#7  0x00002b0497bd9b60 in KMFolderMgr::qt_invoke ()
   from /usr/lib/libkmailprivate.so
#8  0x00002b049e9a7d76 in QObject::activate_signal ()
   from /usr/lib/libqt-mt.so.3
#9  0x00002b0497b9d078 in KMFolder::removed ()
   from /usr/lib/libkmailprivate.so
#10 0x00002b0497b9e349 in KMFolder::qt_emit ()
   from /usr/lib/libkmailprivate.so
#11 0x00002b049e9a7d51 in QObject::activate_signal ()
   from /usr/lib/libqt-mt.so.3
#12 0x00002b0497bb98a8 in FolderStorage::removed ()
   from /usr/lib/libkmailprivate.so
#13 0x00002b0497bba5af in FolderStorage::remove ()
   from /usr/lib/libkmailprivate.so
#14 0x00002b0497c3fb58 in KMFolderImap::remove ()
   from /usr/lib/libkmailprivate.so
#15 0x00002b0497bd7b32 in KMFolderMgr::remove ()
   from /usr/lib/libkmailprivate.so
#16 0x00002b0497bd7b0a in KMFolderMgr::remove ()
   from /usr/lib/libkmailprivate.so
#17 0x00002b0497bd7b0a in KMFolderMgr::remove ()
   from /usr/lib/libkmailprivate.so
#18 0x00002b0497bd7b0a in KMFolderMgr::remove ()
   from /usr/lib/libkmailprivate.so
#19 0x00002b0497bd7b0a in KMFolderMgr::remove ()
   from /usr/lib/libkmailprivate.so
#20 0x00002b0497bd7b0a in KMFolderMgr::remove ()
   from /usr/lib/libkmailprivate.so
#21 0x00002b0497bd7b0a in KMFolderMgr::remove ()
   from /usr/lib/libkmailprivate.so
#22 0x00002b0497c6d4a7 in KMKernel::cleanupImapFolders ()
   from /usr/lib/libkmailprivate.so
#23 0x00002b0497b24de3 in AccountsPageReceivingTab::save ()
   from /usr/lib/libkmailprivate.so
#24 0x00002b0497b2ec9b in ConfigModuleWithTabs::save ()
   from /usr/lib/libkmailprivate.so
#25 0x00002b049b87060e in KCModuleProxy::save () from /usr/lib/libkutils.so.1
#26 0x00002b049b8707b6 in KCMultiDialog::apply () from /usr/lib/libkutils.so.1
#27 0x00002b049cc74956 in KDialogBase::qt_invoke ()
   from /usr/lib/libkdeui.so.4
#28 0x00002b049b86fd5d in KCMultiDialog::qt_invoke ()
   from /usr/lib/libkutils.so.1
#29 0x00002b0497b010b4 in ConfigureDialog::qt_invoke ()
   from /usr/lib/libkmailprivate.so
#30 0x00002b049e9a7e9f in QObject::activate_signal ()
   from /usr/lib/libqt-mt.so.3
#31 0x00002b049e9a8910 in QObject::activate_signal ()
   from /usr/lib/libqt-mt.so.3
#32 0x00002b049ed1e18f in QButton::clicked () from /usr/lib/libqt-mt.so.3
#33 0x00002b049ea429c3 in QButton::mouseReleaseEvent ()
   from /usr/lib/libqt-mt.so.3
#34 0x00002b049e9dc4c4 in QWidget::event () from /usr/lib/libqt-mt.so.3
#35 0x00002b049e9432a2 in QApplication::internalNotify ()
   from /usr/lib/libqt-mt.so.3
#36 0x00002b049e945400 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#37 0x00002b049d5cb248 in KApplication::notify ()
   from /usr/lib/libkdecore.so.4
#38 0x00002b049e8d5d84 in QApplication::sendSpontaneousEvent ()
   from /usr/lib/libqt-mt.so.3
#39 0x00002b049e8d498e in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#40 0x00002b049e8d2b5a in QApplication::x11ProcessEvent ()
   from /usr/lib/libqt-mt.so.3
#41 0x00002b049e8e943e in QEventLoop::processEvents ()
   from /usr/lib/libqt-mt.so.3
#42 0x00002b049e95c7e7 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#43 0x00002b049e95c5ef in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#44 0x00002b049e944d68 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#45 0x0000000000402eb4 in ?? ()
#46 0x00002b04a26b4b44 in __libc_start_main () from /lib/libc.so.6
#47 0x0000000000402c29 in ?? ()
#48 0x00007fff1345ceb8 in ?? ()
#49 0x0000000000000000 in ?? ()
Comment 1 Tommi Tervo 2007-12-03 13:06:13 UTC
*** Bug 153338 has been marked as a duplicate of this bug. ***
Comment 2 Marc Richter 2007-12-03 13:10:43 UTC
The same here. My BT:

(no debugging symbols found) 
 Using host libthread_db library "/lib/tls/i686/cmov/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) 
 [Thread debugging using libthread_db enabled] 
 [New Thread -1243023680 (LWP 2792)] 
 (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) 
 [KCrash handler] 
 #6  0x00000000 in ?? () 
 #7  0xb5095043 in KMFolderMgr::removeFolderAux () 
    from /usr/lib/libkmailprivate.so 
 #8  0xb50951b1 in KMFolderMgr::qt_invoke () from /usr/lib/libkmailprivate.so 
 #9  0xb6730893 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 
 #10 0xb5050c98 in KMFolder::removed () from /usr/lib/libkmailprivate.so 
 #11 0xb5051f9d in KMFolder::qt_emit () from /usr/lib/libkmailprivate.so 
 #12 0xb6730867 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 
 #13 0xb5070ba8 in FolderStorage::removed () from /usr/lib/libkmailprivate.so 
 #14 0xb5072562 in FolderStorage::remove () from /usr/lib/libkmailprivate.so 
 #15 0xb510525f in KMFolderImap::remove () from /usr/lib/libkmailprivate.so 
 #16 0xb504fbd0 in KMFolder::remove () from /usr/lib/libkmailprivate.so 
 #17 0xb5092b45 in KMFolderMgr::removeFolder () 
    from /usr/lib/libkmailprivate.so 
 #18 0xb50933d3 in KMFolderMgr::remove () from /usr/lib/libkmailprivate.so 
 #19 0xb50933a0 in KMFolderMgr::remove () from /usr/lib/libkmailprivate.so 
 #20 0xb50933a0 in KMFolderMgr::remove () from /usr/lib/libkmailprivate.so 
 #21 0xb513a434 in KMKernel::cleanupImapFolders () 
    from /usr/lib/libkmailprivate.so 
 #22 0xb513df1d in KMKernel::init () from /usr/lib/libkmailprivate.so 
 #23 0xb588c5e4 in KMailPart::KMailPart () from /usr/lib/kde3/libkmailpart.so 
 #24 0xb588daa8 in KParts::GenericFactory<KMailPart>::createPartObject () 
    from /usr/lib/kde3/libkmailpart.so 
 #25 0xb760f75f in KParts::Factory::createPart () from /usr/lib/libkparts.so.2 
 #26 0xb7e212ed in Kontact::Core::createPart () 
    from /usr/lib/libkpinterfaces.so.1 
 #27 0xb7e22a87 in Kontact::Plugin::loadPart () 
    from /usr/lib/libkpinterfaces.so.1 
 #28 0xb58b6795 in KMailPlugin::createPart () 
    from /usr/lib/kde3/libkontact_kmailplugin.so 
 #29 0xb7e229f2 in Kontact::Plugin::part () from /usr/lib/libkpinterfaces.so.1 
 #30 0x08062920 in ?? () 
 #31 0x0824e1e0 in ?? () 
 #32 0x00000000 in ?? () 


I started kontact, set up two imap Profiles with the mail-component, restarted kontact and tried to remove both profiles again. After confirming that by clicking OK, kontact crashed. When I try to restart it, it suddenly displays the Crash-Dialogue again. 
Comment 3 Tommi Tervo 2007-12-03 15:51:17 UTC
Be aware when testing this bug, I lost all emails :-(
I added second imap account to same server where my primary email account is and then I tried to delete that second account by highlighting it and pressing folder->delete folder. Kmail started to do something and then it displayed a message that cannot delete that folder. I pressed continue and then went to settings -> configure kmail -> accounts and removed second account. Then kmail purged my primary email folder.
Comment 4 Tommi Tervo 2007-12-18 13:15:20 UTC
*** Bug 154267 has been marked as a duplicate of this bug. ***
Comment 5 Thorsten Staerk 2007-12-18 13:20:14 UTC
I confirm this bug.
Comment 6 Thorsten Staerk 2007-12-18 13:55:18 UTC
And a backtrace WITH debugging symbols, for KDE 3.5 branch, looks like this:

System configuration startup check disabled.

[?1034hUsing host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb56d86d0 (LWP 30912)]
[New Thread 0xb3afeb90 (LWP 30916)]
[New Thread 0xb42ffb90 (LWP 30915)]
[New Thread 0xb4b00b90 (LWP 30914)]
[New Thread 0xb5301b90 (LWP 30913)]
[KCrash handler]
#6  0x00000000 in ?? ()
#7  0xb7c510db in KMFolderMgr::removeFolderAux (this=0x819d780, 
    aFolder=0x81ba8e8, success=true)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfoldermgr.cpp:370
#8  0xb7c51f47 in KMFolderMgr::qt_invoke (this=0x819d780, _id=4, _o=0xbfa33ea4)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfoldermgr.moc:255
#9  0xb5ea28ad in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#10 0xb7c0339b in KMFolder::removed (this=0x81ba8e8, t0=0x81ba8e8, t1=true)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfolder.moc:357
#11 0xb7c04185 in KMFolder::qt_emit (this=0x81ba8e8, _id=18, _o=0xbfa33f94)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfolder.moc:398
#12 0xb5ea28f1 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#13 0xb7c200d3 in FolderStorage::removed (this=0x81baac0, t0=0x81ba8e8, 
    t1=true) at /mnt/sdb1/root/svn/kdepim/kmail/folderstorage.moc:433
#14 0xb7c22fa9 in FolderStorage::remove (this=0x81baac0)
    at /mnt/sdb1/root/svn/kdepim/kmail/folderstorage.cpp:748
#15 0xb7cc36e5 in KMFolderImap::remove (this=0x81baac0)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfolderimap.cpp:237
#16 0xb7c02868 in KMFolder::remove (this=0x81ba8e8)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfolder.cpp:511
#17 0xb7c5127d in KMFolderMgr::removeFolder (this=0x819d780, aFolder=0x81ba8e8)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfoldermgr.cpp:342
#18 0xb7c51378 in KMFolderMgr::remove (this=0x819d780, aFolder=0x81ba8e8)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfoldermgr.cpp:335
#19 0xb7c51330 in KMFolderMgr::remove (this=0x819d780, aFolder=0x81b13b0)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfoldermgr.cpp:331
#20 0xb7c51330 in KMFolderMgr::remove (this=0x819d780, aFolder=0x819c0f8)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmfoldermgr.cpp:331
#21 0xb7cf0643 in KMKernel::cleanupImapFolders (this=0xbfa34db4)
    at /mnt/sdb1/root/svn/kdepim/kmail/kmkernel.cpp:1555
#22 0xb7b672c7 in AccountsPageReceivingTab::save (this=0x83cb2d8)
    at /mnt/sdb1/root/svn/kdepim/kmail/configuredialog.cpp:1447
#23 0xb7b7eecd in ConfigModuleWithTabs::save (this=0x83f8c58)
    at /mnt/sdb1/root/svn/kdepim/kmail/configuredialog_p.cpp:396
#24 0xb6d6a1bd in KCModuleProxy::save () from /opt/kde3/lib/libkutils.so.1
#25 0xb6d6a3ad in KCMultiDialog::apply () from /opt/kde3/lib/libkutils.so.1
#26 0xb6d6a63b in KCMultiDialog::slotApply () from /opt/kde3/lib/libkutils.so.1
#27 0xb7b70ae5 in ConfigureDialog::slotApply (this=0x83c82d0)
    at /mnt/sdb1/root/svn/kdepim/kmail/configuredialog.cpp:256
#28 0xb6849564 in KDialogBase::qt_invoke () from /opt/kde3/lib/libkdeui.so.4
#29 0xb6d69822 in KCMultiDialog::qt_invoke () from /opt/kde3/lib/libkutils.so.1
#30 0xb7b47dda in ConfigureDialog::qt_invoke (this=0x83c82d0, _id=75, 
    _o=0xbfa34524) at /mnt/sdb1/root/svn/kdepim/kmail/configuredialog.moc:113
#31 0xb5ea2811 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#32 0xb5ea344d in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#33 0xb61ddf7c in QButton::clicked () from /usr/lib/libqt-mt.so.3
#34 0xb5f358ad in QButton::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#35 0xb5edb6e4 in QWidget::event () from /usr/lib/libqt-mt.so.3
#36 0xb5e440ac in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#37 0xb5e44fd3 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#38 0xb6578a52 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#39 0xb5de34fa in QETWidget::translateMouseEvent () from /usr/lib/libqt-mt.so.3
#40 0xb5de22c6 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#41 0xb5df3070 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#42 0xb5e5ac30 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#43 0xb5e5aac6 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#44 0xb5e43c1f in QApplication::exec () from /usr/lib/libqt-mt.so.3
#45 0x0804adaf in main (argc=1, argv=0xbfa34f74)
    at /mnt/sdb1/root/svn/kdepim/kmail/main.cpp:110
Comment 7 Thorsten Staerk 2007-12-18 14:07:52 UTC
the function removeFolderAux is described as 
/** Called from KMFolder::remove when the folderstorage was removed */

However, the crash occurs when removeFolderAux tries to access the storage:

static_cast<KMFolder*>(parent)->storage()->updateChildrenState();
Comment 8 Thorsten Staerk 2007-12-18 14:12:39 UTC
Created attachment 22608 [details]
this patch removes the problem
Comment 9 Thorsten Staerk 2007-12-18 20:00:25 UTC
SVN commit 750129 by tstaerk:

Do not crash when deleting an imap account.
imap accounts can point to their uppermost folder recursively.
When deleting the folder's parent, first check it is not the folder
itself.
CCBUGS:152881


 M  +2 -1      kmfoldermgr.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=750129
Comment 10 Thorsten Staerk 2007-12-18 21:05:59 UTC
Problem does not exist in trunk -> closing.