xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Armhold <armh...@cs.rutgers.edu>
Subject apparent memory leak in JSVGComponent [Batik 1.5b4]
Date Thu, 19 Sep 2002 16:02:43 GMT

I'm experiencing a similar problem to the one that James mentioned
back in August, but I'm using Batik 1.5b4.  In my case, I'm using a
JSVGComponent and asking it to successively load different SVG
documents by calling setSVGDocument().  Windows Task Manager shows the
memory going up and up with each successive document, until finally I
get an OutOfMemoryException.  I can provide a sample program that
tickles it, if needed.  Can anyone suggest a fix or workaround?


 > Subject: Memory Leak in Batik1.5b3?
 > From: James McArthur <james@pcorp.com.au>
 > Date: 28 Aug 2002 08:26:30 +0930
 > To: batik-users@xml.apache.org
 > 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

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message