<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>510</bug_id>
          
          <creation_ts>2011-08-21 16:54:03 +0200</creation_ts>
          <short_desc>EGLDrawableFactory static initializer fails: lookupSymbolGlobal not supported on Windows (with fix)</short_desc>
          <delta_ts>2011-12-02 08:02:30 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>embedded</component>
          <version>2</version>
          <rep_platform>pc_x86_64</rep_platform>
          <op_sys>windows</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Wade Walker">wwalker3</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>---</cf_type>
          <cf_scm_refs>58469fd2343039c195a88d0b171ba9af2dce40be (gluegen)
2bf46093aa45a5948c200a7e83b130a636a7cd37 (jogl)</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1042</commentid>
    <comment_count>0</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2011-08-21 16:54:03 +0200</bug_when>
    <thetext>The recent change to EGLDynamicLibraryBundleInfo so that shallLookupGlobal()returns true causes an exception when launching an applet from within Firefox 6 and Chrome 13 on Windows. The EGLDrawableFactory static initializer fails due to lookupSymbolGlobal not being supported on Windows, so we get this stack trace from the Java console:

java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at com.jogamp.common.util.ReflectionUtil.getClassImpl(ReflectionUtil.java:75)
	at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:174)
	at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:196)
	at javax.media.opengl.GLDrawableFactory.&lt;clinit&gt;(GLDrawableFactory.java:156)
	at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1201)
	at javax.media.opengl.GLProfile.access$000(GLProfile.java:71)
	at javax.media.opengl.GLProfile$1.run(GLProfile.java:112)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:110)
	at name.wadewalker.onetriangleapplet.OneTriangleApplet.init(OneTriangleApplet.java:25)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: lookupSymbolGlobal: Not supported on Windows
	at jogamp.common.os.WindowsDynamicLinkerImpl.lookupSymbolGlobal(WindowsDynamicLinkerImpl.java:71)
	at com.jogamp.common.os.NativeLibrary.dynamicLookupFunctionGlobal(NativeLibrary.java:210)
	at com.jogamp.common.os.DynamicLibraryBundle.dynamicLookupFunctionOnLibs(DynamicLibraryBundle.java:291)
	at com.jogamp.common.os.DynamicLibraryBundle.getToolGetProcAddressHandle(DynamicLibraryBundle.java:171)
	at com.jogamp.common.os.DynamicLibraryBundle.&lt;init&gt;(DynamicLibraryBundle.java:87)
	at jogamp.opengl.GLDynamicLookupHelper.&lt;init&gt;(GLDynamicLookupHelper.java:36)
	at jogamp.opengl.egl.EGLDrawableFactory.&lt;clinit&gt;(EGLDrawableFactory.java:74)
	... 14 more
Info: GLProfile.init - Desktop GLDrawable factory not available
java.lang.NoClassDefFoundError: Could not initialize class javax.media.opengl.GLDrawableFactory
	at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1235)
	at javax.media.opengl.GLProfile.access$000(GLProfile.java:71)
	at javax.media.opengl.GLProfile$1.run(GLProfile.java:112)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:110)
	at name.wadewalker.onetriangleapplet.OneTriangleApplet.init(OneTriangleApplet.java:25)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


If you change WindowsDynamicLinkerImpl.lookupSymbolGlobal() to the following, it fixes the problem:

    public long lookupSymbolGlobal(String symbolName) {
        if(DEBUG) {
            System.err.println(&quot;WindowsDynamicLinkerImpl.lookupSymbolGlobal: Not supported on Windows&quot; );
        }
        return 0;
    }

More details: Java 1.6.0_23, Windows 7 64-bit, NVIDIA GeForce 8800 GTX, driver 8.17.12.7533 (5/2011).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1043</commentid>
    <comment_count>1</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2011-08-21 16:56:33 +0200</bug_when>
    <thetext>Sorry, forgot to mark as confirmed. I tested the fix on FF, Chrome, Safari, and IE 9 on Windows, and they all work.

Also: isn&apos;t WindowsDynamicLinkerImpl.java supposed to be auto-generated? I looked for the .cfg file that contained the code to throw the exception, but couldn&apos;t find it. It looks like this formerly auto-generated file is now checked in?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1046</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2011-08-22 20:41:10 +0200</bug_when>
    <thetext>gluegen 58469fd2343039c195a88d0b171ba9af2dce40be
jogl 2bf46093aa45a5948c200a7e83b130a636a7cd37

thank you!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>