I have some code that relies fairly heavily on being able to modify the
scene graph live at run time.  I've run into a rather sticky problem that
I think is a bug somewhere deep in the bowels of java3d.

Basically, I have a large, fairly complex BranchGroup which I wish to
remove from the tree.  However, when I call its detach method, it fails
with the following exception:

java.lang.NullPointerException:
        at
javax.media.j3d.GroupRetained.updateContains(GroupRetained.java:698)
        at javax.media.j3d.NodeRetained.clearLive(NodeRetained.java:526)
        at javax.media.j3d.GroupRetained.clearLive(GroupRetained.java:683)
        at javax.media.j3d.GroupRetained.clearLive(GroupRetained.java:687)
        at javax.media.j3d.GroupRetained.clearLive(GroupRetained.java:687)
        at
javax.media.j3d.GroupRetained.checkClearLive(GroupRetained.java:584)
        at
javax.media.j3d.GroupRetained.doRemoveChild(GroupRetained.java:244)
        at
javax.media.j3d.BranchGroupRetained.do_detach(BranchGroupRetained.java:77)
        at
javax.media.j3d.BranchGroupRetained.detach(BranchGroupRetained.java:64)
        at javax.media.j3d.BranchGroup.detach(BranchGroup.java:84)
        at
metasystem.metaclient.metaspace.SceneObject.setParentGroup(SceneObject.java:241)
        at
metasystem.metaclient.metaspace.Avatar3dUI.findSceneRoot(Avatar3dUI.java:204)
        at
metasystem.metaclient.metaspace.Avatar3dUI.enterNewWorld(Avatar3dUI.java:330)
        at
metasystem.metaclient.metaspace.Avatar3dUI.setParent(Avatar3dUI.java:271)
        at
metasystem.metaclient.metaspace.SetParent.run(SetParent.java:18)

The parent node is a TransformGroup with ALLOW_CHILDREN_EXTEND set and the
child node is a BranchGroup with ALLOW_DETACH set.  Does anyone know why
this is happening, and what I can to to work around it?

           ------------------ Peter Amstutz --------------------
           -------------- [EMAIL PROTECTED] -------------
           ------- http://www-unix.oit.umass.edu/~tetron -------
           -----------------------------------------------------

===========================================================================
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