Bug 341 - JNI Global Reference in native code prevents clean applet termination
Summary: JNI Global Reference in native code prevents clean applet termination
Status: VERIFIED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P3 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2008-02-02 10:53 CET by Sven Gothel
Modified: 2010-03-24 07:51 CET (History)
0 users

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:51:14 CET


---- Reported by kbr 2008-02-02 22:53:20 ----

The JNI global reference in JAWT_DrawingSurfaceInfo.c which is used to help
construct the Java-side mirror for the JAWT "platformInfo" struct is preventing
clean termination of JOGL applets. This global reference keeps the
platform-specific PlatformInfo class (such as
com.sun.opengl.impl.windows.JAWT_Win32DrawingSurfaceInfo) alive, and therefore
its class loader alive, preventing unloading of the native library.

This may also be the root cause of mysterious ClassCastExceptions seen with JOGL
applets on Mac OS X, although it is likely that either a bug in the Java
implementation or misunderstood semantics of the dynamic linker on that platform
is the reason that problem has only been seen there.



---- Additional Comments From kbr 2008-02-02 22:57:27 ----

Simplified the native code in JAWT_DrawingSurfaceInfo.c to only
fabricate the direct ByteBuffer wrapping the JAWT "platformInfo"
struct, moving the construction of the wrapping JAWT_PlatformInfo up
to Java.

Verified fix with reloading of JOGL applets via the new JNLP applet
launching support in the new Java Plug-In.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:51 EDT  ---

This bug was previously known as _bug_ 341 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=341