Hi Nagehan,

The only hint I can give you is that I sometimes got this exception
as well. In my case, the reason always was a missing Shape3D down
at the deepest level of the TransformGroup. This happens sometimes
when, for instance, a Shape3D is removed (perhaps by detaching the
BranchGroup above it) for whatever reason. If so, there exists a
Group structure without an end-LeafeNode. The system allows this
and doesn't issue any error message. But when the pickability was
changed after, I got the same exception. The solution was always
to check for missing Shape3D's and re-attach them. When you have
a rather complex SceneGraph with many Groups and Shape3D's, the
only problem is where exactly that missing Shape may be. What I
normally do in such a case is to uncomment parts of the program
and see if the exception still comes up. At best, you start with
uncommenting large parts of your program. If no exception, then
you can try a smaller part, and so on.

Dirk

----- Original Message -----
From: "nagehan pala" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 03, 2004 2:58 PM
Subject: [JAVA3D] setPickable exception


> hi all,
>
> I have a TransformGroup node that is a child of a BranchGroup.
>
> BranchGroup bGroup = new BranchGroup();
>
> TransformGroup tGroup = new TransformGroup();
> tGroup.setCapability(TransformGroup.ENABLE_PICK_REPORTING);
> tGroup.setCapability(BranchGroup.ALLOW_PICKABLE_WRITE);
> bGoup.addChild(tGroup);
>
> While tGroup is alive(also bGroup), I want to change its pickability,
> tGroup.setPickable(false);
>
> Then this exception is given:
>
> Exception occurred during Behavior execution:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>         at java.util.ArrayList.RangeCheck(ArrayList.java:508)
>         at java.util.ArrayList.get(ArrayList.java:320)
>         at
javax.media.j3d.GroupRetained.updatePickable(GroupRetained.java:1284)
>         at
javax.media.j3d.GroupRetained.updatePickable(GroupRetained.java:1286)
>         at
javax.media.j3d.GroupRetained.updatePickable(GroupRetained.java:1286)
>         at javax.media.j3d.NodeRetained.setPickable(NodeRetained.java:513)
>         at javax.media.j3d.Node.setPickable(Node.java:704)
>         at Sunar.Sekil.arabirimleriGoster(Sekil.java:332)
>         at Sunar.SekilA.pressedMouse(SekilA.java:44)
>         at
Sunar.SekilPickBehavior.fareTiklandi(SekilPickBehavior.java:158)
>         at Sunar.MenuDavranisi.processStimulus(MenuDavranisi.java:100)
>         at
javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172)
>         at javax.media.j3d.J3dThread.run(J3dThread.java:250)
>
> Why is it given?Does anyone know the answer?
>
> Thanks
> Nagehan Pala
>
> _________________________________________________________________
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
>
>
===========================================================================
> 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".

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