Animation issue? [Repro info added]

Since the latest updates, when I run the client for the project I have been working on, I get the following error:



[java]SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.NullPointerException

at com.jme3.animation.BoneTrack.setTime(BoneTrack.java:124)

at com.jme3.animation.BoneAnimation.setTime(BoneAnimation.java:87)

at com.jme3.animation.AnimChannel.update(AnimChannel.java:325)

at com.jme3.animation.AnimControl.controlUpdate(AnimControl.java:382)

at com.jme3.scene.control.AbstractControl.update(AbstractControl.java:93)

at com.jme3.scene.Spatial.runControlUpdate(Spatial.java:504)

at com.jme3.scene.Spatial.updateLogicalState(Spatial.java:621)

at com.jme3.scene.Node.updateLogicalState(Node.java:151)

at com.jme3.scene.Node.updateLogicalState(Node.java:154)

at com.jme3.scene.Node.updateLogicalState(Node.java:154)

at com.jme3.app.SimpleApplication.update(SimpleApplication.java:242)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:146)

at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:159)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:208)

at java.lang.Thread.run(Thread.java:619)

[/java]



not sure what to do… did something change? or is this a bug?

For added info:



If I remove animation handling, the client launches fine… looks silly, but loads.



And, oddly enough… I can not catch the exception. Well… not really that odd, because it is being thrown when update calls updateLogicalState



One last thing, if this was an intended change because it was not working properly before. Can someone point me in the direction of how to properly handle animations with the changes in mind?



Here is the exact line of code that is throwing the error in BoneTrack.java:

[java]public void setTime(float time, Skeleton skeleton, float weight) {

Bone target = skeleton.getBone(targetBoneIndex);



int lastFrame = times.length - 1;

if (time < 0 || lastFrame == 0){

>>>>> rotations.get(0, tempQ); <<<<<

[/java]

I hope someone reads this:



Here is how you repro the error:



If you call:



AnimChannel.setAnim((String animName); // The call that does NOT pass in blend time–you will get the error shown above.



If you call:



AnimChannel.setAnim(String animName, float blendTime); // Everything works fine.



I’ll keep checking after updates to see if it is fixed, if not, I’ll assume noone reread this post and I’ll post the repro in a new thread. I am assuming that a default blend time is not being set (or being set to 0 and the blend routine is having an issue with this), though I haven’t revisited the source yet to verify.



It would also seem that you will need to re-convert your models to j3o format, as something has changed in the xml converter?? Anyways, just a note for anyone using animation.



Thanks