Null Pointer in glLoadIdentity()

Hi All,

I'm in the process of switching from using a BasicSimpleGame to StandardGame+GameStates, and a call which was previously working fine has started giving NPEs:

Exception in thread "main" java.lang.NullPointerException

at org.lwjgl.opengl.GL11.glLoadIdentity(

at com.jme.renderer.lwjgl.LWJGLCamera.doFrameChange(

at com.jme.renderer.lwjgl.LWJGLCamera.getModelViewMatrix(

at com.jme.renderer.AbstractCamera.checkViewProjection(

at com.jme.renderer.AbstractCamera.getWorldCoordinates(

at com.jme.system.DisplaySystem.getWorldCoordinates(

at com.jme.system.DisplaySystem.getWorldCoordinates(

at com.moseph.touchWorld.touch.TouchManager.getRayForCoords(

at com.moseph.touchWorld.touch.TouchManager.getTouchPosForHeight(

at com.moseph.touchWorld.TouchSetupWorld.requestTouch(

at com.moseph.touchWorld.touch.TouchManager.setRequester(

at com.moseph.touchWorld.TouchSetupWorld.onActivate(

at com.moseph.touchWorld.ManagedWorld.setActive(




I'm guessing there's some kind of camera initialisation I'm not doing, but I've got no idea what?

switching from using a BasicSimpleGame to StandardGame+GameStates

This can happen when your other threads are calling methods that have to be run in openGL thread. Look for threading issues and use GameTaskQueueManager.update(Callable) to modify the scene graph in threads other than the openGL thread.

Cheers, i'll have a look into that.