applet not always working

hello, i try to run a jogl applet on a website and use the jnlp appletlauncher

the problem is, that the exception only occurs occasionally, not always. so sometimes it works, sometimes it doesn’t.
it seems to occur less often in firefox, more often in internet explorer and so far it never worked in opera.

this is from the console log:

Java Plug-in 1.6.0_05
Verwendung der JRE-Version 1.6.0_05 Java HotSpot(TM) Client VM
Home-Verzeichnis des Benutzers = C:\Users\matt


----------------------------------------------------
c:   Konsole löschen
f:   Objekte in Finalisierungswarteschlange finalisieren
g:   Speicherbereinigung
h:   Diese Hilfemeldung anzeigen
l:   ClassLoader-Liste ausgeben
m:   Speicherbelegung anzeigen
o:   Protokollierung auslösen
p:   Proxy-Konfiguration neu laden
q:   Konsole ausblenden
r:   Richtlinien-Konfiguration neu laden
s:   System- und Bereitstellungseigenschaften ausgeben
t:   Threadliste ausgeben
v:   Thread-Stack ausgeben
x:   ClassLoader-Cache löschen
0-5: Trace-Stufe auf <n> setzen
----------------------------------------------------

JNLPAppletLauncher: static initializer
os.name = windows vista
nativePrefix =   nativeSuffix = .dll
tmpRootDir = C:\Users\matt\AppData\Local\Temp\jnlp-applet\jln12777
Applet.init
subapplet.classname = com.embege.shadowmapping.SMApplet
subapplet.displayname = ShadowMapping
Applet.start
os.name = windows vista
os.arch = x86
processNativeJar: using previously cached: C:\Users\matt\.jnlp-applet\cache\www_embege_com\a5cfa29f8938b5eae2220310022e4ad710368455\jogl-natives-windows-i586.jar
validateCertificates:
VALIDATE: jogl.dll
VALIDATE: jogl_awt.dll
VALIDATE: jogl_cg.dll
extractNativeLibs:
EXTRACT: jogl.dll(jogl)
EXTRACT: jogl_awt.dll(jogl_awt)
EXTRACT: jogl_cg.dll(jogl_cg)
processNativeJar: using previously cached: C:\Users\matt\.jnlp-applet\cache\www_embege_com\a5cfa29f8938b5eae2220310022e4ad710368455\gluegen-rt-natives-windows-i586.jar
validateCertificates:
VALIDATE: gluegen-rt.dll
extractNativeLibs:
EXTRACT: gluegen-rt.dll(gluegen-rt)
JNLPAppletLauncher.loadLibrary("jogl")
    loading: C:\Users\matt\AppData\Local\Temp\jnlp-applet\jln12777\jln12778\jogl.dll
JNLPAppletLauncher.loadLibrary("jogl_awt")
    loading: C:\Users\matt\AppData\Local\Temp\jnlp-applet\jln12777\jln12778\jogl_awt.dll
Exception in thread "Thread-11" javax.media.opengl.GLException: java.lang.InterruptedException
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:273)
	at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410)
	at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
	at com.sun.opengl.util.Animator.display(Animator.java:144)
	at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at java.awt.EventQueue.invokeAndWait(Unknown Source)
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:269)
	... 5 more
Applet.init
subapplet.classname = com.embege.shadowmapping.SMApplet
subapplet.displayname = ShadowMapping
Applet.start
Exception in thread "Thread-18" javax.media.opengl.GLException: java.lang.InterruptedException
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:273)
	at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410)
	at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
	at com.sun.opengl.util.Animator.display(Animator.java:144)
	at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at java.awt.EventQueue.invokeAndWait(Unknown Source)
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:269)
	... 5 more
Applet.init
subapplet.classname = com.embege.shadowmapping.SMApplet
subapplet.displayname = ShadowMapping
Applet.start

html code


<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
      codebase="http://www.embege.com/shadowmapping/"
      width="600"
      height="600"
      archive="http://download.java.net/media/applet-launcher/applet-launcher.jar, http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar, http://download.java.net/media/gluegen/webstart/gluegen-rt.jar, shadowmapping.jar">
   <param name="codebase_lookup" value="true">
   <param name="subapplet.classname" value="com.embege.shadowmapping.SMApplet">
   <param name="subapplet.displayname" value="ShadowMapping">
   <param name="noddraw.check" value="false">
   <param name="progressbar" value="true">
   <param name="cache_option" value="no">
   <param name="jnlpNumExtensions" value="1">
   <param name="jnlpExtension1" value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp">
