wjc272008 / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Application doesn't cannot be started after being stopped #508

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In one of jME3's tests, in the main() method, put the following code after 
app.start():
Thread.sleep(1000);
app.stop();
Thread.sleep(1000);
app.start();

What is the expected output? What do you see instead?
It is expected that the app will launch a second time normally, instead, it 
fails.

Original issue reported on code.google.com by ShadowIs...@gmail.com on 11 Jun 2012 at 1:06

GoogleCodeExporter commented 9 years ago
See exception below:
org.lwjgl.opengl.OpenGLException: Invalid value (1281)
at org.lwjgl.opengl.Util.checkGLError(Util.java:59)
[catch] at 
com.jme3.system.lwjgl.LwjglOffscreenBuffer.checkGLError(LwjglOffscreenBuffer.jav
a:101)
at 
com.jme3.system.lwjgl.LwjglOffscreenBuffer.runLoop(LwjglOffscreenBuffer.java:124
)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.run(LwjglOffscreenBuffer.java:147)
at java.lang.Thread.run(Thread.java:722)

Original comment by ShadowIs...@gmail.com on 11 Jun 2012 at 1:06

GoogleCodeExporter commented 9 years ago
There's too much state being initialized in the Application class to allow it 
to reinitialize properly (also assuming user code to know this). Its best to 
handle this process on the context side rather than app side. Currently the AWT 
panel and canvas support this process therefore user code should use these 
types of contexts when the app should support user closing it and opening again.

Original comment by ShadowIs...@gmail.com on 16 Jun 2012 at 7:56