<?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>564</bug_id>
          
          <creation_ts>2012-03-13 20:58:16 +0100</creation_ts>
          <short_desc>X11GLXDrawableFactory - Could not initialize shared resources for :0 due to NullPointerException</short_desc>
          <delta_ts>2012-03-24 01:38:16 +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>x11</component>
          <version>2</version>
          <rep_platform>pc_x86_64</rep_platform>
          <op_sys>linux</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin von Gagern">Martin.vGagern</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>gouessej</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>7a40768455342ab2d1d43bf435baa42a8ccaf917
42c461a157bbcf9e7268b171a7593c2b3ae6a173</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1433</commentid>
    <comment_count>0</comment_count>
    <who name="Martin von Gagern">Martin.vGagern</who>
    <bug_when>2012-03-13 20:58:16 +0100</bug_when>
    <thetext>Using jogl-2.0rc5 (the latest version available, as far as I understand it), I get an exception initializing things. I first encountered this in a local application with relaxed security constraints, but could reproduce it as well in my browser using the Gears demo applet.

javax.media.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for :0
	at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:267)
	at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:261)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
	at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:419)
	at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:246)
	... 2 more
#### Java Web Start Error:
#### Profile GL_DEFAULT is not available on X11GraphicsDevice[type X11, connection :0, unitID 0, handle 0x0], but: []

Sounds to me as if this shouldn&apos;t happen this way. A null pointer might be an indication of a problem, but if so, I&apos;d hope for the relevant code to check that condition and throw some more informative exception. So I doubt that it&apos;s an external problem here. After all, the Gears applet doens&apos;t require any exotic capabilities, does it? I used to have older versions of jogl working fine, so my graphics setup should work well enough.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1450</commentid>
    <comment_count>1</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2012-03-15 22:50:31 +0100</bug_when>
    <thetext>Hi

Do you reproduce this bug with the latest autobuild (JOGL build 699)?

Please tell me more about your hardware, I don&apos;t reproduce this bug on Cent OS 5.3 with an Intel 64 bits microprocessor and a graphics card NVIDIA Quadro FX.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1451</commentid>
    <comment_count>2</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2012-03-15 22:51:51 +0100</bug_when>
    <thetext>Using GLProfile.getMaxFixedFunc(true) instead of GLProfile.getDefault() might work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1464</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-03-18 13:53:15 +0100</bug_when>
    <thetext>I am on it - thx.

&apos;misio-it&apos; reported the same NPE/GLProfile missing:
   - GL_RENDERER  Mesa DRI Intel(R) 945GM x86/MMX/SSE2
   - GL_VERSION 1.4 Mesa 8.0.1
  -  GL_VENDOR Tungsten Graphics, Inc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1465</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-03-18 15:46:24 +0100</bug_when>
    <thetext>The following configuration have passed, hence it&apos;s highly probably related to
Mesa 8.0.1 and it&apos;s OpenGL 3.0 enabled glXCreateContextAttribsARB

GL_VENDOR      Tungsten Graphics, Inc
GL_RENDERER    Mesa DRI Intel(R) Sandybridge Desktop 
GL_VERSION     2.1 Mesa 7.11

GL_VENDOR      Mesa Project
GL_RENDERER    Software Rasterizer
GL_VERSION     2.1 Mesa 7.11.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471</commentid>
    <comment_count>5</comment_count>
    <who name="Martin von Gagern">Martin.vGagern</who>
    <bug_when>2012-03-18 19:23:57 +0100</bug_when>
    <thetext>I haven&apos;t had time to test this with local access to the hardware where I first encountered this, but I can confirm this is Mesa 8.0.1 as well.

OpenGL vendor string: nouveau
OpenGL renderer string: Gallium 0.4 on NV84
OpenGL version string: 2.1 Mesa 8.0.1

Will try to check this getMaxFixedFunc tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1473</commentid>
    <comment_count>6</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-03-18 22:36:14 +0100</bug_when>
    <thetext>http://jogamp.org/git/?p=jogl.git;a=commit;h=7a40768455342ab2d1d43bf435baa42a8ccaf917

    Fix bug 564 (X11 Mesa 8.0.1 GL 3.0 w/o GLX_ARB_create_context)

    X11/Mesa 8.0.1 offers a GL 3.0 context w/o
    having the GLX_ARB_create_context extension available
    (even though the func-ptr glXCreateContextAttribsARB is not null).

    We assumed that if no GLContext device availability is set,
    it can be only GL 2.0 or ES1/ES2.

    Fix: Relaxed these (false) constrains and map the created context
         reflecting using it&apos;s actual attributes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1484</commentid>
    <comment_count>7</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2012-03-19 23:47:14 +0100</bug_when>
    <thetext>Zeno said that the latest fix isn&apos;t enough, he provided another one:
http://forum.jogamp.org/libgl-version-8-issues-no-profiles-available-tp3832159p3840554.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1485</commentid>
    <comment_count>8</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-03-20 12:45:06 +0100</bug_when>
    <thetext>Thanks to Zeno&apos;s report and analysis, here is the 2nd bug fix 
regarding a &apos;broken&apos; ARB_create_context impl:

&lt;http://jogamp.org/git/?p=jogl.git;a=commit;h=42c461a157bbcf9e7268b171a7593c2b3ae6a173&gt;

    Fix bug 564 - part 2 (X11 Mesa 8.0.1 GL 3.0 w/ failing GLX_ARB_create_context)
    
    Tolerate a buggy ARB createContext impl (always failing to create a context).
    
    Now we only reset the GLContext state and
    set the context/device availability flag if ARB create context actually was successful.
    Otherwise the fallback &apos;old&apos; context is being used w/o having it&apos;s context state cleared
    and context/device availability is set later on.
    
    This makes the general use of ARB_create_context more stable.
    
    +++
    
    Minor changes:
    
    - Non compatibility fallback: Try forward context instead.
    - Limit ARB context &apos;seeking&apos; to &gt;= OpenGL 2.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1486</commentid>
    <comment_count>9</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2012-03-20 15:22:28 +0100</bug_when>
    <thetext>(In reply to comment #8)
&gt;     Minor changes:
&gt; 
&gt;     - Non compatibility fallback: Try forward context instead.
&gt;     - Limit ARB context &apos;seeking&apos; to &gt;= OpenGL 2.0

Why limiting ARB context seeking to &gt;= OpenGL 2.0? Sorry for my silly question.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1490</commentid>
    <comment_count>10</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-03-24 01:38:16 +0100</bug_when>
    <thetext>(In reply to comment #9)
&gt; (In reply to comment #8)
&gt; &gt;     Minor changes:
&gt; &gt; 
&gt; &gt;     - Non compatibility fallback: Try forward context instead.
&gt; &gt;     - Limit ARB context &apos;seeking&apos; to &gt;= OpenGL 2.0
&gt; 
&gt; Why limiting ARB context seeking to &gt;= OpenGL 2.0? Sorry for my silly question.

B/c the ARB createContextAttribARB method was introduced with GL 3.1.
If available we can assume GL 2.1 (at least 2.0) is implemented or it just doesn&apos;t work (Mesa8).

Traversing all down to GL 1.1 is sort of futile here,
nevertheless GL 1.1 will be caught via the tradition createContext method.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>