Closed Bug 204935 Opened 21 years ago Closed 21 years ago

trunk topcrash [@ nsXULDocument::OnStreamComplete]

Categories

(Core :: XUL, defect, P1)

x86
Windows 2000
defect

Tracking

()

RESOLVED FIXED
mozilla1.4final

People

(Reporter: jcarpenter0524, Assigned: brendan)

Details

(Keywords: crash, fixed1.4, topcrash)

Crash Data

Attachments

(1 file)

nsXULDocument::OnStreamComplete   6 
Crash data range: 2003-05-02 to 2003-05-07
Build ID range: 2003050104 to 2003050708

Stack Trace: 

	 nsXULDocument::OnStreamComplete
[c:/builds/seamonkey/mozilla/content/xul/document/src/nsXULDocument.cpp  line 3341]
	 nsStreamLoader::OnStopRequest
[c:/builds/seamonkey/mozilla/netwerk/base/src/nsStreamLoader.cpp  line 144]
	 nsJARChannel::OnStopRequest
[c:/builds/seamonkey/mozilla/netwerk/protocol/jar/src/nsJARChannel.cpp  line 653]
	 nsCOMPtr_base::assign_with_AddRef
[c:/builds/seamonkey/mozilla/xpcom/glue/nsCOMPtr.cpp  line 71]
	 nsInputStreamPump::OnStateStop
[c:/builds/seamonkey/mozilla/netwerk/base/src/nsInputStreamPump.cpp  line 484]
	 nsInputStreamPump::OnInputStreamReady
[c:/builds/seamonkey/mozilla/netwerk/base/src/nsInputStreamPump.cpp  line 325]
	 nsInputStreamReadyEvent::EventHandler
[c:/builds/seamonkey/mozilla/xpcom/io/nsStreamUtils.cpp  line 117]
	 PL_HandleEvent	[c:/builds/seamonkey/mozilla/xpcom/threads/plevent.c  line 660]
	 PL_ProcessPendingEvents	[c:/builds/seamonkey/mozilla/xpcom/threads/plevent.c 
line 596]
	 _md_EventReceiverProc	[c:/builds/seamonkey/mozilla/xpcom/threads/plevent.c 
line 1396]
	 USER32.dll + 0x4455 (0x77d14455)
	 USER32.dll + 0x95d5 (0x77d195d5)
	 nsAppShellService::Run
[c:/builds/seamonkey/mozilla/xpfe/appshell/src/nsAppShellService.cpp  line 479]
	 main1	[c:/builds/seamonkey/mozilla/xpfe/bootstrap/nsAppRunner.cpp  line 1284]
	 main	[c:/builds/seamonkey/mozilla/xpfe/bootstrap/nsAppRunner.cpp  line 1650]
	 WinMain	[c:/builds/seamonkey/mozilla/xpfe/bootstrap/nsAppRunner.cpp  line 1672]
	 WinMainCRTStartup()
	 kernel32.dll + 0x214c7 (0x77e614c7)
 
 	Source File :
c:/builds/seamonkey/mozilla/content/xul/document/src/nsXULDocument.cpp line : 3341
     (19733496)	URL: www.thomson.com
Any relation to bug 107362?
Severity: normal → critical
I was able to reproduce this behavior on AIX in some instances, and found that
the following section of code was the culprit:

http://makeashorterlink.com/?R21112BB4

In some cases mScriptGlobalObject can be null, so the following call causes a crash:

mScriptGlobalObject->GetContext(getter_AddRefs(scriptContext));

I am not familiar enough with the overall code to know if mScriptGlobalObject
should ever be null - but all other usage of this variable in nsXULDocument.cpp
is surrounded by a null-check.
This is mine, I think (although ben can help).

/be
Assignee: hyatt → brendan
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.5alpha
Attached patch proposed fixSplinter Review
When I optimized to avoid seeks that dump the underlying stream's buffer, I
used the wrong global object to serialize out-of-line overlay scripts.	The old
code always serialized in nsXULPrototypeScript::Compile, using the
nsXULPDGlobalObject associated with the protodoc.  My bad change grabbed the
nearest global, which was nsXULDocument::mScriptGlobalObject.  But that's not a
proto-doc global, it is a real chrome window global.  And that member will be
null early, set only from the content viewer, so there's a race.

/be
Flags: blocking1.4+
Target Milestone: mozilla1.5alpha → mozilla1.4final
Attachment #124500 - Flags: superreview?(jst)
Attachment #124500 - Flags: review?(ben)
Comment on attachment 124500 [details] [diff] [review]
proposed fix

sr=jst
Attachment #124500 - Flags: superreview+
Attachment #124500 - Flags: superreview?(jst) → approval1.4?
Comment on attachment 124500 [details] [diff] [review]
proposed fix

a=asa (on behalf of drivers) for checkin to the 1.4 branch.
Attachment #124500 - Flags: approval1.4? → approval1.4+
Fixed in trunk and branch.

/be
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Keywords: fixed1.4
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
Crash Signature: [@ nsXULDocument::OnStreamComplete]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: