customize GearsApplet fails

Dear all,

I am trying to modify the GearsApplet demo from https://jogl-demos.dev.java.net/applettest.html to run my own JOGL-base applet. It doesn’t work. The statusbar in Firefox shows “Applet org.jdesktop.applet.util.JNLPAppletLauncher started” and in the browser window I see a label “Starting applet JOGL Gears Applet” (I didn’t change the source code, yet). Nothing else happens.

So I use the original jogl-demos.jar again. In order to prepare using my own versions of the archives, I copy all these 5 files to my webserver:
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,
http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl-demos.jar, and
http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp.

The following page shows the GearsApplet correctly:

But if I replace the archive gluegen-rt.jar with the line
http://localhost/~hans/gluegen-rt.jar,
I have the same problem as described above. The applet says it’s starting, nothing else.

My questions:

  1. Can you tell me what I might be doing wrong when
    a) using my own copy of gluegen-rt.jar or when using
    b) using my self-compiled GearsApplet (from https://jogl.dev.java.net/#NIGHTLY) together with the otherwise unmodified applettest.html
  2. Can I find logfiles (Firefox? Apache? JVM?) that describe where the applet is hanging? Where should I look?
  3. Does a tutorial exist that describe, how to customize the GearsApplet, where to put which archive and so on?

My system is:
Ubuntu 8.04, i386 arch, Firefox 3.05 with sun-java6-plugin

Thanks
Hans

Hi

Please check that you have a recent update of the JDK 1.6.

Hi, I’ll connect to this thread, because my problem also concern GearsApplet. I cannot get it to work either as a application or a applet. I’m using jogl-2.0, jdk1.6(update 14 on ubuntu 9.04). In eclipse I’m adding following jars : gluegen-rt.jar,jogl.all.jar,nativewindow.all.jar(+ paths to the native libraries for each .jar).

Compilation goes right, problem begins when I’m trying to run GearsApplet.
In console I get long list full of erros like :



Exception in thread "Timer-0" javax.media.opengl.GLException: javax.media.opengl.GLException: Error making context current
	at com.sun.opengl.impl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:101)
	at com.sun.opengl.impl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:190)
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:164)
	at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:549)
	at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:290)
	at com.sun.opengl.util.AnimatorImpl.display(AnimatorImpl.java:50)
	at com.sun.opengl.util.Animator.display(Animator.java:131)
	at com.sun.opengl.util.FPSAnimator$1.run(FPSAnimator.java:95)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
...

Exception in thread "AWT-EventQueue-1" javax.media.opengl.GLException: Error making context (new) current: display 0x96fa1b8, context 0x9a2b178, drawable com.sun.opengl.impl.x11.glx.X11OnscreenGLXDrawable[realized true,
	requested GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
	chosen    GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
	window    JAWT-Window[windowHandle 0x3000024, surfaceHandle 0x3000024, pos 0/0, size 200x200, visible true, locked true,
	config class javax.media.nativewindow.awt.AWTGraphicsConfiguration[class javax.media.nativewindow.awt.AWTGraphicsScreen[class javax.media.nativewindow.awt.AWTGraphicsDevice[type AWT, awtDevice X11GraphicsDevice[screen=0], handle 0x96fa1b8], idx 0],
	chosen    GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
	requested GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
	X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x27],
	encapsulated X11GLXGraphicsConfiguration[class javax.media.nativewindow.x11.X11GraphicsScreen[class javax.media.nativewindow.x11.X11GraphicsDevice[type X11, handle 0x96fa1b8], idx 0], visualID 0x27, fbConfigID 0xa1,
	requested GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
	chosen    GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false]]],
	wrappedWindow AWT-GLCanvas[ class javax.media.nativewindow.awt.AWTGraphicsConfiguration[class javax.media.nativewindow.awt.AWTGraphicsScreen[class javax.media.nativewindow.awt.AWTGraphicsDevice[type AWT, awtDevice X11GraphicsDevice[screen=0], handle 0x96fa1b8], idx 0],
	chosen    GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
	requested GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
	X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x27],
...
...
...


I noticed, that problem is with adding GLCanvas(if I uncomment “add(canvas, BorderLayout.CENTER);” in GearsApplet.java and “frame.add(canvas);” in Gears.java it doesn’t show any errors at run time).
So how can I display GLCanvas(in jogl-2.0, jogl-1.1 worked) on the screen without getting any errors ?

Thanks in advance and sorry for my poor English.

https://jogl-demos.dev.java.net/applettest-jnlp.html
https://jogl-demos.dev.java.net/applettest.html

Both are working for me (JOGL 2.x) … on Linux/Win FF3, MacOSX FF3/Safari.

+++

Hans, you need to add more stuff to your private deployment …
Edit the codebase/urls of jogl.jnlp and gluegen-rt.jnlp, the latter is loaded by jogl.jnlp.
Deploy all the referenced JAR files as well …

Hint: To debug a JOGL applet:

  • Add JRE Arguments:
    “-Dgluegen.debug.NativeLibrary=true -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all”
  • Enable logging/trace and pop up the console …

+++

Thank you, sgoethel.

Editing the codebases of jogl.jnlp and gluegen-rt.jnlp finally gave me at least some error (…SAXParseException: The element type “exception” must be terminated…) which is a progress. We don’t need to discuss this error here unless you have the immediate solution. I found the SAXParseException mentioned somewhere else.

I need more help with the debug settings.
Where do I add the JRE Arguments “-Dgluegen.debug.NativeLibrary=true…” when using firefox? Do I need some firefox extension?
I also tried running the applet using appletviewer, but it fails with:
java.security.AccessControlException: access denied (java.net.SocketPermission localhost connect,accept,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.net.URLClassLoader$4.run(URLClassLoader.java:492)

Do you have an explanation why I get different errors in Firefox and appletviewer?

Thanks
Hans

Hi Hans,

keep in mind that the applet’s codebase is the starting point from where you are able to fetch
JAR archives, using the applet TAG archive.
This is true for JNLP as well, ie you cannot jailbreak the JNLP’s codebase,
ie fetch ressources from somewhere ‘above’ it’s codebase.

Check my updated blog entry http://blog.jausoft.com/2009/06/30/jogl-bugreports/
where I have added the applet case and debug settings.

Cheers, Sven