batik-users@xmlgraphics.apache.org
[Top] [All Lists]

Apache batik error and partial solution

Subject: Apache batik error and partial solution
From: Bogdan
Date: Wed, 02 Jul 2008 18:54:11 +0200
 Hello.

I'm using batik (JSVGCanvas to be precise) in one of my programs and I've noticed a strange behaviour: batik reports a null pointer. I can't give exact steps to reproduce the problem, but the algorithm is simple: be sure the canvas is active and displaying some elements (works best when adding them on a different thread) and push many, many events changing the root element's "viewbox" attribute. SVGCanvas slows down and often stops reporting a null pointer. The problem lies in SVGSVGElementBridge.java (I couldn't reach its author), method "handleAnimatedAttributeChanged", within the following code snippet (directly from svn; present in batik-1.7 too):

    if (rebuild) {
             CompositeGraphicsNode gn = node.getParent();
             gn.remove(node);
             disposeTree(e, false);

             handleElementAdded(gn, e.getParentNode(), e);
             return;
        }

Using a debugger I was able to find out that "gn" can be null and this is what's causing the problem. Please include a check for null in "gn". If I'm doing something wrong that may be causing this, tell me so and include a check for null in "gn". If this error is caused by some other module, notify its author and ... include a check for null in "gn".

--
Pozdrawiam/Regards - Bogdan                     (GNU/Linux & FreeDOS)
Kurs asemblera x86 (DOS, GNU/Linux):http://rudy.mif.pg.gda.pl/~bogdro
Grupy dyskusyjne o asm:  pl.comp.lang.asm alt.pl.asm alt.pl.asm.win32
www.JabberPL.org www.TorProject.org Soft (EN): miniurl.pl/bogdro-soft

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: batik-users-help@xxxxxxxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>