detachChild from a thread IllegalStateException :/

hello i’m having an issue after detaching a child of the rootnode from a thread. :-?
Error:
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: …

Is there a safe way to remove childs from a thread?

yes, enqueue them on your thread. (Off top of my head)
[java]
app.enqueue (new Callable () {

   public Void call() {
           app.getRootNode ().detachChild (spatial);
           return null;
     }

}[/java]

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:multithreading

thx for your reply wezrule,
isn’t it weird to make a thread from my thread to detach a child?

The enqueue is not a thread. This is a piece of code that will be executed by the render-thread later.

Enqueue doesn’t create a new thread. Read the threading tutorial, it explains all this in detail.

thanks alot guys.

Mark the thread as resolved please if its fixed.