Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux) OS: Linux This is probably due to stupid-user-behaviour, but it crashes kmail. Scenario: I'm setting up my first ever imap setup. I've created a mailbox and I can view the contents and check for new mail using KMail. I've created a few sub-folders to that mailbox, successfully, too. Then I tried to create a new subfolder of the top level imap account folder. I get a dialog back saying "Could not make directory imap://will@localhost:143/unnamed", but a subfolder appears there under KMail anyway. Nothing is created on the imap server, of course. If I try to delete the folder in KMail, it crashes KMail. If I quit and restart KMail, this little orphan folder doesn't come back. Backtrace: #3 <signal handler called> #4 0x081c0aa9 in KMFolderImap::removeOnServer() (this=0x84647d8) at /home/will/projects/kde/src/kdepim/kmail/kmfolderimap.cpp:149 #5 0x08224821 in KMMainWidget::slotRemoveFolder() (this=0x84647d8) at /home/will/projects/kde/src/kdepim/kmail/kmmainwidget.cpp:946 #6 0x0821f4ad in KMMainWidget::qt_invoke(int, QUObject*) (this=0x84647d8, _id=80, _o=0xbfffdd60) at kmail/kmmainwidget.moc:465 Let me know if you want any more of the bt, but AFAICS it's just the signal firing from me rightclicking in the listview and getting the context menu up. I think the problem lies in the create subfolder code that creates an LVI even when the server operation failed. Will
It also crashes if you just leave it standing there on the next mailcheck. Seems imap specific.
*** Bug 66328 has been marked as a duplicate of this bug. ***
Subject: kdepim/kmail CVS commit by tilladam: If creating a folder on an imap server fails make sure the already created folder in the foldertree is removed and guard against crashing when the non existing folder is mailchecked before it can be removed. CCMAIL: 65954-done@bugs.kde.org M +7 -1 kmacctimap.cpp 1.144 M +2 -0 kmfolderimap.cpp 1.143 --- kdepim/kmail/kmacctimap.cpp #1.143:1.144 @@ -114,6 +114,12 @@ void KMAcctImap::slotSlaveError(KIO::Sla KIO::buildErrorString(errorCode, errorMsg)); mErrorDialogIsActive = false; - } else + } else { kdDebug(5006) << "suppressing error:" << errorMsg << endl; + } + if ( errorCode == KIO::ERR_COULD_NOT_MKDIR ) { + // Creating a folder failed, remove it from the tree. + if ( mFolder ) + mFolder->listDirectory( ); + } } --- kdepim/kmail/kmfolderimap.cpp #1.142:1.143 @@ -1363,4 +1363,6 @@ void KMFolderImap::slotSetStatusResult(K void KMFolderImap::processNewMail(bool) { + // a little safety + if ( !mAccount ) return; KURL url = mAccount->getUrl(); if (mReadOnly)