[Bug 113329] KMail crash on startup

Stephan Kulow <[email protected]>
Newsgroups gmane.comp.kde.devel.kmail
Message-ID <[email protected]>
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=113329         
coolo kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From coolo kde org  2007-03-21 08:08 -------
SVN commit 644877 by coolo:

Don't continue checking mail in the other folders when a local folder
was removed, it causes a crash on startup.

There is still a bug that local folders are removed erroneously because
their ImapPath somehow become empty, but at least they can be recovered
with Refresh Folder List now.

And as the crash is gone, I consider the bug fixed 
BUG:113329


 M  +3 -1      kmacctimap.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmacctimap.cpp #644876:644877
 @ -342,7 +342,7  @
         else {
           connect(imapFolder, SIGNAL(numUnreadMsgsChanged(KMFolder*)),
               this, SLOT(postProcessNewMail(KMFolder*)));
-          bool ok = imapFolder->processNewMail(interactive);
+          bool ok = imapFolder->processNewMail(interactive); // this removes the local kmfolderimap if its imapPath is somehow empty, and removing it calls createFolderList, invalidating mMailCheckFolders, and causing a crash
           if (!ok)
           {
             // there was an error so cancel
 @ -352,6 +352,8  @
               mMailCheckProgressItem->incCompletedItems();
               mMailCheckProgressItem->updateProgress();
             }
+            // since the list of folders might have been updated at this point, mMailCheckFolders may be invalid, so break
+            break;
           }
         }
       }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.