https://issues.apache.org/bugzilla/show_bug.cgi?id=46863


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW




--- Comment #3 from [email protected]  2009-03-26 08:48:01 PST ---
Hi, thanks for looking into this issue.

Here is a test case that results in the OOM exception after running for about
10 minutes on my computer:

import java.awt.RenderingHints;
import java.awt.RenderingHints.Key;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.util.HashMap;

import org.apache.batik.dom.GenericDOMImplementation;
import org.apache.batik.svggen.SVGGraphics2D;
import org.w3c.dom.Document;

public class A {
    public static void main(String[] args) {
        BufferedImage bi = new BufferedImage(100, 100,
BufferedImage.TYPE_INT_ARGB);
        Document document =
GenericDOMImplementation.getDOMImplementation().createDocument(null, "svg",
null);
        SVGGraphics2D svgGraphics = new SVGGraphics2D(document);
        BufferedImageOp bio = new AffineTransformOp(new AffineTransform(), new
RenderingHints(new HashMap<Key, Object>()));
        for (;;) {
            //for (int i = 0; i < 200; i++) //20
            svgGraphics.drawImage(bi, bio, 0, 0);
            //System.gc(); //22
        }
   }
}

If lines 20 and 22 are uncommented, then the program seems to run forever. I
did not experience an OOM exception after running the program for more than an
hour.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to