JOGL applet crash

Hi all,

I am develloping some web-game based on JOGL. I haved asked to some tester to try my game (http://home.tele2.fr/titanelfe/feeriehunt.html). Its works well for most of them, but one can’t play the game.
He is on windows XP with NVDIA geforce MX 400. The drivers of the card are OK, and java 1.5 is installed. The gears applet demo works too. But when he tries my game, he has the following error :
Java Plug-in 1.5.0_08
Utilisation de la version JRE 1.5.0_08 Java HotSpot™ Client VM
Répertoire d’accueil de l’utilisateur = C:\Documents and Settings\moi


c: effacer la fenêtre de la console
f: finaliser les objets de la file d’attente de finalisation
g: libérer la mémoire
h: afficher ce message d’aide
l: vider la liste des chargeurs de classes
m: imprimer le relevé d’utilisation de la mémoire
o: déclencher la consignation
p: recharger la configuration du proxy
q: masquer la console
r: recharger la configuration des politiques
s: vider les propriétés système et déploiement
t: vider la liste des threads
v: vider la pile des threads
x: effacer le cache de chargeurs de classes
0-5: fixer le niveau de traçage à

Recharger la configuration des règles … terminé.
Vider la pile des threads …

Full thread dump Java HotSpot™ Client VM (1.5.0_08-b03 mixed mode, sharing):

“TimerQueue” daemon prio=6 tid=0x0ae81bb8 nid=0x9b0 in Object.wait() [0x0d8bf000…0x0d8bfce8]
at java.lang.Object.wait(Native Method)

  • waiting on <0x20c600d0> (a javax.swing.TimerQueue)
    at javax.swing.TimerQueue.run(Unknown Source)
  • locked <0x20c600d0> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Unknown Source)

“AWT-EventQueue-0” prio=6 tid=0x0b23ebf8 nid=0x3e8 in Object.wait() [0x0300f000…0x0300fd68]
at java.lang.Object.wait(Native Method)

  • waiting on <0x213476a0> (a java.awt.EventQueue)
    at java.lang.Object.wait(Unknown Source)
    at java.awt.EventQueue.getNextEvent(Unknown Source)
  • locked <0x213476a0> (a java.awt.EventQueue)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

“ConsoleWriterThread” daemon prio=6 tid=0x0b109c38 nid=0x264 in Object.wait() [0x02c6f000…0x02c6f9e8]
at java.lang.Object.wait(Native Method)

  • waiting on <0x2135d738> (a java.lang.Object)
    at java.lang.Object.wait(Unknown Source)
    at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source)
  • locked <0x2135d738> (a java.lang.Object)

“AWT-EventQueue-1” prio=6 tid=0x0a83a7f0 nid=0x428 runnable [0x0225f000…0x0225fa68]
at sun.plugin.JavaRunTime.dumpAllStacks(Native Method)
at sun.plugin.util.PluginConsoleController.dumpAllStacks(Unknown Source)
at com.sun.deploy.util.ConsoleWindow$1.actionPerformed(Unknown Source)
at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.KeyboardManager.fireBinding(Unknown Source)
at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

“AWT-Shutdown” prio=6 tid=0x0b2bb790 nid=0x82c in Object.wait() [0x0205f000…0x0205fae8]
at java.lang.Object.wait(Native Method)

  • waiting on <0x2136af08> (a java.lang.Object)
    at java.lang.Object.wait(Unknown Source)
    at sun.awt.AWTAutoShutdown.run(Unknown Source)
  • locked <0x2136af08> (a java.lang.Object)
    at java.lang.Thread.run(Unknown Source)

“Thread-11” prio=6 tid=0x0b37ace8 nid=0xcfc runnable [0x00000000…0x0e33f71c]

“traceMsgQueueThread” daemon prio=6 tid=0x0afe2230 nid=0xb40 in Object.wait() [0x0e63f000…0x0e63fc68]
at java.lang.Object.wait(Native Method)

  • waiting on <0x21353380> (a java.util.ArrayList)
    at java.lang.Object.wait(Unknown Source)
    at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
  • locked <0x21353380> (a java.util.ArrayList)
    at java.lang.Thread.run(Unknown Source)

“AWT-Windows” daemon prio=6 tid=0x0b172e48 nid=0x1a0 runnable [0x0e43f000…0x0e43fce8]
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

“Java2D Disposer” daemon prio=10 tid=0x0ae83660 nid=0xf94 in Object.wait() [0x0e23f000…0x0e23f9e8]
at java.lang.Object.wait(Native Method)

  • waiting on <0x21353078> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
  • locked <0x21353078> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at sun.java2d.Disposer.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

“Low Memory Detector” daemon prio=6 tid=0x0af7cb38 nid=0xd20 runnable [0x00000000…0x00000000]

“CompilerThread0” daemon prio=10 tid=0x0aecd9c0 nid=0x9f8 waiting on condition [0x00000000…0x0df3f8c8]

“Signal Dispatcher” daemon prio=10 tid=0x0b172a70 nid=0xf08 runnable [0x00000000…0x00000000]

“Finalizer” daemon prio=8 tid=0x0b3dcc88 nid=0xc2c in Object.wait() [0x0dd3f000…0x0dd3fc68]
at java.lang.Object.wait(Native Method)

  • waiting on <0x21353220> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
  • locked <0x21353220> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

“Reference Handler” daemon prio=10 tid=0x0adda0a8 nid=0xb44 in Object.wait() [0x0dc3f000…0x0dc3fce8]
at java.lang.Object.wait(Native Method)

  • waiting on <0x213532a0> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Unknown Source)
    at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
  • locked <0x213532a0> (a java.lang.ref.Reference$Lock)

“main” prio=6 tid=0x0ae9a340 nid=0xd18 runnable [0x00000000…0x0012f85c]

“VM Thread” prio=10 tid=0x0ab1de20 nid=0xb4 runnable

“VM Periodic Task Thread” prio=10 tid=0x0b591070 nid=0xde4 waiting on condition


If anyone have an idea ?

Thanks in advance,

Mathlamenace

ps : sorry for the english, I’am french

It isn’t clear what the problem is from this description. Nothing is wrong with the thread dump. What is the error? I see some French text probably meaning “terminated”, but don’t know where that’s coming from. It certainly isn’t coming from JOGL.

Hello,

After some cleaning in the code, the JVM does not crash but the screen remains black. I have added some print in order to follow the loading of the applet, everithing is OK. Is their a problem with NVIDIA card with jogl (I don’t use any extension)?

Mathlamenace

I’ve found NVidia hardware to be the most reliable for JOGL development. You may want to check the Java Runtime Environment settings and specify -Dsun.java2d.noddraw=true to the JVM launched within the web browser. This may improve the reliability on some Windows machines. It’s because properties like this can’t currently be specified for applets, but can for Java Web Started applications, that I recommend deploying via Java Web Start.

He has added the option -Dsun.java2d.noddraw=true for the applet runtime and it doesn’t anything, the xcreen remains black. I aggree with you to the stability of webstart deployement but my goal is to make web based game. In this scope, I think that jogl +applet can be a nice alternativ to flash or shockwave. Is it plane in java 1.6 to specify -Dsun.java2d.noddraw=true from applet and to increase their efficiency ?

Mathlamenace

Not currently, but this possibility has recently come up in internal discussions at Sun.

Hi,

I have installed the GLDebug and I have the following error :

Exception in thread “Timer-0” javax.media.opengl.GLException:
javax.media.opengl.GLException: glGetError() returned the following error
codes after a call to glClear(): GL_OUT_OF_MEMORY
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
at
javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:256)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
at com.sun.opengl.util.Animator.display(Animator.java:144)
at com.sun.opengl.util.FPSAnimator$1.run(FPSAnimator.java:95)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
Caused by: javax.media.opengl.GLException: glGetError() returned the
following error codes after a call to glClear(): GL_OUT_OF_MEMORY
at javax.media.opengl.DebugGL.checkGLGetError(DebugGL.java:11724)
at javax.media.opengl.DebugGL.glClear(DebugGL.java:413)
at feeriehunt.FeerieHunt.a(Unknown Source)
at utils.n.display(Unknown Source)
at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:281)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
at
javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:298)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

It seems strange for me because I have only few display list in my code. How to know how many memory left.

Mathlamenace

This sounds more like an OpenGL coding error in your application than really running out of memory. I’d recommend you try debugging this locally to the point where these errors no longer occur and only then try deploying it again in the context of the applet. You should also consider trying a Java Web Start deployment of your game.