Closed
Bug 418206
Opened 16 years ago
Closed 16 years ago
Some SVG files that appear to hang Mozilla
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jwatt, Assigned: jwatt)
References
()
Details
(Keywords: hang, testcase)
Attachments
(1 file, 1 obsolete file)
16.62 KB,
patch
|
roc
:
superreview+
beltzner
:
approval1.9+
|
Details | Diff | Splinter Review |
David Dailey reports on svg-developers that some of his SVG files cause FF3 beta 3 to crash (I assume he means hang). See: http://www.mail-archive.com/svg-developers@yahoogroups.com/msg12783.html These include: http://srufaculty.sru.edu/david.dailey/svg/newstuff/path5.svg http://srufaculty.sru.edu/david.dailey/svg/newstuff/path6.svg http://srufaculty.sru.edu/david.dailey/svg/newstuff/path7.svg (8 , 8a, 9 and 10 too)
Comment 1•16 years ago
|
||
(In reply to comment #0) > http://srufaculty.sru.edu/david.dailey/svg/newstuff/path5.svg doesn't crash but script are very slow. Its |svg| element specifies |viewBox="0,0,0,600"|. http://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute says > A negative value for <width> or <height> is an error (see Error processing). A value of zero disables rendering of the element. but we renders that element as a huge box. # Should I file a bug of this?
Comment 2•16 years ago
|
||
The viewBox issue is bug 385554 I think. On top of that the testcase has the same problems as bug 374037. I.e. using appendChild rather than insertBefore. The appendChild slowness is bug 233463. The testcases could be speeded up replacing appendChild by insertBefore and rewriting the loops to go backwards if necessary. Also using (un)suspendRedraw in the javascript code would presumably help.
Assignee | ||
Comment 3•16 years ago
|
||
Actually, depending on how it's done, disabling rendering isn't enough. I think the main problem is that getCanvasTM returns bogus results and causes getBBox to return a huge rect. As a result the script iterates over a huge area, and hence the "hang". If it wasn't iterating over such a large area I think the other issues would have much, much less of an impact.
Assignee | ||
Comment 4•16 years ago
|
||
Comment 5•16 years ago
|
||
Comment on attachment 304490 [details] [diff] [review] patch >- NS_NewSVGRect(getter_AddRefs(vb), 0, 0, w, h); >+ } >+ >+ if (!vb || w < 0.0f || h < 0.0f) { >+ NS_NewSVGRect(getter_AddRefs(vb), 0, 0, PR_MAX(w,0.0f), PR_MAX(h,0.0f)); > } Nit: space after commas. >+ } else { >+ NS_WARNING("we should propogate the fact that the viewBox is invalid"); That's not how you spell propagate ;-) Note that this misspelling occurs 3 times within this patch. r=longsonr with nits fixed.
Attachment #304490 -
Flags: review?(longsonr) → review+
Assignee | ||
Comment 6•16 years ago
|
||
I should get an editor with a built-in spell checker. :-)
Attachment #304490 -
Attachment is obsolete: true
Attachment #304500 -
Flags: superreview?(roc)
Comment on attachment 304500 [details] [diff] [review] patch addressing review comments Can we have a mochitest for this?
Attachment #304500 -
Flags: superreview?(roc) → superreview+
or a reftest.
Assignee | ||
Comment 9•16 years ago
|
||
Comment on attachment 304500 [details] [diff] [review] patch addressing review comments A crashtest would probably be best. Possibly some a Tsvg test since this is really a massive perf hit.
Attachment #304500 -
Flags: approval1.9?
Comment 10•16 years ago
|
||
Comment on attachment 304500 [details] [diff] [review] patch addressing review comments Please make sure to file those tests. a=beltzner
Attachment #304500 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Updated•16 years ago
|
Flags: blocking1.9?
Comment 11•16 years ago
|
||
Closing this to clean up bugzilla. Please file follow-on bugs for tests needed.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 12•16 years ago
|
||
Please don't go around closing bugs and suggesting someone files something about file up work. Things will fall through the cracks. If you're going to file this, file the follow up bug first.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 13•16 years ago
|
||
Filed bug 433063 for the tests.
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•