Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

26. May 2012, 10:01:31 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)NPE in Chapter09a.java
Pages: [1]
Print
Author Topic: NPE in Chapter09a.java  (Read 747 times)
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« on: 04. May 2007, 12:40:22 pm »

Hi,

In the org.xith3d.xin.Chapter09a class provided in the xith-tk, when I click, I get the following stack trace :
Code:
Exception in thread "Thread-3" java.lang.NullPointerException
at org.xith3d.render.DefaultRenderer.renderOnceInternal(DefaultRenderer.java:431)
at org.xith3d.render.DefaultRenderer.performPickings(DefaultRenderer.java:522)
at org.xith3d.render.DefaultRenderer.renderOnce(DefaultRenderer.java:563)
at org.xith3d.base.Xith3DEnvironment.render(Xith3DEnvironment.java:445)
at org.xith3d.loop.RenderLoop.renderNextFrame(RenderLoop.java:557)
at org.xith3d.loop.RenderLoop.loopIteration(RenderLoop.java:580)
at org.xith3d.loop.RenderLoop.update(RenderLoop.java:634)
at org.xith3d.loop.UpdatingThread.nextIteration(UpdatingThread.java:172)
at org.xith3d.loop.RenderLoop.loop(RenderLoop.java:692)
at org.xith3d.loop.UpdatingThread.run(UpdatingThread.java:220)
at org.xith3d.loop.RenderLoop.run(RenderLoop.java:715)
at java.lang.Thread.run(Thread.java:619)

which correspond to this line of code :
Code:
if (pickRequest == null)
        {
            if (root instanceof VirtualUniverse)
                universe = (VirtualUniverse)root;
            else if (root instanceof Locale)
                universe = ((Locale)root).getUniverse();
            else if (root instanceof GroupNode)
                universe = ((GroupNode)root).getRoot().getLocale().getUniverse();
            else
                throw( new IllegalArgumentException( "root must be eighter VirtualUniverse, Locale or GroupNode." ) );
        }
        else
        {
            universe = ((GroupNode)pickRequest.getGroups().get( 0 )).getRoot().getLocale().getUniverse(); /// << ---- THIS line of code
        }
Any ideas ? Does it work for you ?
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 04. May 2007, 06:42:43 pm »

I will check it when I come home. Well, maybe tomorrow. (I finally bought a new Graphics board, that I need to test Wink).

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic