Bug 149715 - Some messages have blank body and appear as unread
Summary: Some messages have blank body and appear as unread
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: SVN trunk (KDE 4)
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 151580 153293 158126 159883 160641 161884 162351 163481 166641 166823 167070 168079 168520 168541 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-09 21:41 UTC by
Modified: 2008-09-02 21:32 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 2007-09-09 21:41:37 UTC
Version:           1.9.7 (using KDE 3.5.7, Mandriva Linux release 2007.1 (Official) for x86_64)
Compiler:          Target: x86_64-mandriva-linux-gnu
OS:                Linux (x86_64) release 2.6.22-3mde

Im using kdepim svn release 709896 (branch_3.5) and in kmail continues appearing (time to time) messages with blank body but this messages have sender, subject and date appearing ok, also this message continues appearing as new message even after being clicked.

Also when double clicking or pressing enter key, the message doesnt open (doesnt appear in new window), its only possible to see the message body if the message is "copied" to another folder since simply isnt also possible to move the message, if clicking to move it nothing happens, also if clicking to move the message to trash nothing happens, so after copying the message to another folder, in that other fodler the message appears ok, but it continues appearing the message with blank body in the default incoming folder.

The only way to remove the message with blank body is only possible after moving the copied message from the folder from where was copied to the default incoming folder and then click in "Folder"->"Remove Duplicated Messages", then the message with blank body is finally removed.
Comment 1 Thomas McGuire 2007-09-20 20:20:14 UTC

*** This bug has been marked as a duplicate of 135904 ***
Comment 2 2007-09-21 01:02:10 UTC
This isnt a duplicate since here im also reporting that isnt possible to erase, (or at least is only possible after a big and weird workaround), maybe the title of the buf report could be changed?
Comment 3 Thomas McGuire 2007-11-01 20:07:43 UTC
*** Bug 151580 has been marked as a duplicate of this bug. ***
Comment 4 Luigi 2007-11-05 17:24:02 UTC
I do confirm the same issue with Kmail 1.9.7 and Kubuntu 7.10.

Blank messages.

Especially I see that for messages that I imported from other softwares (outlook express) many years ago but that were ok till the last kmail update.  

My guess is: issues with header from different softwares and/or old messages (1999 and earlier).
Comment 5 Thomas McGuire 2007-12-02 20:39:25 UTC
*** Bug 153293 has been marked as a duplicate of this bug. ***
Comment 6 David 2008-01-23 18:41:48 UTC
I can confirm this with KMail 1.9.7 (Mandriva 2008.0)
Comment 7 David 2008-01-23 18:44:42 UTC
Where is this "Remove Duplicated Messages" button?
Comment 8 David 2008-01-24 10:31:58 UTC
Never mind, I found the "Remove Duplicated Messages" button. I was looking in the wrong place, I was right clicking the incoming folder, but it's in the "Folder" menu in the menubar.
Comment 9 Thomas McGuire 2008-02-27 21:35:28 UTC
*** Bug 158126 has been marked as a duplicate of this bug. ***
Comment 10 Dario Panico 2008-02-27 21:41:40 UTC
*** This bug has been confirmed by popular vote. ***
Comment 11 Thomas McGuire 2008-03-22 19:10:42 UTC
Confirmed with POP3/maildir on trunk.
Comment 12 2008-03-22 19:36:25 UTC
Well this bug its not only for kde4 (from trunk) since this continues happening in kde-3.5.9

In kmail i just got message in wich the body appears totally blank, however the fields From, Subkect, Date and Size are displayed.

Whats also very strange is that i cant simply delete this message, neither its possible to move it to trash or any other folder.

Dont know what else to do to remove it!
Comment 13 Thomas McGuire 2008-03-31 01:18:35 UTC
*** Bug 159883 has been marked as a duplicate of this bug. ***
Comment 14 John Mullen 2008-04-01 02:08:35 UTC
This bug existed in Suse 10.1, 10.2 and 10.3. It can occur with any incoming message regardless or the source, e.g. from the localhost.  It also only affects messages in local folders. I have not had it happen to messages in imap folders. 

Comment 15 Ashley J Gittins 2008-04-01 06:47:57 UTC
I have seen this on imap accounts also. I have seen most variations - mail that will show as unread, mail that shows no content at all, and those that show some headers only and no body. Some that stay new and won't delete or move, then kmail crashes after madly clicking around different emails. My gut says that this all points to an unreliable indexing method in kmail that gets corrupted easily, but they could well all be distinct bugs.

