Re: Exception in java3d

Hi Bill,

The second one of your suggested changes (the one I've quoted below)
stopped the exception from occurring.  I assumed that you meant to only
use one of those changes, and the change to clearBranch() is not needed
if the change to getBranch() works.  Is that correct?

Thanks for your quick response.

Russell




On Thu, Jul 10, 2003 at 08:45:28AM -0500, Bill Hibbard wrote:

>   public BranchGroup getBranch() {
>     synchronized (this) {
>       if (branches != null && branchNonEmpty[currentIndex] &&
>           branches[currentIndex].numChildren() > 0) {
>         return (BranchGroup) branches[currentIndex].getChild(0);
>       }
>       else {
>         return null;
>       }
>     }
>   }


> > java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
> >         at java.util.Vector.elementAt(Vector.java:427)
> >         at javax.media.j3d.GroupRetained.getChild(GroupRetained.java:410)
> >         at javax.media.j3d.Group.getChild(Group.java:219)
> >         at visad.java3d.RendererJ3D.getBranch(RendererJ3D.java:264)
> >         at visad.bom.ImageRendererJ3D.doTransform(ImageRendererJ3D.java:363)
> >         at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
> >         at visad.DisplayImpl.doAction(DisplayImpl.java:1559)
> >         at visad.ActionImpl.run(ActionImpl.java:353)
> >         at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)


-- 
Russell Steicke

-- Fortune says:
"The C Programming Language -- A language which combines the flexibility of
assembly language with the power of assembly language."


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: