Last Comment Bug 280364 - SVG asserts when running this testcase
: SVG asserts when running this testcase
Status: RESOLVED FIXED
: assertion, testcase
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Jonathan Watt [:jwatt] (Away Jun. 27 - Jul. 13)
:
Mentors:
https://bugzilla.mozilla.org/attachme...
Depends on: 274698
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-29 13:09 PST by Boris Zbarsky [:bz] (Out June 25-July 6)
Modified: 2011-04-19 08:08 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Boris Zbarsky [:bz] (Out June 25-July 6) 2005-01-29 13:09:54 PST
BUILD: Current trunk with SVG

STEPS TO REPRODUCE:
1)  Open URL
2)  Click "svg" checkbox a few times

EXPECTED RESULTS: no assertions

ACTUAL RESULTS: ###!!! ASSERTION: zero axis length: 'd!=0.0f', file
/home/bzbarsky/mozilla/xlib/mozilla/content/svg/content/src/nsSVGLength.cpp,
line 550

This was making it very difficult to debug bug 280214...

I don't know whether the assertion is correct (in which code that gets us into
this state should be fixed) or whether this is a normal occurrence (in which
case the assertion should be removed).
Comment 1 Jonathan Watt [:jwatt] (Away Jun. 27 - Jul. 13) 2005-01-29 14:36:25 PST
There are a number of problems with nsSVGLength and some of the code that
currently uses it, including the fact that we create certain objects that (by
default) have percentage based length members, which during creation have no
context. We need to fix up this class to deal with the "no context" and "zero
axis length" problems. I was planning to sort this out after bug 274698.
Comment 2 Jonathan Watt [:jwatt] (Away Jun. 27 - Jul. 13) 2005-03-02 02:27:37 PST
One source of this assertion is the nsSVGViewBox ctor which calls
nsSVGLength::GetValue(). The ctor is called in nsSVGSVGElement::Init() and
nsSVGMarkerElement::Init() by the call to NS_NewSVGViewBox(). During this
construction stage the elements haven't been inserted into a document, and as a
result the width and height that get passed to the nsSVGViewBox ctor don't have
a context. Unless the lengths happen to have a unitType of SVG_LENGTHTYPE_NUMBER
or SVG_LENGTHTYPE_PX, GetValue can't return a valid user unit value. Hence the
assertion.
Comment 3 Jonathan Watt [:jwatt] (Away Jun. 27 - Jul. 13) 2005-06-29 10:12:21 PDT
This really should be addressed by the SVG WG. I reported the issue as I see it
to www-svg a couple of months ago.
http://lists.w3.org/Archives/Public/www-svg/2005Apr/0006
Comment 4 Jonathan Watt [:jwatt] (Away Jun. 27 - Jul. 13) 2011-04-19 08:08:07 PDT
Bug 274698 changed the NS_ASSERTION to an NS_WARNING.

Note You need to log in before you can comment on or make changes to this bug.