[OpenGL Thread Issue?] Exception in Camera.doFrustumChange

Hi!



I have an applet which crashes from time to time with

an exception in Camera.doFrustumChange.

[java]

at com.jme.renderer.lwjgl.LWJGLCamera.doFrustumChange(Unknown Source)

at com.jme.renderer.lwjgl.LWJGLCamera.apply(Unknown Source)

at com.jme.renderer.lwjgl.LWJGLRenderer.reinit(Unknown Source)

at de.macrocom.planer3d.jme.BaseAppletCanvasImpl.resize(BaseAppletCanvasImpl.java:257)

at de.macrocom.planer3d.jme.BaseAppletCanvasImpl.doRender

[/java]



I found a link (SimpleGame to StandardGame by darkfrog)

https://wiki.jmonkeyengine.org/legacy/doku.php/simplegame_to_standardgame

which resembles the behaviour I have in my applet. The author says that I have to wait for the

OpenGL-Thread when I’m initialising the camera

https://wiki.jmonkeyengine.org/legacy/doku.php/simplegame_to_standardgame#creating_and_managing_cameras



He did so by doing that:

[java]Future<Camera> future = GameTaskQueueManager.getManager().update(new Callable<Camera>() {

public Camera call() throws Exception {

DisplaySystem display = DisplaySystem.getDisplaySystem();

int width = display.getWidth();

int height = display.getHeight();

Camera camera = display.getRenderer().createCamera(width, height);

camera.setFrustumPerspective(45.0f, (float)width / (float)height, 1, 1000);

return camera;

}

});

Camera myCamera = future.get();

[/java]



But I’m not implementing a SimpleGame or a StandardGame, so there is no

GameTaskQueueManager
, at least it returns
northing in my case.
I'm extending the
JMECanvasImplementor
, because I
use the canvas in my applet.

If I'm on the right path here to solve my crashes with my camera:
What is the counterpart of
GameTaskQueueManager
,
if I use JMECanvasImplementor (no SimpleGame/StandardGame)?

If I'm wrong: has anybody an idea how to fix random crashes when creating the camera?
Where could I look?

I'm using LWJGL 1.x with JME 1.0. Sorry, I can't update.

Thanks,
Bernd

PS: Is there no preview before posting sth?