Closed Bug 384819 Opened 17 years ago Closed 16 years ago

IMAP: Interrupted downloads of attachments leave the message cache in a broken state

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 386514

People

(Reporter: whop_go, Unassigned)

Details

User-Agent:       Opera/9.21 (Windows NT 5.1; U; de)
Build Identifier: Version 2.0.0.4 (20070604)

When I receive an email with a "large" attachment (say >1 MB) and I open the folder it was delivered to, Thunderbird begins to download the message and its attachment(s). --> I see the small progress bar in the bottom right area.

If I am eager to read the message (or don't pay attention to the progress bar) and click on the message WHILE it is still downloading, the attachment will be broken! Apparently, Thunderbird stops downloading attachments as soon as I try to open the message, so not the whole message is downloaded. 

In most of the cases, the message itself is displayed correctly (as it is only a few bytes). But clicking on an attachments brings message from the applications (Adobe Reader, OpenOffice...) that the document cannot be opened because the file is corrupt.

If I open the message source I see that the MIME message is simple trucated at some point. Example:

E-Mail (correct)          E-Mail (corrupt)
- Header                  - Header
- Text                    - Text
  Text                      Text
  Text                      Text
- Attachment 1 [details] [diff]            - Attachment 1 [details] [diff]
  Attachment 1 [details] [diff]              Attachment 1 [details] [diff]
  Attachment 1 [details] [diff]
- Attachment 2 [details] [diff]
  Attachment 2 [details] [diff]

If I wait long enough before opening the message (or if it is small enough to open before I clicked, which is the case with normal text-messages and small attachments) the problem does not exist.

If I got the Thunderbird profile folder and delete the message cache ("Mailbox" and "Mailbox.msf") and restart Thunderbird, the problem goes away (Folder is re-read).

This applies to IMAP-Servers (I think it's a linux server with courier-imap).

Reproducible: Always

Steps to Reproduce:
1. Open Thunderbird and select the "Trash" Folder (or any other folder new messages are NOT delivered to)
2. Send yourself a message with a large attachment
3 [review]. When the message arrives open the folder where it was delivered into and QUICKLY click on the message to open it.
Actual Results:  
The downloading of the attachment is interrupted and the file is corrupt. CTRL+U shows that the MIME-message is simpyl truncated at some point.

Expected Results:  
Downloading should not be interrupted by opening messages or folders.

It would already help if there would be a "force download of this message" or "refresh folder" command somewhere in the menus. It is VERY tedious to close Thunderbird, open explorer, locate the Thunderbird profile, delte the cache files, re-open Thunderbird and read in again the IMAP folder.
folder | properties | rebuild index will force us to redownload the message headers and bodies.

Are we downloading the message bodies when we get the headers because we're doing the junk filters, or you've told Thunderbird to automatically download message bodies for offline use?

Are you just selecting the message so that it appears in the 3-pane ui, or double clicking so that it opens in its own message window?
I am not using offline mode and I have no filters. As a matter of fact, I think I use the "standard" Thunderbird settings, I have not changed much.

I am selecting the message to show it in the 3-pane "preview" window (not double click).

Thanks for the hint for the "rebuild index" button! I did not knew it until now. I will try it next time. (If this works, the bug is no longer critical; it is an acceptable work-arround.)
If you have file called Mailbox along with one called Mailbox.msf, then you have configured the Mailbox folder for offline use - we don't create "Mailbox" for an IMAP folder unless it's configured for offline use, or you have it set up such that all folders are configured for offline use - that's slightly different from "offline mode" - that's what we do in order for you to use the folder offline.
Status: UNCONFIRMED → NEW
Ever confirmed: true
> If I am eager to read the message (or don't pay attention to the progress bar)
> and click on the message WHILE it is still downloading,
> the attachment will be broken!

Sounds to be same problem as Bug 386514, and Bug 386514 has been fixed.
(According to Bug 386514 Comment #3 by David, it's called pseudo-interruption)

To Mike van Haaven(bug opener):
Is your problem still re-produced with latest-trunk?
If problem still remains, get IMAP protocol log and check real protcol level flow. See Bug 402793 Comment #1 for getting IMAP protocol log.
(In reply to comment #2)
> I am not using offline mode

Not "offline *mode*" of Tb's behaviour. 
"offline-use" or "non-offline-use" option of IMAP folder. 
(no need to enter in "offline *mode*)

If problem when "non-offline-use", Bug 386514 is already fixed(verified1.8.1.5).
If problem when "offline-use" and even after fix of Bug 386514, Bug 405440 is already fixed(fixed1.8.1.12).

Since no response for 3 months(no IMAP log by bug opener yet), closing as DUP of Bug 386415. 
Reporter, re-open bug if problem still occur, please.
    
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.