Last Comment Bug 280364 - SVG asserts when running this testcase
: SVG asserts when running this testcase
: assertion, testcase
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
-- normal (vote)
: ---
Assigned To: Jonathan Watt [:jwatt]
: Jet Villegas (:jet)
Depends on: 274698
  Show dependency treegraph
Reported: 2005-01-29 13:09 PST by Boris Zbarsky [:bz] (still a bit busy)
Modified: 2011-04-19 08:08 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Boris Zbarsky [:bz] (still a bit busy) 2005-01-29 13:09:54 PST
BUILD: Current trunk with SVG

1)  Open URL
2)  Click "svg" checkbox a few times

EXPECTED RESULTS: no assertions

ACTUAL RESULTS: ###!!! ASSERTION: zero axis length: 'd!=0.0f', file
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 User image Jonathan Watt [:jwatt] 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 User image Jonathan Watt [:jwatt] 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
Comment 3 User image Jonathan Watt [:jwatt] 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.
Comment 4 User image Jonathan Watt [:jwatt] 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.