</applet>

if you would like to see the code, please tell me.

thanks for any help!

Could you please try the new Java Plug-In from http://jdk6.dev.java.net/6u10ea.html and tell us whether you continue to see the same problems?

thanks, but unfortunately this also does not work with the new plugin. here is the error from the console:

this OS is vista64 but the jre is 32bit. may that be the problem?

Running JVMParams: [JVMParameters: isSecure: true, args: -Djava.class.path=C:\\PROGRA~2\\Java\\jre6\\classes]
	-> [JVMParameters: isSecure: true, args: -Djava.class.path=C:\\PROGRA~2\\Java\\jre6\\classes]
Java Plug-in 1.6.0_10-beta
Verwendung der JRE-Version 1.6.0_10-beta Java HotSpot(TM) Client VM
Home-Verzeichnis des Benutzers = C:\Users\matt


----------------------------------------------------
c:   Konsole löschen
f:   Objekte in Finalisierungswarteschlange finalisieren
g:   Speicherbereinigung
h:   Diese Hilfemeldung anzeigen
l:   ClassLoader-Liste ausgeben
m:   Speicherbelegung anzeigen
o:   Protokollierung auslösen
q:   Konsole ausblenden
r:   Richtlinien-Konfiguration neu laden
s:   System- und Bereitstellungseigenschaften ausgeben
t:   Threadliste ausgeben
v:   Thread-Stack ausgeben
x:   ClassLoader-Cache löschen
0-5: Trace-Stufe auf <n> setzen
----------------------------------------------------

JNLPAppletLauncher: static initializer
os.name = windows vista
nativePrefix =   nativeSuffix = .dll
tmpRootDir = C:\Users\matt\AppData\Local\Temp\jnlp-applet\jln24952
Applet.init
subapplet.classname = com.embege.shadowmapping.SMApplet
subapplet.displayname = ShadowMapping
Applet.start
os.name = windows vista
os.arch = x86
processNativeJar: using previously cached: C:\Users\matt\.jnlp-applet\cache\www_embege_com\a5cfa29f8938b5eae2220310022e4ad710368455\jogl-natives-windows-i586.jar
validateCertificates:
VALIDATE: jogl.dll
VALIDATE: jogl_awt.dll
VALIDATE: jogl_cg.dll
extractNativeLibs:
EXTRACT: jogl.dll(jogl)
EXTRACT: jogl_awt.dll(jogl_awt)
EXTRACT: jogl_cg.dll(jogl_cg)
processNativeJar: using previously cached: C:\Users\matt\.jnlp-applet\cache\www_embege_com\a5cfa29f8938b5eae2220310022e4ad710368455\gluegen-rt-natives-windows-i586.jar
validateCertificates:
VALIDATE: gluegen-rt.dll
extractNativeLibs:
EXTRACT: gluegen-rt.dll(gluegen-rt)
JNLPAppletLauncher.loadLibrary("jogl")
    loading: C:\Users\matt\AppData\Local\Temp\jnlp-applet\jln24952\jln24953\jogl.dll
JNLPAppletLauncher.loadLibrary("jogl_awt")
    loading: C:\Users\matt\AppData\Local\Temp\jnlp-applet\jln24952\jln24953\jogl_awt.dll
Exception in thread "Thread-12" javax.media.opengl.GLException: java.lang.InterruptedException
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:273)
	at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410)
	at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
	at com.sun.opengl.util.Animator.display(Animator.java:144)
	at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at java.awt.EventQueue.invokeAndWait(Unknown Source)
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:269)
	... 5 more

I don’t see any exception related to the actual OpenGL code running, only an InterruptedException indicating that the Animator’s thread was interrupted by the outside world. This is expected behavior during applet teardown. Do you have an example on the web we can look at? Do the simple JOGL demos work?

yes, the jogl gears applet-demo works fine.

yes, there is an example online here:

http://www.embege.com/shadowmapping/applet.php

applet code:

package com.embege.shadowmapping;

import java.applet.Applet;
import java.awt.Color;

import javax.media.opengl.GLCanvas;


public class SMApplet extends Applet  {

	private static final long serialVersionUID = 1L;

	@Override
	public void init() {

		setBackground(Color.WHITE);

		GLCanvas canvas = new ShadowMapping("data");
		add(canvas);

		setVisible(true);

		setSize(getWidth(), getHeight());
		canvas.setSize(getSize());
	}

}