<?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>1110</bug_id>
          
          <creation_ts>2014-12-12 11:53:51 +0100</creation_ts>
          <short_desc>Missing native function on jogl_mobile.dll</short_desc>
          <delta_ts>2019-03-29 17:54:46 +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.3.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alessandro">alessandroborges</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>---</cf_type>
          <cf_scm_refs>dc15a430ee28f226e047ddebabf902d4c10b067a</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4485</commentid>
    <comment_count>0</comment_count>
    <who name="Alessandro">alessandroborges</who>
    <bug_when>2014-12-12 11:53:51 +0100</bug_when>
    <thetext>I&apos;d like to point out that library  jogl_mobile.dll, as well possibly the others O.S. flavors, miss the corresponding native version of the following method from jogamp.opengl.egl.EGL.java class:
 
     private static native void dispatch_eglGetConfigAttributes(long dpy, long config,
            int attributeCount,
            Object attributes,
            int attributes_byte_offset,
            Object values,
           int valuesOffset,
           long procAddr);

When I try to run a demo with GLProfile.GL2ES2 with VM attribute -Djogl.enable.ANGLE=true,  I have the following exception stack trace:

Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: jogamp.opengl.egl.EGL.dispatch_eglGetConfigAttributes(JJILjava/lang/Object;ILjava/lang/Object;IJ)V
        at jogamp.opengl.egl.EGL.dispatch_eglGetConfigAttributes(Native Method)
        at jogamp.opengl.egl.EGL.eglGetConfigAttributes(EGL.java:804)
        at jogamp.opengl.egl.EGLGraphicsConfiguration.EGLConfig2Capabilities(EGLGraphicsConfiguration.java:221)
        at jogamp.opengl.egl.EGLGraphicsConfigurationFactory.eglConfigs2GLCaps(EGLGraphicsConfigurationFactory.java:480)
        at jogamp.opengl.egl.EGLGraphicsConfigurationFactory.getAvailableCapabilities(EGLGraphicsConfigurationFactory.java:210)
        at jogamp.opengl.egl.EGLDrawableFactory.getAvailableCapabilitiesImpl(EGLDrawableFactory.java:718)
        at javax.media.opengl.GLDrawableFactory.getAvailableCapabilities(GLDrawableFactory.java:474)
        at com.jogamp.opengl.JoglVersion.getAvailableCapabilitiesInfo(JoglVersion.java:80)
        at com.jogamp.opengl.JoglVersion.getAllAvailableCapabilitiesInfo(JoglVersion.java:107)
        at com.jogamp.opengl.JoglVersion.getDefaultOpenGLInfo(JoglVersion.java:125)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:218)
        at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:2246)
        at javax.media.opengl.GLProfile.get(GLProfile.java:959)
        at javax.media.opengl.GLProfile.get(GLProfile.java:975)
        at gles.tests.RawGLES2demo.main(RawGLES2demo.java:298)

The line 298 at RawGLES2demo.java has the following statement:
298   GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2ES2));

Checking the jogl_mobile.dll with PE Viewer is possible to note that above method is missing, in both x86 and AMD64 versions.

Checking at Github I note the that the missing functions is available at file
jogl/make/config/jogl/egl-CustomCCode.c and possibly generated from file egl-CustomJavaCode.java in the same folder.


I guess the make file just missed compile &amp; link operations with above source code.

It happens on JOGL 2.2.4 and 2.3.
I didn&apos;t check others releases</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4544</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-01-27 10:19:50 +0100</bug_when>
    <thetext>Note: EGL package has changed due to Bug 1096.

&apos;Java_com_jogamp_opengl_egl_EGL_dispatch_1eglGetConfigAttributes&apos;
from &apos;make/config/jogl/egl-CustomCCode.c&apos;
is included into &apos;build/jogl/gensrc/native/jogl/egl/EGL_JNI.c&apos;
via make/config/jogl/egl.cfg&apos;s:
  IncludeAs CustomCCode        egl-CustomCCode.c

On GNU/Linux:
objdump -T libjogl_mobile.so | grep eglGetConfigAttributes

00000000000323e7 g    DF .text  0000000000000105  Base        Java_com_jogamp_opengl_egl_EGL_dispatch_1eglGetConfigAttributes

Method is invoked on GNU/Linux and Android,
no crash has been reported.

I will double check w/ Windows ..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4545</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-01-27 10:37:20 +0100</bug_when>
    <thetext>Missing &apos;JNIEXPORT void JNICALL&apos; in func-decl of 
make/config/jogl/egl-CustomCCode.c

.. hence it never landed into the windows dll

validating now ..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4546</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-01-27 10:47:55 +0100</bug_when>
    <thetext>dc15a430ee28f226e047ddebabf902d4c10b067a:

    Fix regression of commit cf1163fc88976e7087d3a17524a49139e35a4708,
    i.e. missing function calling convention and return type qualifier
    for &apos;Java_com_jogamp_opengl_egl_EGL_dispatch_1eglGetConfigAttributes&apos;:
      JNIEXPORT void JNICALL
    
    This lead to its exclusion in the resulting Windows dll.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>