Bug 93528 - ASSERTION FAILED: resultAnimationElement->m_animatedType
Summary: ASSERTION FAILED: resultAnimationElement->m_animatedType
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-08 14:43 PDT by Philip Rogers
Modified: 2013-04-03 13:42 PDT (History)
6 users (show)

See Also:


Attachments
Minimized testcase (886 bytes, image/svg+xml)
2012-08-08 14:43 PDT, Philip Rogers
no flags Details
Patch (4.15 KB, patch)
2013-03-27 01:45 PDT, David Vest
no flags Details | Formatted Diff | Diff
Patch (4.16 KB, patch)
2013-03-27 07:23 PDT, David Vest
no flags Details | Formatted Diff | Diff
Updated test with lower timeout and shorter duration (4.16 KB, patch)
2013-04-03 12:50 PDT, David Vest
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Rogers 2012-08-08 14:43:18 PDT
Created attachment 157302 [details]
Minimized testcase

Original report: http://code.google.com/p/chromium/issues/detail?id=141326

In the attached testcase we hit an assertion (and crash in release builds):
ASSERTION FAILED: resultAnimationElement->m_animatedType
../../third_party/WebKit/Source/WebCore/svg/SVGAnimateElement.cpp(119) : virtual void WebCore::SVGAnimateElement::calculateAnimatedValue(float, unsigned int, WebCore::SVGSMILElement*)
Comment 1 David Vest 2013-03-27 01:45:14 PDT
Created attachment 195245 [details]
Patch
Comment 2 Stephen Chenney 2013-03-27 06:38:52 PDT
Comment on attachment 195245 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=195245&action=review

> LayoutTests/svg/animations/animation-dependency-crash.html:21
> +    <circle r="10" cx="50" cy="50">

Minor nit. Set the fill color on this to be green so that it looks to be passing in the event someone opens it in a browser.
Comment 3 David Vest 2013-03-27 07:23:29 PDT
Created attachment 195313 [details]
Patch
Comment 4 Stephen Chenney 2013-03-27 08:52:54 PDT
Comment on attachment 195313 [details]
Patch

FYI, for small nits like this, when the reviewer has marked R+ you are free to make the change and commit without another review - you just have to make the requested change and then manually add the "Reviewed by ..." line in the ChangeLog. If you're not comfortable with the change you can always ask for review, as you did here. If you do not have commit right, please mark the "cq: ?" so the reviewer knows you need someone to commit for you.
Comment 5 David Vest 2013-03-27 10:41:50 PDT
Comment on attachment 195313 [details]
Patch

Thanks for the review and advice. No, I don't have commit rights, so I'll add cq:? to the updated patch and hope for the best :)
Comment 6 Philip Rogers 2013-03-27 10:46:08 PDT
Comment on attachment 195313 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=195313&action=review

Apologies about last-minute kicking this out of the queue.

> LayoutTests/svg/animations/animation-dependency-crash.html:14
> +    }, 300);

This value is too high and will cause our testing infrastructure to run even slower. Can this be reduced (preferably to 0 or 1?)
Comment 7 David Vest 2013-03-27 11:00:02 PDT
(In reply to comment #6)
> (From update of attachment 195313 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=195313&action=review
> 
> Apologies about last-minute kicking this out of the queue.
> 
> > LayoutTests/svg/animations/animation-dependency-crash.html:14
> > +    }, 300);
> 
> This value is too high and will cause our testing infrastructure to run even slower. Can this be reduced (preferably to 0 or 1?)

Any lower and it won't crash chrome on my machine. The Gtk port crashes with a zero value, but I erred on the side of caution. So yes, we might lower the value but the test might lose relevance.
Comment 8 Stephen Chenney 2013-03-27 12:09:35 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > (From update of attachment 195313 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=195313&action=review
> > 
> > Apologies about last-minute kicking this out of the queue.
> > 
> > > LayoutTests/svg/animations/animation-dependency-crash.html:14
> > > +    }, 300);
> > 
> > This value is too high and will cause our testing infrastructure to run even slower. Can this be reduced (preferably to 0 or 1?)
> 
> Any lower and it won't crash chrome on my machine. The Gtk port crashes with a zero value, but I erred on the side of caution. So yes, we might lower the value but the test might lose relevance.

Another possibility is to make it an SVG animation test, which uses JS to jump the timeline ahead. I have no idea at all whether or not that will trigger the crash.
Comment 9 Philip Rogers 2013-03-27 15:39:26 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > (From update of attachment 195313 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=195313&action=review
> > > 
> > > Apologies about last-minute kicking this out of the queue.
> > > 
> > > > LayoutTests/svg/animations/animation-dependency-crash.html:14
> > > > +    }, 300);
> > > 
> > > This value is too high and will cause our testing infrastructure to run even slower. Can this be reduced (preferably to 0 or 1?)
> > 
> > Any lower and it won't crash chrome on my machine. The Gtk port crashes with a zero value, but I erred on the side of caution. So yes, we might lower the value but the test might lose relevance.
> 
> Another possibility is to make it an SVG animation test, which uses JS to jump the timeline ahead. I have no idea at all whether or not that will trigger the crash.

