Bug 69515

Summary: kmail crash when trying to enter imap folder for which kmail shows wrong message count
Product: [Applications] kmail Reporter: eekaikko
Component: IMAPAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash CC: brian.overstreet
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: backtrace

Description eekaikko 2003-12-02 18:33:31 UTC
Version:            (using KDE KDE 3.1.93)
Installed from:    RedHat RPMs

For some imap folders kmail shows wrong message count (total) and won't update it right even with Check Mail In. If I then try to enter that folder by clicking it kmail crashes. I tried it with test message: kmail didn't crash at first time - it went to folder and showed the message - but after that, when it had crashed by entering another folder and I had restarted it, it crashed by the test folder.

The server gives e.g 5 EXISTS for "received" folder when I try it with server machine's imapd, but kmail stubbornly shows 17 in "Total" column. Entering that folder crashes kmail. I have used other clients also, e.g. pine - maybe that confuses kmail?

I will add a backtrace, but it is not much. Kmail receives signal 11.
Comment 1 eekaikko 2003-12-02 18:34:35 UTC
Created attachment 3521 [details]
backtrace
Comment 2 eekaikko 2003-12-02 19:02:53 UTC
I looked at kmail's config directory .Server.directory.

It has file XXX (the test folder I told about). It has header part of one message, which is right. Kmail shows "-" and "-" in unread and total columns. Entering the folder crashes kmail.

File "received" has only one message, but there are really 5 messages in the server and kmail shows it has 17. Entering the folder crashes kmail.

Checking mail or compacting doesn't change anything.

The connection uses SSL.
Comment 3 Dirk Mueller 2003-12-03 02:38:52 UTC
to get rid of the problem (but this destroys debugging): delete the
index files in 

.kde/share/apps/kmail/imap/.imap.directory/.INBOX.directory/{folder}*
Comment 4 eekaikko 2003-12-03 08:58:47 UTC
Subject: Re:  kmail crash when trying to enter imap folder for
 which kmail shows wrong message count

> to get rid of the problem (but this destroys debugging): delete the
> index files in
>
> .kde/share/apps/kmail/imap/.imap.directory/.INBOX.directory/{folder}*

It doesn't help:

[eeli@val030 .INBOX.directory]$ ls -a
.  ..
[eeli@val030 .INBOX.directory]$

so it is empty already but kmail still crashes. But kmail just got this
new message correctly in "bughunting" directory. And IIRC I handled the
crashing folders with pine (moved messages or even created a folder). I
think it really might have something to do with that. I'll examine that
if needed and if I got time.

Comment 5 Ingo Klöcker 2003-12-03 10:29:35 UTC
The backtrace is indeed useless, so there's probably not much we can do unless you find out how to reproduce. In order to make KMail work again you should remove the IMAP account, exit KMail, restart KMail, re-add the IMAP account.

Did you change the folders with Pine on the IMAP server? If yes, then this shouldn't have any influence (at least in theory).
Comment 6 Till Adam 2004-02-28 10:57:18 UTC
Closing. Without additional information and a way to reproduce the bug there is little we can do.
Comment 7 Brian Overstreet 2009-02-14 01:40:28 UTC
I had this same issue using kmail 1.10.4.  To fix the crashing without resetting the entire account, I deleted the .index and .index.ids files for the folder that was causing the problem.