JOGL Applet stop() failing?

Before complaining, I want to say that the JOGL applet launcher is great, just what I’ve been waiting for.

Startup and normal use work great for me… I’ve even had multiple instances running on a page.

However, I can routinely get Safari (on Mac OS X 10.4.8 ) to crash when I browse away from my JOGL applet. I get Mac OS X crash report dialog, and each time I’ve looked there’s a thread crashed doing JOGL rendering:

Thread 23 Crashed:
0 <<00000000>> 0x0188cc63 0 + 25742435
1 libGL.dylib 0x92b0d5fc glVertex3d + 139
2 libjogl.jnilib 0x27c65657 Java_com_sun_opengl_impl_GLImpl_glVertex3d__DDD + 79

I’m using an Animator, but the Applet.stop() method calls the Animator.stop() method.

Is there more I need to do to cleanly destore the applet? Or safely finish the last display() call?

Thank you,

Scott Vorthmann

More info…

This only happens in Safari. Firefox works fine, whether reloading the applet page or just exiting it. I suppose this is good indication of a bug in Safari, but I would hesitate to say so.

Scott

Does the JOGL Gears applet crash in the same way?

Animator.stop() isn’t able to wait for the rendering thread to completely finish its work in all situations, although I don’t think that’s the problem here. Try adding a “terminating” flag on your applet which you set in stop() and prevent re-entering your GLEventListener.display() and other routines afterward. You could even try waiting to return from stop() (for some brief period of time) until you’re sure you’re not in display() or any other callback.