Client Handler is killing the renderer

[java]SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.IllegalStateException: Scene graph is not properly updated for rendering.

State was changed after rootNode.updateGeometricState() call.

Make sure you do not modify the scene from another thread!

Problem spatial name: Root Node

at com.jme3.scene.Spatial.checkCulling(Spatial.java:241)

at com.jme3.renderer.RenderManager.renderScene(RenderManager.java:776)

at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1117)

at com.jme3.renderer.RenderManager.render(RenderManager.java:1168)

at com.jme3.app.SimpleApplication.update(SimpleApplication.java:254)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:149)

at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:182)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:223)

at java.lang.Thread.run(Thread.java:722)[/java]





What you see above is the error that is killing the lwjgl renderer. Not even using multithreading. All i am using is the client listener for the client/server thing. In the Handler class, i am updating positions, and other rendering things. Please help me. :frowning:

I am pretty sure the jME3 Networking API does use threads … so you are multithreaded. You cannot modify the scene graph outside the render thread.

Networking is absolutely multithreaded. All listeners are called from non-rendering threads. You have to queue up changes or otherwise handle the threading issues somehow.

hmm, so i can only update within simpleupdate? or could i somehow do a try catch somewhere?

This may be too complicated for your skill level. In the event that it isn’t, there is a page on he wiki about threading that will be helpful.

Basically, you can only can within simpleUpdate. Store all the modifications that needs to be done somewhere (a buffer), and in the next simpleUpdate, process them.

How about using the enqueue method?