Strange errors in new revision

I get lots of these errors in new revision (still don’t know if they are problems in JME3 or problems in my program - although I didn’t have them before…):

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

java.lang.IllegalStateException: Scene graph is not properly updated for rendering.Make sure scene graph state was not changed after rootNode.updateGeometricState() call.

at com.jme3.scene.Spatial.checkCulling(

at com.jme3.renderer.RenderManager.renderScene(

at com.jme3.renderer.RenderManager.renderViewPort(

at com.jme3.renderer.RenderManager.render(


at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(

at com.jme3.system.lwjgl.LwjglCanvas.runLoop(


at Source)

I am rendering inside Canvas if it is of any help…

You do something wrong in your update order. Somehow you modify the location or rotation or something else of a Spatial after rootNode.updateGeometricState() has been called and before render() is called. It might also be that you miss an rootNode.updateGeometricState() call for some pre view or something altogether.



Hmm, I suspect that this is probably because I am rendering in Canvas and I am attaching and detaching children to my rootNode, based on user actions in Swing part. I am doing this with Callable and enque, as you normen once suggested. :slight_smile:

The problem is that everything worked fine until I updated my SVN copy of JME3 to latest revision. I checked history and found out that this changed in this revision:

So I am curious how we are supposed to do such things now (when this Callable thing doesn’t work anymore)? :slight_smile:

The callable thing should work, guess its something else… Maybe we should output the name of the node that caused the trouble so its easier to debug.

Ok, this thing is still bothering me. Can’t get this to work no matter what I try. Since there is no way I change scene graph state after rootNode.updateGeometricState() and before renderManager.render(tpf) in SimpleApplication.update() method, I can only conclude that this Callable thing doesn’t work as it is supposed to (and it probably changes scene graph state right between those lines).

Any ideas what can I do? :confused:

I committed a change to svn that outputs the “problem spatial” when you get that exception so you can debug better.



Cool, that helped! Thank you!

So what was it?

Seems that I must wrap some more of my code to Callable… :slight_smile:

I have wrapped only detach/attach parts and forgot about some elements which I scaled (there weren’t lots of them so I got confused). Obviously that must be wrapped too…

Any other things that are necessary to be injected in main graphics thread? :slight_smile:

Everything thats modifying the scenegraph or objects therein.