jogl
  1. jogl
  2. JOGL-341

JNI Global Reference in native code prevents clean applet termination

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: jogl
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      341

      Description

      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.

        Activity

        Hide
        kbr added a comment -

        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.

        Show
        kbr added a comment - 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.

          People

          • Assignee:
            jogl-issues
            Reporter:
            kbr
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: