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: Root Node
Yeah, for sure i may have touched the rootNode after updateGeometricState was called.
My question. I have to do this:
mp.setOnEndOfMedia(new Runnable() {
@Override public void run() {
initMediaPlayer(mediaView, actualList.getPath()+actualList.getMediaLocation());
instance.detachChild(node);
node = new TextureNode("mediaManagerTextureNode");
node.init(app, mp);
attachChild(node);
}
});
i know, if i wanted to do this i should use the simpleUpdate call, which is accessible everywhere, but how do i do it correct to not interfer with my update loop ?
Btw.: if this is solved i have a really nice candy to contribute, but without i cant’t be clear, that this is the only problem left ^^
How do i put that Runnable stuff somewhere threadsafe and still get my “endOfMedia” statement ?
My only concern is to get this thread safe. nothin more.
my MediaPlayer, which is “javafx.scene.media.MediaPlayer”, takes a Runnable and is of type void, same as the app enqueue.
There’s no Callback.
The app.enqueue does the same thing. I can add a Runnable to the MediaPlayer and i can add a Callable to the app enqueue, but i cannot add them to both, so where is the solution ?
I need that Callable be used, when endOfMedia is reached, which i define by setting the runnable for “setOnEndOfMedia”.
This clue i didn’t get yet. I don’t need the definitions ^^ Btw.: Thx for contribution !