Closed Bug 693790 Opened 14 years ago Closed 14 years ago

"ABORT: Expecting at least one non-identity operand"

Categories

(Core :: SVG, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jruderman, Assigned: heycam)

References

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

###!!! ABORT: Expecting at least one non-identity operand: '!dest.IsEmpty() || !valueToAdd.IsEmpty()', file content/svg/content/src/SVGLengthListSMILType.cpp, line 127
Attached file stack trace
Assignee: nobody → cam
Status: NEW → ASSIGNED
It looks like doing an addition with an empty list as both the underlying value and the to value is a valid case that can come up; specifically, when doing a discrete by-animation where there is no explicit underlying value. The patch just removes the assertion and makes that case a no-op.
Attachment #594635 - Flags: review?(dholbert)
OS: Mac OS X → All
Hardware: x86_64 → All
Whiteboard: [autoland-try]
Whiteboard: [autoland-try] → [autoland-in-queue]
Autoland Patchset: Patches: 594635 Branch: mozilla-central => try Destination: http://hg.mozilla.org/try/rev/1d9e0a0ab986 Try run started, revision 1d9e0a0ab986. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=1d9e0a0ab986
(In reply to Cameron McCormack (:heycam) from comment #2) > It looks like doing an addition with an empty list as both the underlying > value > and the to value is a valid case that can come up; specifically, when doing a > discrete by-animation where there is no explicit underlying value. I'm not immediately clear on why that happens here. I'd thought we did an addition like so: [ baseVal + byVal * progress] and while baseVal is empty there for this testcase, the byVal is not. Why is the added value (the by value, presumably) not-explicitly-initialized here?
(The attached patch is likely correct -- I just want to make sure we know what both non-initialized values represent, to be sure the bug isn't elsewhere.)
Try run for 1d9e0a0ab986 is complete. Detailed breakdown of the results available here: https://tbpl.mozilla.org/?tree=Try&rev=1d9e0a0ab986 Results (out of 206 total builds): success: 186 warnings: 20 Builds (or logs if builds failed) available at: http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-1d9e0a0ab986
Whiteboard: [autoland-in-queue]
(In reply to Daniel Holbert [:dholbert] from comment #4) > I'm not immediately clear on why that happens here. I'd thought we did an > addition like so: > [ baseVal + byVal * progress] > and while baseVal is empty there for this testcase, the byVal is not. Only for the non-discrete calcModes. For discrete by-animations, it is treated as a two-valued animation where the first value is the "identity" value and the second value is the by="" value. > Why is the added value (the by value, presumably) not-explicitly-initialized > here? I think the equivalent additive from/to animation values are computed here: http://hg.mozilla.org/mozilla-central/file/tip/content/smil/nsSMILAnimationFunction.cpp#l837 resulting in the first value in the length 2 result array being the empty list. It's then selected as part of the discrete animation here: http://hg.mozilla.org/mozilla-central/file/tip/content/smil/nsSMILAnimationFunction.cpp#l496
Sorry, not equivalent additive from-to animation; it's non-additive. nsSMILAnimationFunction::GetValues turns the by-animation into a non-additive from-to animation by looking up the base value (the empty list) to use as the from value, and adding that to the by="" value to use as the to value.
Gotcha -- so in particular: * nsSMILAnimationFunction::ComposeResult does its discrete "interpolation" between identity & the "by" value (producing the identity value, for the first half of the animation) * In the final chunk of ComposeResult, we try to SandwichAdd that result onto the underlying base value, which is also identity. So we get identity+identity. And of course the right result for identity += identity is just to leave the value as-is & succeed, which this patch does. Cool.
Comment on attachment 594635 [details] [diff] [review] Don't abort on discrete by-animation of SVG length lists when there is no underlying value. r=me! Sorry for the delay on this.
Attachment #594635 - Flags: review?(dholbert) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/0071109aa94e Thanks for the r+! The delay was not appreciable. :)
Flags: in-testsuite+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: