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(GL11.java:1849)

at com.jme.renderer.lwjgl.LWJGLCamera.doFrameChange(LWJGLCamera.java:249)

at com.jme.renderer.lwjgl.LWJGLCamera.getModelViewMatrix(LWJGLCamera.java:289)

at com.jme.renderer.AbstractCamera.checkViewProjection(AbstractCamera.java:1006)

at com.jme.renderer.AbstractCamera.getWorldCoordinates(AbstractCamera.java:958)

at com.jme.system.DisplaySystem.getWorldCoordinates(DisplaySystem.java:749)

at com.jme.system.DisplaySystem.getWorldCoordinates(DisplaySystem.java:732)

at com.moseph.touchWorld.touch.TouchManager.getRayForCoords(TouchManager.java:164)

at com.moseph.touchWorld.touch.TouchManager.getTouchPosForHeight(TouchManager.java:246)

at com.moseph.touchWorld.TouchSetupWorld.requestTouch(TouchSetupWorld.java:135)

at com.moseph.touchWorld.touch.TouchManager.setRequester(TouchManager.java:291)

at com.moseph.touchWorld.TouchSetupWorld.onActivate(TouchSetupWorld.java:42)

at com.moseph.touchWorld.ManagedWorld.setActive(ManagedWorld.java:175)

at com.moseph.touchWorld.run.TableApplication.addStates(TableApplication.java:65)

at com.moseph.touchWorld.run.TableApplication.initialise(TableApplication.java:44)

at com.moseph.touchWorld.run.TableApplication.main(TableApplication.java:27)



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.