David Ben-Yaacov wrote:

Arrg! I've been having trouble with this for a couple of days now, and would like to get some help, if you please.

I've created a method which creates a RotPosPathInterpolator behavior node and adds it to the scene graph. When calling the method with the first TransformGroup, lets call it TransformGroup A, it works as expected. When calling the method with another TransformGroup, lets call it TransformGroupB, there are problems. As soon as the RotPosPathInterpolator for TransformGroupB, gets added to the scene graph, a NullPointerException is thrown within a Java3D thread, as follows:

// Stack trace
java.lang.NullPointerException
at 
javax.media.j3d.TransformGroupRetained.updateChildLocalToVworld(TransformGroupRetained.java:969)
at 
javax.media.j3d.TransformGroupRetained.updateChildLocalToVworld(TransformGroupRetained.java:961)
at 
javax.media.j3d.TransformGroupRetained.processChildLocalToVworld(TransformGroupRetained.java:825)
at 
javax.media.j3d.TransformStructure.processCurrentLocalToVworld(TransformStructure.java:306)
at javax.media.j3d.TransformStructure.processMessages(TransformStructure.java:186)
at javax.media.j3d.StructureUpdateThread.doWork(StructureUpdateThread.java:83)
at javax.media.j3d.J3dThread.run(J3dThread.java:250)
// end of stack trace

Here's the thread name where the NullPointerException occurred:
System Thread [J3D-TransformStructureUpdateThread-1]

The RotPosPathInterpolator's purpose is to move a TransformGroup a certain direction and to rotate it around to a certain angle.

Strangely, maybe 5% of the time, the NullPointerException does not occur, and TransformGroupB gets moved/rotated as expected.


Looks like an MT-safe issues when using SharedGroup, please send us a
complete test case.

Thanks.

- Kelvin
----------
Java 3D Team
Sun Microsystems Inc.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to