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

OutOfMemory error when triggering set element rapidly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: GVT
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other

      Description

      The SVG below, when rendered in squiggle, triggers a bug in Batik that causes
      the jvm to grab 100% CPU (squiggle becomes unresponsive) and emit an infinite
      number of "java.lang.OutOfMemoryError: Java heap space" messages in the console,
      when the mouse is rapidly and repeatedly moved over the FOO and BAR buttons for
      a few seconds (something like 5-10 seconds).

      This is with the current (as of a few minutes ago) development version of Batik,
      on windows XP and jdk 1.5.0_06.

      <?xml version="1.0" encoding="utf-8" standalone="no"?>
      <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
      "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

      <svg version="1.1" xmlns="http://www.w3.org/2000/svg"
      xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-5.00 -9.65 110.00 212.30"
      font-family="Verdana" font-size="50.0">

      <rect x="0.0" y="0.0" width="100.0" height="193.0" fill="lightblue"
      stroke="black" stroke-width="3.0" opacity="1.0" />
      <rect x="7.0" y="7.0" width="86.0" height="86.0" id="foo" fill="lightgrey"
      cursor="default" stroke="black" stroke-width="3.0">
      <set attributeName="stroke-width" to="5.0" begin="mouseover" end="mouseout" />
      </rect>
      <g transform="translate(12.6, 32.0) scale(0.6561, 0.6561) translate(57.0, 42.5)"
      pointer-events="none">
      <text fill="navy" text-anchor="middle">FOO
      </text>
      </g>
      <g transform="translate(0.0,93.0)">
      <rect x="7.0" y="7.0" width="86.0" height="86.0" id="bar" fill="lightgrey"
      cursor="default" stroke="black" stroke-width="3.0">
      <set attributeName="stroke-width" to="5.0" begin="mouseover" end="mouseout" />
      </rect>
      <g transform="translate(12.6, 32.0) scale(0.6561, 0.6561) translate(57.0, 42.5)"
      pointer-events="none">
      <text fill="navy" text-anchor="middle">BAR
      </text>
      </g>
      </g>
      </svg>

        Attachments

        1. Batik-Bug42045.svg
          1 kB
          Helder Magalhães

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              frodef@stud.cs.uit.no Frode V. Fjeld
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: