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" anyway.
Second thing I noticed is in RunnableQueue.createRunnableQueue -
apparently there is some doubt about the code, it can be fixed by
replacing the line:
synchronized (result) { // todo ?? sync on local object has no meaning
with:
synchronized (result) { // get the object's monitor for "result.wait"
Apart from acquiring the monitor, synchronization on a local object
indeed has no meaning as for me. This is a minor fix, but can prevent
the supposedly-useless expression from being removed, which would lead
to exceptions being thrown.
Thanks four your work on Batik and your time to read this!
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]