Error: State was changed after rootNode.updateGeometricState() call

I’m getting an IllegalStateException from creating a ViewPort in this initialize() method in BaseAppState subclass.

protected void initialize(Application app) {
    ui = new Camera(app.getCamera().getWidth(), app.getCamera().getHeight());
    view = app.getRenderManager().createPostView("weapon manipulator view", ui);
    view.setBackgroundColor(new ColorRGBA(.5f, .5f, .5f, .5f));
    view.attachScene(scene); // add "weapon manipulator scene" node to the viewport
    in = app.getInputManager();
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: weapon manipulator scene
	at com.jme3.scene.Spatial.checkCulling(
	at com.jme3.renderer.RenderManager.renderSubScene(
	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.LwjglDisplay.runLoop(

If you create your own viewport then you must manage it.

This means calling updateLogicalState and updateGeometricState once per frame. You might be able to search the forum for “ViewPortAppState” or something like that as this has come up before.

Lemur also has a viewport demo that can provide some clues also:


Ok, that fixed it. Thanks!

Note: for future reference, this forum post helped too.

1 Like

Heheh… yeah, you can tell I’ve posted about this a lot. :slight_smile: