Closed Bug 76286 Opened 24 years ago Closed 24 years ago

crash with null mDocumentRequest in nsDocLoaderImpl::OnStopRequest

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: dbaron, Assigned: waterson)

Details

(Keywords: regression)

Attachments

(3 files)

About 5 times a day, I'm seeing a crash with a null mDocumentRequest in nsDocLoaderImpl::OnStopReqest. This has been happening for a few days now, although I just started getting stack traces today. I suspect this may be because of waterson's changes to nsDocLoader.cpp, which cause mDocumentRequest not to be set in OnStartRequest in some cases where it used to be set. It's hard to reproduce, though, so it's hard to tell for sure. But this crash is hitting me a lot. I'll attach the stack.
Attached file stack trace of crash (deleted) —
Heh. My changes cause mDocumentRequest to not be set unless, well, it's a document request! Anyway, I've run into this too. I'll attach a band-aid so we don't crash.
mscott, darin: the code I changed in nsDocLoader.cpp has caused a weird, debug-only regression. I'd like to add the following bullet-proofing code, as well as an assertion to catch what appears to be a strange case. Specifically, I'm asserting my assumption that the first request *must* be have the LOAD_DOCUMENT_URI flag set. Is this reasonable?
Status: NEW → ASSIGNED
Keywords: regression
Target Milestone: --- → mozilla0.9
Keywords: patch
welcome to the fun world of changing nsDocLoader where there's a 100% guaruntee you'll cause 1 regression for every change =). I think your assumption about the first on start request always being a document load is correct. I'm having a hard time coming up with a counter example. When you trip your assertion are you seeing the url that's currently being run?
I'll letcha know...
You're saying this crash is DEBUG-only? So it wouldn't explain all the crashes I've been seeing in my optimized build for which I didn't get stacks...
what if the page is just an image? from a middle-click on a <img> tag. wouldn't the request just be an imgRequest?
Ooops. Wrong bug!
darin/dbaron: could you r= me on this one? (I'm going to cound mscott as sr=)
r=dbaron. I won't worry about the extra copy since it's in debug code. Are you sure that NS_ASSERTION will catch the problem?
looks good to me too... r=darin
chofmann a='d this.
Thanks, fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Marking verified in the May 21 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: