Closed Bug 590404 Opened 14 years ago Closed 14 years ago

Crash [@ nsURIHashKey::HashKey] with -moz-element in data: document

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- final+

People

(Reporter: jruderman, Assigned: mstange)

References

(Blocks 1 open bug)

Details

(Keywords: crash, testcase)

Crash Data

Attachments

(2 files)

      No description provided.
http://crash-stats.mozilla.com/report/index/8509f81f-5a41-4d92-9fba-dd51e2100826
0  	xul.dll  	nsURIHashKey::HashKey  	 obj-firefox/dist/include/nsURIHashKey.h:74
1 	xul.dll 	nsTHashtable<nsBaseHashtableET<nsURIHashKey,nsCOMPtr<nsIStreamListener> > >::s_HashKey 	obj-firefox/dist/include/nsTHashtable.h:365
2 	xul.dll 	PL_DHashTableOperate 	obj-firefox/xpcom/build/pldhash.c:615
3 	xul.dll 	nsTHashtable<nsBaseHashtableET<PrincipalKey,nsCOMPtr<nsIPrincipal> > >::GetEntry 	obj-firefox/dist/include/nsTHashtable.h:170
4 	xul.dll 	nsRefPtrHashtable<nsPtrHashKey<void const >,nsAccessible>::GetWeak 	obj-firefox/dist/include/nsRefPtrHashtable.h:143
5 	xul.dll 	GetEffectPropertyForURI 	layout/svg/base/src/nsSVGEffects.cpp:397
6 	xul.dll 	ImageRenderer::PrepareImage 	
7 		@0x251f9a77 	
8 	xul.dll 	nsCSSRendering::PaintBackgroundWithSC 	layout/base/nsCSSRendering.cpp:2373
I'm hitting a similar bug when trying to use -moz-element in an about: page
See http://crash-stats.mozilla.com/report/index/7de3b278-9342-4480-b567-2dab02100826
Markus, I hope you can fix this...
Assignee: nobody → mstange
blocking2.0: --- → final+
the problem seems to be here
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsCSSRendering.cpp#3754
3754       nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(targetURI),

NewURIWithDocumentCharset is failing, and targetURI is null, but there is no null check nor return value check.
in my case it's trying to make aboutProtocolHandler build a new uri with spec "#elementID". If I check this for failure and tell the image is not ready, clearly it thinks there is no image and gives up (no crash but no image is shown)
Blocks: 591104
see about:robots bug I added as blocking for the patch I was trying.
As Marco said, this doesn't fix the about:robots problem. Failing to generate the right URI for about:robots seems to be a separate bug.
Attachment #470020 - Flags: review?(roc)
Maybe it should be an hash-element-ref rather than a URI, so it can work in data: URLs?
Comment on attachment 470020 [details] [diff] [review]
protect against null uri

Indeed, we should probably remove the URI dependency.
Attachment #470020 - Flags: review?(roc) → review+
Although really, the Web platform needs URIs to be fixed so that any URI can have a hash-ref.
Keywords: checkin-needed
Blocks: 591940
No longer blocks: 591104
http://hg.mozilla.org/mozilla-central/rev/70158f778f09
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b7
Crash Signature: [@ nsURIHashKey::HashKey]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: