Note: There are a few cases of duplicates in user autocompletion which are being worked on.

SVG asserts when running this testcase

RESOLVED FIXED

Status

()

Core
SVG
RESOLVED FIXED
13 years ago
6 years ago

People

(Reporter: bz, Assigned: jwatt)

Tracking

({assertion, testcase})

Trunk
assertion, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
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).
(Assignee)

Comment 1

13 years ago
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.
Assignee: general → jonathan.watt
Depends on: 274698
OS: Linux → All
Hardware: PC → All
(Assignee)

Comment 2

13 years ago
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.
(Assignee)

Comment 3

12 years ago
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

Updated

10 years ago
Keywords: assertion, testcase
QA Contact: ian → general
Bug 274698 changed the NS_ASSERTION to an NS_WARNING.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.