You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Peter Jacobsen <pe...@web.de> on 2002/05/21 17:26:06 UTC

OutOfMemoryError JSVGCanvas

Hi all,

I noticed that a repetitive call to method "setSVGDocument(SVGDocument doc)" of JSVGCanvas causes OutOfMemoryError very quickly. Using "loadSVGDocument(String url) works OK. I need the "setSVGDocument()" functionality because I manipulate the DOM prior to the rendering process. Browsing the Batik sources, I could not find why it should not be possible to manually load a document and then hand it over to JSVGCanvas for rendering.
FYI someone posted the same problem last year on September 24 with no answers.

Any help would greatly appreciated.
Peter Jacobsen
________________________________________________________________
Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! 
Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13



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


RE: OutOfMemoryError JSVGCanvas

Posted by Thierry Kormann <tk...@ilog.fr>.
Hi,

> I noticed that a repetitive call to method
> "setSVGDocument(SVGDocument doc)" of JSVGCanvas causes
> OutOfMemoryError very quickly. Using "loadSVGDocument(String url)
> works OK. I need the "setSVGDocument()" functionality because I
> manipulate the DOM prior to the rendering process. Browsing the
> Batik sources, I could not find why it should not be possible to
> manually load a document and then hand it over to JSVGCanvas for
> rendering.
> FYI someone posted the same problem last year on September 24
> with no answers.

I have just commited a fix this morning. The bug was tricky to find because
setSVGDocument used to work properly except if you do
setSVGDocument(getSVGDocument()). That is to say, building again and again
the same SVGDocument.

Anyway, it's now fixed and the attached Java code (based on the
SVGApplication sample from the Batik web site) demonstrates that.

Regards,
Thierry.