RenderManager not ready yet?

Hello,



I have got following problem. I am using JME3.0 within Netbeans. Everything works quite well but sometimes following error occurs



java.lang.AssertionError

at com.jme3.scene.Node.updateWorldBound(Node.java:129)

at com.jme3.scene.Node.updateGeometricState(Node.java:189)

at at.netcrystals.praxiteles.jme3.objects.PraxitelesApplication$PraxitelesApplicationImpl.update(PraxitelesApplication.java:586)

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

at com.jme3.system.lwjgl.LwjglCanvas.runLoop(LwjglCanvas.java:226)

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

[catch] at java.lang.Thread.run(Thread.java:619)

INFO [com.jme3.system.lwjgl.LwjglDisplay]: EDT: Sending re-init request…



This always happens if I want to add a spatial or node right after my Netbeans platform has started. The error is located within the update method of the application class. Exactly at



[java]



rootNode.updateGeometricState();



[/java]



I think, that the renderManager is not yet ready for processing any add/move/delete spatial nodes. So, in my point of view, there should be something like a method which tells me if the renderer and/or renderManager is ready for updating. Still now, the beginning of the update method looks like this…



[java]

@Override

public void update() {

if (speed == 0 || paused) {

return;

}



}

[/java]



in my opinion, there should be something like…



[java]

@Override

public void update() {

if (speed == 0 || paused || !renderer.isReady()) {

return;

}



}

[/java]



Does such a method exist in any class?



Thanks for help.



Regards,

Equi

No, its some quirk in how you start the application. The normal applications run logic is fine. You sure you do everything on the render thread?

“…You sure you do everything on the render thread?..”



you mean it could be that I add something outside the render thread using the enqueue method? Hmmm…Possible. I’ll look for it. The problem does not occur all the time just sometimes.



Thanks.



Rgeards,

Equi

I meant more like directly from another thread, w/o using the queue. If its not deterministic it sounds like a racing condition or smth.

This error can occur if the scene graph is being modified from another thread.

Make sure to execute all scene graph modifying code in a Callable.