Hi,

I think I may have found a leak in Batik 1.5b3 on 
Linux 2.4.18-3 #1 Thu Apr 18 07:32:41 EDT 2002 i686 unknown with the SUN
Java VM 1.3.1.

When I load and display an SVG onto a JSVGCanvas/JSVGComponent with the
ALWAYS_DYNAMIC attribute set, I eventually end up with an
OutOfMemoryException being thrown after doing a certain number of
updates. The updates involve changing texts, shapes and colours of the
SVG, setting them visible and invisible etc.

I have attached a sample program that can duplicate this problem; albeit
very slowly. In a larger program that I've written based on the same
code, the leak takes about 12hours to wipe out the whole 64MB the JVM
allocates by default for itself.
The sample program will simply draw eight SVGs onto a JSVGCanvas, then
update their colours and texts. Moving the window that contains the
JSVGCanvas also helps to eat memory..

I managed to decrease the time need to cause the OutOfMemoryException by
running the sample program with the commands; 
        java -Xmx16m -Xincgc ApplMain time.svg


Hopefully, someone will look at the code and tell me that I'm doing
something stupid :)


James


Attachment: dynamic-svg.tar.gz
Description: GNU Zip compressed data

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to