[EDGY] mozilla-thunderbird crashed [@nsSaveMsgListener::OnStopRequest] [@bridge_create_stream] [@nsMsgProtocol::OnStopRequest]

Bug #90410 reported by timski
6
Affects Status Importance Assigned to Milestone
mozilla-thunderbird (Ubuntu)
Invalid
Undecided
Unassigned
thunderbird (Ubuntu)
Invalid
High
Mozilla Bugs

Bug Description

Binary package hint: mozilla-thunderbird

... Crash on email save as, with attachment error

Open an old email. File - Save As - File. Name and save (separate partition, albeit on same physical disk). Thunderbird crashes after an error box with words to the effect of "failed to save attachment". The email in question had no attachment. This error cannot be reproduced: Restarting and saving the same email again worked perfectly.

Edit: As noted below, the cause appears to be a filename with a colon in it, saved onto a FAT32 disk. Thunderbird normally finds and removes prefixes such as "Re: " and "Fw: ", but sometimes fails - particularly where these are nested ("Re: Fw: ...") or where colons have been used around other text (eg "xxx : xx...").

Revision history for this message
timski (tim-ski) wrote :
Revision history for this message
timski (tim-ski) wrote :

More information:

Precise error message is "Unable to save the attachment. Please check your file name and try again later." The error occurs when committing the save. After "OK-ing" the error box, the UI for Thunderbird becomes unresponsive and a second later, the application crashes.

The trigger may be two emails with identical subject field and sender in the same inbox. The emails have different contents. Plus one has been forwarded, while the other has been replied to. These are the only two emails to have so far triggered the crash.

Full crash report for the second crash attached.

Revision history for this message
timski (tim-ski) wrote :

All the suspect emails feature a colon (":") somewhere in the subject field. By default I use the start of the subject field for the text file name, so many files have a colon in them. If I name a suspect email without the colon (all other characters unchanged), the save works perfectly, and Thunderbird does not crash. So perhaps it has something to do with colon in the file name? But there must be another factor, since many subject fields contain a colon.

Revision history for this message
timski (tim-ski) wrote : Cause

So... after this long sequence of random thoughts, I finally arrived at the cause, which had (as ever) been staring me in the face since the outset:

The ext3 partition that Thunderbird is running from is capable of supporting a colon in the file name. But the FAT32 partition (where I am trying to save the files) doesn't allow a colon in the name. I believe the Windows version of Thunderbird automatically converts the colon to an underscore when the file system didn't support the character, and this presumably needs to happen here too.

The bug none the less remains. Thunderbird should not just crash when presented with a bad user input.

Revision history for this message
Jamie Fox (ubuntu-jpfox) wrote : Re: Crash on email save as, with attachment error

Thanks for your bug report. On Feisty (Thunderbird 1.5.10 20060305) saving an email containing a colon in the filename fails silently if the file cannot be written. Good detective work too; this would have been much more difficult to diagnose from your initial report!

Changed in mozilla-thunderbird:
assignee: nobody → ubuntu-jpfox
status: Unconfirmed → Confirmed
timski (tim-ski)
description: updated
Revision history for this message
Jamie Fox (ubuntu-jpfox) wrote :

With a fresh profile, both the current Feisty and upstream (20070305, last message was a typo) versions display an error and do not crash. It only fails silently in the Feisty version when using my normal profile, which I don't want to touch with the upstream version, just in case.

Revision history for this message
Jamie Fox (ubuntu-jpfox) wrote :

After further investigation, it turns out that the problem was not profile-related. When saving a message from a local folder, an error message is shown as expected. When saving a message from an IMAP folder, it fails silently.

Revision history for this message
Jamie Fox (ubuntu-jpfox) wrote :

Status set to 'fix released' because I believe that this has been fixed in Feisty, but I haven't verified the bug is reproducible in Edgy.

Changed in mozilla-thunderbird:
assignee: ubuntu-jpfox → nobody
status: Confirmed → Fix Committed
Revision history for this message
John Vivirito (gnomefreak) wrote :

Please leave this set to needs info, We will look at this as soon as we can.

Changed in mozilla-thunderbird:
assignee: nobody → mozilla-bugs
status: Fix Committed → Needs Info
Changed in mozilla-thunderbird:
importance: Undecided → Medium
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote : Retraced Stacktrace

Retrace done.

Extract from retraced stacktrace:
...
#0 nsSaveMsgListener::OnStopRequest (this=0x8df3d40,
#1 bridge_create_stream (newEmitter=0x8146fb0,
#2 nsMsgProtocol::OnStopRequest (this=0x84e3c68,
#3 nsMailboxProtocol::OnStopRequest (this=0x84e3c68,
#4 nsInputStreamPump::GetName (this=0x8e22b20,
#5 nsInputStreamPump::QueryInterface (this=0x8e22b20,
#6 ~nsPipeEvents (this=0x8dd61d8) at nsPipe3.cpp:589
#7 nsNativeComponentLoader::DumpLoadError (this=0x8dd61dc,
#8 nsNativeComponentLoader::SelfRegisterDll (this=0x8e20128,
#9 nsDll::GetModule (this=0x80f4320, servMgr=0x8194b38,
...
Tagging as mt-confirm mt-needtestcase for further processing

description: updated
Changed in mozilla-thunderbird:
importance: Medium → High
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote : Retraced Thread Stacktrace

Retraced Thread Stacktrace

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Is this still an issue for you? We are trying to sort this issue and would like to know if this still happens.

Thanks in advance.

Revision history for this message
timski (tim-ski) wrote :

Bug persists with Thunderbird 2.0.0.0 (20070326) on Ubuntu 7.04. Bespoke install, since Ubuntu 7.04 ships with Thunderbird 1.x.

Precise steps to recreate:

1. Take the email feedback from this bug, title - "[Bug 90410] Re: [EDGY] mozilla-thunderbird crashed [@nsSaveMsgListener::OnStopRequest] [@bridge_create_stream] [@nsMsgProtocol::OnStopRequest]" - this contains sufficient colons to trigger it.

2. Open the email. File - Save As - File.

3. Select a FAT 32 disk.

4. Change the .eml extension in the suggested filename to .txt. If you leave the default .eml extension, the save will fail, but the software will not crash. Changing the file type in the lower part of the screen makes no difference.

5. Error message, "Unable to save attachment. Please check your file name and try again."

6. Press OK and Thunderbird crashes.

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Thank you timski for your feedback.

> 3. Select a FAT 32 disk.
Is that caused because of the colon ':', as you stated in your previous messages?

Waiting for a tester (I actually can't do the test) to confirm your test case.

Thank you.

Revision history for this message
Alexander Sack (asac) wrote :

timski, how is your fat partition mounted. Please provide the output of running

 # mount

Thanks,

 - Alexander

Revision history for this message
timski (tim-ski) wrote :

From # mount: "/dev/hda4 on /media/hda4 type vfat (rw,utf8,umask=007,gid=46)" It is a primary partition, about 100GB in size.

It seems that Ext3 (where Thunderbird is installed) supports colons in filenames, while FAT32 does not. That's the root of the problem.

I'd hypothesis this:

1. The filename sanity check that exists in Windows Thunderbird (automatically replacing illegal characters in the suggested filename) doesn't correct enough bad characters under Linux. That leads the application to suggest a filename that will never work.

2. So, the user manages to fall through a hole that the original programmer presumably thought they had adequately protected against. The error message clearly isn't designed to catch this particular error - it refers to an attachment, when I'm trying to save the text of an email.

3. Then, when presented with a .txt extension, something goes badly wrong with the error handling and Thunderbird crashes to desktop. The crash seems to be specific to the .txt extension: .eml, .html, or no extension, all fail without a crash.

Revision history for this message
Alexander Sack (asac) wrote :

closing old crash bugs that didnt receive duplicates recently.

Changed in thunderbird:
status: Incomplete → Invalid
Changed in mozilla-thunderbird:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.