I usually find that deleting the index files from kmail's local store for the inbox will usually clear things up for a week or so (ie, ~/.kde/share/apps/kmail/imap/.<<acctId>>.directory/.INBOX.index* )
Comment 16 Thomas McGuire 2008-04-14 00:33:56 UTC
*** Bug 160641 has been marked as a duplicate of this bug. ***
Comment 17 Thomas McGuire 2008-04-22 21:09:16 UTC
> Confirmed with POP3/maildir on trunk.
Unfortunately I can't reproduce this on my home computer, whereas the laptop in Berlin had a few messages with that problem :(
Comment 18 Thomas McGuire 2008-05-16 19:31:14 UTC
*** Bug 161884 has been marked as a duplicate of this bug. ***
Comment 19 Thomas McGuire 2008-05-20 17:23:54 UTC
*** Bug 162351 has been marked as a duplicate of this bug. ***
Comment 20 Thomas McGuire 2008-06-07 21:27:14 UTC
*** Bug 163481 has been marked as a duplicate of this bug. ***
Comment 21 Dario Panico 2008-06-24 22:43:29 UTC
pop3 and kmail 1.9.52 it happened again!
Comment 22 Dario Panico 2008-06-25 13:40:40 UTC
"Rebuild index" in the context menu of the folder solved the issue: the body message appeared and it was possible to delete the message which i've done.
In turn it made a big mess with dates
Comment 23 Xavier Brochard 2008-06-30 18:36:44 UTC
Similar problem here on a pop account (KDE 3.58, Ubuntu 7.04 i386). 
The strange is that there is 5 user on the computer (it is an LTSP setup), all using pop accounts with the same provider, and the bug occurs only for one user.
Comment 24 Thomas McGuire 2008-07-15 21:16:22 UTC
*** Bug 166641 has been marked as a duplicate of this bug. ***
Comment 25 Thomas McGuire 2008-07-17 12:57:44 UTC
*** Bug 166823 has been marked as a duplicate of this bug. ***
Comment 26 Thomas McGuire 2008-07-20 14:56:39 UTC
*** Bug 167070 has been marked as a duplicate of this bug. ***
Comment 27 Juha Tuomala 2008-07-24 20:03:12 UTC
I see this quite often too. x86_64, kmail 1.9.9 KDE 3.5.9-5.fc8,
Fedora box. All two accounts are imap connections. I see 
QGArray::at: Absolute index 232 out of range
QGArray::at: Absolute index 232 out of range

in stdout every time i try to move a such message. Some messages open 
just fine and i can also move them, some don't. If i try to open source
view with 'v', it's the same empty body. Alpine i can confirm that message
is okay and has a body.

I've a feeling that this is caused by out-of-sync imap cache.
Comment 28 Thomas McGuire 2008-07-24 22:10:46 UTC
OK, since I can't reproduce it, I need some help to reproduce it.

Can someone who has that problem with a local maildir folder do the following:

1. Move all messages except the broken one into another folder (so the testcase data is small)
2. Mail me (or attach it to the bugreport) the folder. This should contain
    - All index files
    - The maildir folders

   As an example: I have a folder inbox/Amazon. The files I need for that    
   example would be:
   $HOME/.kde4/share/apps/kmail/mail/.inbox.directory/.Amazon.index
   $HOME/.kde4/share/apps/kmail/mail/.inbox.directory/.Amazon.index.ids
   $HOME/.kde4/share/apps/kmail/mail/.inbox.directory/.Amazon.index.sorted
   $HOME/.kde4/share/apps/kmail/mail/.inbox.directory/Amazon (the whole directory. Note that this includes the cur/ subdirectory, which holds the actual mail).

Again, only if you have a broken mail in a local maildir folders, with the symptoms described here (blank when viewing it, unable to delete it, etc)

I can not promise that I can fix the bug (I might not even be able to reproduce it).
   
Comment 29 George Kiagiadakis 2008-07-24 22:39:19 UTC
Strange, but after receiving some more email messages on my inbox, the faulty mail now appears correctly!!! That is really odd. I can't reproduce anymore :(
Comment 30 Juha Tuomala 2008-07-25 10:42:25 UTC
> I need some help to reproduce it.

I try to provide them when this happens next time, 
it's not something we can trigger to happen, it's 
like does sometimes...
Comment 31 Thomas McGuire 2008-08-02 11:47:30 UTC
*** Bug 168079 has been marked as a duplicate of this bug. ***
Comment 32 Thomas McGuire 2008-08-03 18:08:04 UTC
SVN commit 841594 by tmcguire:

Invalidate the folder when encountering a zero serial number.
I have still no idea why the serial number was zero in the first
place, but at least this fixes the problem that those messages
could not be displayed.

(Marc, sorry, but I re-enabled the debug output here)

BUG: 149715


 M  +13 -2     kmmsgdict.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=841594
Comment 33 Thomas McGuire 2008-08-04 22:58:16 UTC
SVN commit 842189 by tmcguire:

Backport r841594 by tmcguire to the 4.1 branch:

Invalidate the folder when encountering a zero serial number.
I have still no idea why the serial number was zero in the first
place, but at least this fixes the problem that those messages
could not be displayed.

(Marc, sorry, but I re-enabled the debug output here)

CCBUG: 149715



 M  +13 -2     kmmsgdict.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=842189
Comment 34 Thomas McGuire 2008-08-06 18:28:51 UTC
*** Bug 168520 has been marked as a duplicate of this bug. ***
Comment 35 Thomas McGuire 2008-08-20 17:52:17 UTC
*** Bug 168541 has been marked as a duplicate of this bug. ***
Comment 36 Manoloudis 2008-09-02 21:32:53 UTC
Yep
It's Fixed.
Congratulations!