IllegalStateException after creating another ViewPort

Hello there,

I’m using SVN jme3 and after adding another ViewPort using createPostView on my SimpleApplication’s renderManager instance within the simpleInitApp method. I get the following error:

08.03.2011 17:35:23 handleError
SCHWERWIEGEND: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.IllegalStateException: Scene graph is not properly updated for rendering.
Make sure scene graph state was not changed after
rootNode.updateGeometricState() call.
Problem spatial name: null
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 jMonkeyEngine.core.proxy$$0.update(Unknown Source)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(

I don't really do anything with the new ViewPort besides adding the simpleApp's rootNode to it. Also, the rootNode contains only one element which is a BitmapText with a BillboardControl added to it. Removing the code for creating the new ViewPort or, removing the code for adding a single BitmapText element or removing the code for adding a BillboardControl to the BitmapText instance solves the problem.
My guess is adding the BillboardControl within the initApp method is the problem - but where should I put it instead?

kind regards,

The scene in the post and pre views are not updated automatically, you have to call rootNode.updateLogical and -GeometricState() for those root nodes yourself each update.

Shouldn’t the rootNode’s update methods already be called from the main view? The post view has the same rootNode after all.

did you try it?

Yes and no. I created another node and added that to the new view. On the new node I now call updateLogicalState and updateGeometricState just as you said and that works.

Thanks a lot!