Closed Bug 82461 Opened 24 years ago Closed 24 years ago

Offline: Crash in this case sending msg with inaccessible web page

Categories

(MailNews Core :: Composition, defect, P1)

All
Windows 98
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: laurel, Assigned: bugzilla)

Details

(Keywords: crash, Whiteboard: [nsbeta1+] Fix in hand)

Attachments

(3 files)

Using may23 commercial build This is probably just an extended circumstance of bug 82460, but thought I'd log it separately since it crashes and involves certain other steps. Steps: 1. Go to mail window, login to (IMAP) account. 2. Go offline, don't download. 3. New Msg, type addressee, subject, body text. 4. File|Attach Web Page. Type a url (valid or bogus) in the text field, OK. URL appears in the attachment list. 5. Select the url in the attachment list and press delete on your keyboard. Attachment entry is deleted. 6. File|Attach Web Page. Type a (valid or bogus) url which is inacessible/not cached in the text field. URL appears in attachment list. 7. Click Send(Later). Crashes. Result: crash.
Keywords: nsbeta1
Summary: Offline: Crash in this case sending msg with inaccessible web page → Offline: Crash in this case sending msg with inaccessible web page
this isn't offline per se - it's message | send later which is part of message composition/sending. When you're offline, http urls just fail immediately. If the server was down, you'd fail as well.
Assignee: bienvenu → ducarroz
Component: Offline → Composition
Attached file talkback 30829289
Looks like the attachment handler get deleted but the url fetcher doesn't know about it. I think I'll have finally to convert nsMsgAttachmentHandler to an true XPCOM object.
Status: NEW → ASSIGNED
moving to 0.9.1. It seems like this would be reasonably easy to hit for an offline user. Are steps 4-5 necessary or is just step 6 sufficient?
Priority: -- → P1
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9.1
If you just delete the first attachment url then Send(Later) it saves to unsent fine, no crash, no hang. You have to do step 6.
Severity: major → critical
Keywords: crash
I have a fix
Whiteboard: [nsbeta1+] → [nsbeta1+] Fix in hand
Attached patch proposed fix, v1Splinter Review
The fix is to fully initialize the url fetcher before we call OpenURI. This use to work because OpenURI was never calling back the listener synchroulsy. It's not true anymore. This is a 100% safe fix.
I see this crash when replying to some message too, while being online!
r=varada But it is suprising that it was working for this long if this is the case:)
As long OpenURI return before OnStartRequest or OnStopRequest are called, we are OK.
who else calls nsURLFetcher::Initialize()? if no one else, you can remove the checks to see if fOut is non-null and open, since you're already doing that at the start of FileURLRequest(). no need to do it again. then, you can fix the return type to be void. if someone else calls nsURLFetcher::Initialize(), there might be other problems. if fOut is null or if the stream isn't open, mOutStream, TagData and mCallBack will not be initialized. is that what you want?
There is a path in nsMsgAttachmentHandler::SnarfMsgAttachment where instead of calling nsURLFetcher::FireURLRequest, we call messageService->DisplayMessage. In this case, we have to call manually nsURLFetcher::Initialize. Anyway, I can cleanup nsURLFetcher::FireURLRequest to address Seth concern. New patch coming soon...
Attached patch proposed fix, v2Splinter Review
a= asa@mozilla.org for checkin to 0.9.1
Fixed and checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
adding lrg to cc. please verify for gchan.
Verified in Windows with 2001060408 build Verified in Linux with 2001060411 build Verified in MacOS with 20010600408 build
Status: RESOLVED → VERIFIED
Keywords: vtrunk
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: