Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-809

Quick Successive User-Triggered Animations Cause Batik to Hang

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Duplicate
    • 1.7
    • None
    • SVG Viewer
    • Operating System: Windows XP
      Platform: PC

    Description

      I have found what I think is a serious bug in the Batik SMIL animation engine.
      When an animation's begin and end times are controlled by the user (such as an
      animation that starts when the user presses a key and ends when the key is
      released), starting and stopping the animation in quick succession, in a way
      such as tapping the key repeatedly, will cause Batik to hang.

      This bug is easily reproduceable. Open the following SVG file in Squiggle:

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" id="svg1">
      <rect x="0" y="0" height="400" width="400" fill="#0000ff" id="rect2">
      <animateColor attributeName="fill" values="#0000ff;#000088;#0000ff" dur="3s"
      repeatCount="indefinite"/>
      </rect>
      <rect x="180" y="180" height="40" width="40" fill="green" id="rect1">
      <animateTransform attributeName="transform" type="translate" to="100,0"
      from="0,0" dur="1s" begin="svg1.mousedown" end="svg1.mouseup"/>
      </rect>
      </svg>

      The animateColor on the background rect is needed to make user-triggered
      animations appear, another bug that deserves its own entry. Copy-and-paste the
      SVG code above into a file, open that file in Batik, and then click the SVG file
      repeatedly as fast as you can. Eventually, it will hang.

      Even if you don't start and stop the animation fast enough to cause the hang,
      the hang may still occur if there is another animation running that happens to
      start or end at the exact same time that the user-triggered animation starts or
      ends.

      Attachments

        1. bug44439-testcase.svg
          0.5 kB
          Helder Magalhães

        Issue Links

          Activity

            People

              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              adamlego20@hotmail.com Adam Nelson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: