Reloading an applet in SAFARI (mac or PC)

Hi,



We are having issues on the Mac reloading (refreshing) our lwjgl applet. On some browsers setting the newJnm to true works great. On safari it shits the bed.If we use system.exit it shuts down safari as well as the applet!!!



it seems



org.lwjgl.LWJGLException: Parent.isDisplayable() must be true



is the big culprit here. Whenever it tries to remake the display it dies. We do destroy the parent display on shutdown.





Here is the output when we try and reload from within eclipse appletloader

Any Ideas?









Aug 25, 2009 3:06:01 PM com.jme.system.PropertiesGameSettings load

WARNING: Properties file not complete.

org.lwjgl.LWJGLException: Parent.isDisplayable() must be true

at org.lwjgl.opengl.Display.createWindow(Display.java:303)

at org.lwjgl.opengl.Display.create(Display.java:839)

at org.lwjgl.opengl.Display.create(Display.java:767)

at com.jmex.awt.applet.BaseApplet$1.run(BaseApplet.java:123)

Aug 25, 2009 3:06:01 PM class cube.CubeMobile start()

SEVERE: Exception in game loop

java.lang.NullPointerException

at com.jme.renderer.lwjgl.LWJGLRenderer.<init>(LWJGLRenderer.java:200)

at com.jme.system.lwjgl.LWJGLDisplaySystem.initForApplet(LWJGLDisplaySystem.java:688)

at com.jmex.awt.applet.BaseApplet.gameLoop(BaseApplet.java:156)

at com.jmex.awt.applet.BaseApplet$1.run(BaseApplet.java:129)

Shutting Down

End Shutting Down








See if the lwjgl demo applet (gears) works on safari.

If it does, check what they do different when initializing / restarting the applet.


Did you ever success with this?



We are having the same issue with the JOGL version.  You can only ever run once in a browser without a complete browser shutdown and restart.  And when you kill the window you get thread exceptions.  Here's the dumps FWIW and thansk for ANY help, we are hosed right now  :frowning:



End of first applet:

eb 4, 2010 7:51:51 PM imi.demos.AppletBase stop

INFO: stop

Feb 4, 2010 7:51:51 PM imi.demos.AppletBase destroy

INFO: destroy

Exception in thread "pool-2-thread-1" java.lang.IllegalMonitorStateException

at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1175)

at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)

at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:369)

at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:637)

Exception in thread "pool-2-thread-4" java.lang.IllegalMonitorStateException

at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1175)

at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)

at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:369)

at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:637)

Exception in thread "pool-2-thread-5" java.lang.IllegalMonitorStateException

at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1175)

at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)

at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:369)

at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:637)

Exception in thread "pool-2-thread-2" java.lang.IllegalMonitorStateException

at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1175)

at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)

at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:369)

at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:637)

Exception in thread "pool-2-thread-3" java.lang.IllegalMonitorStateException

at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1175)

at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)

at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:369)

at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:637)

Mac-Pro:~ macuser$







Exception when started the next applet in the session:



Feb 4, 2010 7:51:27 PM imi.demos.AppletBase start

INFO: start

Exception in thread "Thread-20" java.lang.IllegalStateException: There is already an active OpenGL canvas.

at com.jme.system.jogl.JOGLDisplaySystem.createCanvas(JOGLDisplaySystem.java:310)

at org.jdesktop.mtgame.Renderer.createCanvas(Renderer.java:583)

at org.jdesktop.mtgame.Renderer.addRenderBuffer(Renderer.java:605)

at org.jdesktop.mtgame.RenderManager.addRenderBuffer(RenderManager.java:180)

at imi.demos.AppletBase$RenderPanel.<init>(AppletBase.java:374)

at imi.demos.AppletBase$AppletInitializer.run(AppletBase.java:202)

at java.lang.Thread.run(Thread.java:637)