Hi Cameron (anyone),

Any word on this issue? Do you need any clarification/information? Please let me know what I can do to help. Thanks again.

Martin.

Martin Constantine wrote:
Cameron,

Thanks for getting back to me. I apologize for the delayed response but I've only had time to revisit this problem recently. Now the nitty gritty....

I was able to pinpoint the location where the exception is being thrown. Here's a code snippet from AnimationEngine.java:

 // Update the CSS animations.
            j = info.cssAnimations.entrySet().iterator();
while (j.hasNext()) { Map.Entry e2 = (Map.Entry) j.next();
                String propertyName = (String) e2.getKey();
Sandwich sandwich = (Sandwich) e2.getValue(); if (sandwich.shouldUpdate || sandwich.animation.isDirty) { ****AnimatableValue av = sandwich.animation.getComposedValue();***

***Exception is thrown here (around line 352)
As you can see from the java comment, it occurs when updating CSS animations. The time argument at this point is either 68.829 or 73.586 (not sure which one) and from the line that the exception is thrown, it seems like getComposedValue() is null. I attached the related document.

Feel free to correct me at any time because I'm fairly new to the inner working of batik.

Application Background
-------------------------
The application I'm working on records scribbles created on a canvas. Each such canvas is part of a list which the user navigates. When the user is done scribbling on one canvas, she goes to a new one and scribbles some more, etc. This recording action is encapsulated in a class that implements JGVTComponentListener. I'm guessing that there is some link between what happens in this class and the calling of the tick() method in AnimationEngine. At the moment that is obscure but I'm learning as I go, so please bare with me.

Possible reason for the NPE:
tick() is being called when it shouldn't. What controlls tick()? Is it called at regular intervals or just in response to some event? e.g. when the user moves to a new canvas, the NPE manifests itself and loops indefinitely until the user starts to draw again. It seems like the animation is still running when there's nothing to process. Does this make sense?

Thanks in advance for your help.

Martin.

PS SVN revision info
Revision: 511269
Node Kind: directory
Last Changed Date: 2007-02-20 20:12:30 -0500 (Tue, 20 Feb 2007)




Cameron McCormack wrote:
Hi Martin.

Martin Constantine:
I upgraded to the latest svn build (2/13/2007) and received this stack trace which seemed to loop continuously.

java.lang.NullPointerException
       at org.apache.batik.anim.AnimationEngine.tick(Unknown Source)
at org.apache.batik.bridge.SVGAnimationEngine.access$600(Unknown Source) at org.apache.batik.bridge.SVGAnimationEngine$AnimationTickRunnable.run(Unknown Source)

Appart from slowing down the app somewhat, there are no other bad side effects. I'm currently investigating the root cause, but I'm pretty sure I haven't seen this in the stable 1.6 release we been using for quite some time now. If anyone has seen this before and can shed some light, that would be great! Thanks in advance.

Are you able to provide a document that exhibits this exception?  If
not, can you explain how you’re using Batik and compile it with
debugging information so that I can see where the exception is
occurring?

Thanks,

Cameron


------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to