Bug 46453 - animateTransform throws ArrayIndexOutOfBoundsException
animateTransform throws ArrayIndexOutOfBoundsException
Status: NEW
Product: Batik - Now in Jira
Classification: Unclassified
Component: Animation engine
1.8
All All
: P2 normal
: ---
Assigned To: Batik Developer's Mailing list
http://www.w3.org/Graphics/SVG/Test/2...
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-12-30 15:17 UTC by Brian Birtles
Modified: 2009-01-10 04:56 UTC (History)
1 user (show)



Attachments
Testcase from comment 0 (700 bytes, image/svg+xml)
2009-01-10 04:53 UTC, Helder Magalhães
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Birtles 2008-12-30 15:17:10 UTC
The following is a reduced test case based on the animate-elem-216-t test in the SVG Tiny 1.2 test suite. Loading this throws a series of ArrayIndexOutOfBoundsExceptions.

<?xml version="1.0" encoding="UTF-8"?>
<svg width="100%" height="100%" viewBox="0 0 480 360"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <path id="by" xml:id="by" d="M-20,0L20,40M-20,-40L20,-20M-10,-40L15,40"/>
  </defs>

  <g fill="none" stroke="#f00" stroke-width="6" stroke-linejoin="round"
    stroke-linecap="round">
    <use xlink:href="#by" stroke="#88f">
      <animateTransform attributeName="transform" type="skewX" values="10"
      begin="2s" />
      <animateTransform attributeName="transform" type="skewX" by="20"
      begin="4s" dur="5s" repeatCount="3" additive="sum" accumulate="sum"/>
    </use>
  </g>
</svg>
Comment 1 Helder Magalhães 2009-01-10 04:53:03 UTC
Created attachment 23103 [details]
Testcase from comment 0

Attached the testcase to ease reproducibility (direct URL navigation much more convenient than copy+paste+save+browse).
Comment 2 Helder Magalhães 2009-01-10 04:56:14 UTC
Confirmed using trunk version (1.8 0) and JDK 1.6u11 - bug version attribute changed to match this fact. As stated a series of exception is thrown. Partial sample follows:

java.lang.ArrayIndexOutOfBoundsException: 1
	at org.apache.batik.anim.SimpleAnimation.sampledAtUnitTime(Unknown Source)
	at org.apache.batik.anim.TransformAnimation.sampledAtUnitTime(Unknown Source)
	at org.apache.batik.anim.InterpolatingAnimation.sampledAt(Unknown Source)
	at org.apache.batik.anim.AnimationEngine.sampledAt(Unknown Source)
	[...]