I think crashing on at least one platform is probably enough test coverage for a crasher. I'm in favor of just using 0 since we will still have coverage, albeit not the best coverage. Stephen and David, what do you think?
Comment 10 David Vest 2013-03-28 00:59:40 PDT
(In reply to comment #8)

> Another possibility is to make it an SVG animation test, which uses JS to jump the timeline ahead. I have no idea at all whether or not that will trigger the crash.

FYI, I stumbled onto https://bugs.webkit.org/show_bug.cgi?id=113485 when trying to use <svg>.setCurrentTime().
Comment 11 David Vest 2013-03-28 01:22:25 PDT
Comment on attachment 195313 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=195313&action=review

>>>>> LayoutTests/svg/animations/animation-dependency-crash.html:14
>>>>> +    }, 300);
>>>> 
>>>> This value is too high and will cause our testing infrastructure to run even slower. Can this be reduced (preferably to 0 or 1?)
>>> 
>>> Any lower and it won't crash chrome on my machine. The Gtk port crashes with a zero value, but I erred on the side of caution. So yes, we might lower the value but the test might lose relevance.
>> 
>> Another possibility is to make it an SVG animation test, which uses JS to jump the timeline ahead. I have no idea at all whether or not that will trigger the crash.
> 
> I think crashing on at least one platform is probably enough test coverage for a crasher. I'm in favor of just using 0 since we will still have coverage, albeit not the best coverage. Stephen and David, what do you think?

I'm fine with that. I'll upload a new patch.
Comment 12 David Vest 2013-03-28 02:38:36 PDT
Comment on attachment 195313 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=195313&action=review

>>>>>> LayoutTests/svg/animations/animation-dependency-crash.html:14
>>>>>> +    }, 300);
>>>>> 
>>>>> This value is too high and will cause our testing infrastructure to run even slower. Can this be reduced (preferably to 0 or 1?)
>>>> 
>>>> Any lower and it won't crash chrome on my machine. The Gtk port crashes with a zero value, but I erred on the side of caution. So yes, we might lower the value but the test might lose relevance.
>>> 
>>> Another possibility is to make it an SVG animation test, which uses JS to jump the timeline ahead. I have no idea at all whether or not that will trigger the crash.
>> 
>> I think crashing on at least one platform is probably enough test coverage for a crasher. I'm in favor of just using 0 since we will still have coverage, albeit not the best coverage. Stephen and David, what do you think?
> 
> I'm fine with that. I'll upload a new patch.

Sorry. When preparing the patch, I found out I can't reproduce the crash with a 0 or 1 timeout, not even in the gtk port. (For some reason, my <script> didn't run when I placed it below the <svg>, which actually in practice meant I had an infinite timeout value, not a zero one). I will try to find another way of testing this.
Comment 13 David Vest 2013-03-28 06:52:44 PDT
(In reply to comment #12)
> I will try to find another way of testing this.

I've investigated the possibility of using setCurrentTime (or SVGAnimationTestCase.js which uses setCurrentTime under the hood) and concluded that it is not possible to trigger the crash using setCurrentTime. The reason is that each call to setCurrentTime resets the animation state necessary to trigger the crash.

So, some choices going forward:

1. Commit fix without layout test.
2. Commit fix with layout test and accept a non-zero (>~200) ms delay in the test.
(3. Commit fix with manual test somehow. I'm not sure about the procedure for that, if any.)
Comment 14 Stephen Chenney 2013-03-28 07:11:32 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > I will try to find another way of testing this.
> 
> I've investigated the possibility of using setCurrentTime (or SVGAnimationTestCase.js which uses setCurrentTime under the hood) and concluded that it is not possible to trigger the crash using setCurrentTime. The reason is that each call to setCurrentTime resets the animation state necessary to trigger the crash.
> 
> So, some choices going forward:
> 
> 1. Commit fix without layout test.
> 2. Commit fix with layout test and accept a non-zero (>~200) ms delay in the test.
> (3. Commit fix with manual test somehow. I'm not sure about the procedure for that, if any.)

Commit it with the slow test. We can live with that. Worst case is that we mark it as slow in expectations.

pdr, flip the bit if you agree.
Comment 15 David Vest 2013-04-03 12:50:54 PDT
Created attachment 196395 [details]
Updated test with lower timeout and shorter duration
Comment 16 Philip Rogers 2013-04-03 12:53:30 PDT
Comment on attachment 196395 [details]
Updated test with lower timeout and shorter duration

Thanks for updating the test. R=me!
Comment 17 WebKit Review Bot 2013-04-03 13:42:48 PDT
Comment on attachment 196395 [details]
Updated test with lower timeout and shorter duration

Clearing flags on attachment: 196395

Committed r147581: <http://trac.webkit.org/changeset/147581>
Comment 18 WebKit Review Bot 2013-04-03 13:42:52 PDT
All reviewed patches have been landed.  Closing bug.