Bug 56393 - kmail crashes when I try change the name of an imap account
Summary: kmail crashes when I try change the name of an imap account
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.5.1
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-25 18:02 UTC by Torquil Macdonald Sørensen
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
The KDE Crash Handler backtrace (4.15 KB, text/plain)
2003-03-25 18:03 UTC, Torquil Macdonald Sørensen
Details
Output from strace started just before clicking OK (108.31 KB, text/plain)
2003-03-25 18:05 UTC, Torquil Macdonald Sørensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torquil Macdonald Sørensen 2003-03-25 18:02:18 UTC
Version:           1.5.1 (using KDE 3.1.1)
Installed from:     (testing/unstable)
Compiler:          gcc version 3.2.3 20030309 (Debian prerelease)
OS:          Linux (i686) release 2.4.21-pre5

How to reproduce:

1)	In the kmail configuration, the network section, click on the "Receiving" tab to get a list of incoming accounts.

2)	Choose an imap account, and click on modify

3)	Change the value in the "Name" field in the window that appears. Click OK.

4)	Click OK to exit the Configuration Window.

After step 4) kmail crashes immediately and disappears, and then the "KDE Crash Handler" appears.
Comment 1 Torquil Macdonald Sørensen 2003-03-25 18:03:41 UTC
Created attachment 1242 [details]
The KDE Crash Handler backtrace
Comment 2 Torquil Macdonald Sørensen 2003-03-25 18:05:18 UTC
Created attachment 1243 [details]
Output from strace started just before clicking OK

I started strace just before clicking OK for the last time, and stopped it when
the Crash Handler appeared
Comment 3 Carsten Burghardt 2003-03-25 21:57:36 UTC
Subject: KDE_3_1_BRANCH: kdenetwork/kmail

CVS commit by burghard: 

Fix bug #56393, we had a dangling pointer.
CCMAIL: 56393-done@bugs.kde.org


  M +7 -4      kmacctimap.cpp   1.111.2.5
  M +1 -1      kmacctimap.h   1.49.2.2


--- kdenetwork/kmail/kmacctimap.cpp  #1.111.2.4:1.111.2.5
@@ -552,8 +552,11 @@ void KMAcctImap::slotSimpleResult(KIO::J
 void KMAcctImap::slotUpdateFolderList()
 {
+  if (mFolder && mFolder->child())
+  {
   QStringList strList;
   mMailCheckFolders.clear();
   kernel->imapFolderMgr()->createFolderList(&strList, &mMailCheckFolders,
     mFolder->child(), QString::null, false);
+  }
 }
 

--- kdenetwork/kmail/kmacctimap.h  #1.49.2.1:1.49.2.2
@@ -244,5 +244,5 @@ protected:
   KIO::MetaData mSlaveConfig;
   QPtrList<KMImapJob> mJobList;
-  KMFolderImap *mFolder;
+  QGuardedPtr<KMFolderImap> mFolder;
   int mCountUnread, mCountLastUnread;
   int mCountRemainChecks;