<?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>597</bug_id>
          
          <creation_ts>2012-06-25 16:04:11 +0200</creation_ts>
          <short_desc>Segfault on GLDrawableFactory.getDesktopFactory() used in headless mode</short_desc>
          <delta_ts>2012-06-30 15:45:25 +0200</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>All</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="Calixte">calixte.denizet</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>---</cf_type>
          <cf_scm_refs>jogl 5c83989b8bb8e8f9cbc25f09e6a6fe5847e6b94c</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1656</commentid>
    <comment_count>0</comment_count>
      <attachid>357</attachid>
    <who name="Calixte">calixte.denizet</who>
    <bug_when>2012-06-25 16:04:11 +0200</bug_when>
    <thetext>Created attachment 357
test case

To reproduce:
$ ssh localhost
$ java -Djava.awt.headless=true -Djava.library.path=./lib/linux-amd64/ -cp ./jogamp-all-platforms/jar/jogl.all.jar:./jogamp-all-platforms/jar/gluegen-rt.jar:. plop

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ff64e8fa840, pid=20190, tid=140696029271808
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libX11.so.6+0x33840]  XDisplayString+0x0
#
# An error report file with more information is saved as:
# /tmp/jogl/hs_err_pid20190.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abandon</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1682</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-06-30 15:22:15 +0200</bug_when>
    <thetext>Note: Remote connection tested using ssh to localhost or an actual remote machine.

Test w/ proper X11 authentication, i.e. DISPLAY and xauth:

&gt; cd projects/JOGL/jogl-bugs/597-headless/
&gt; echo $DISPLAY
localhost:10.0

&gt; xclock
&apos;works&apos;

T1.1 OK&gt; java plop 
jogamp.opengl.x11.glx.X11GLXDrawableFactory@f581593

T1.2 OK&gt; java -Djava.awt.headless=true plop 
jogamp.opengl.x11.glx.X11GLXDrawableFactory@6f34a7d8

+++

Test _without_ proper X11 authentication, i.e. DISPLAY and xauth:

&gt; xclock
No protocol specified
No protocol specified
Error: Can&apos;t open display: :0.0

T2.1 OK&gt; java plop 
No protocol specified
No protocol specified
Exception in thread &quot;main&quot; java.lang.InternalError: Can&apos;t connect to X11 window server using &apos;:0.0&apos; as the value of the DISPLAY variable.
   (Stack trace from: 
        GLProfile.initProfilesForDefaultDevices(..) -&gt;
        NativeWindowFactory.initSingleton(..) -&gt; 
        JAWTUtil.&lt;clinit&gt;-&gt;
        sun.awt.X11.XToolkit.&lt;clinit&gt; -&gt;         
        sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)

T2.2 ERROR&gt; java -Djava.awt.headless=true plop 
No protocol specified
No protocol specified
SIGSEGV!!

-&gt; confirmed.

Thx for reporting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-06-30 15:45:25 +0200</bug_when>
    <thetext>fixed w/ commit 5c83989b8bb8e8f9cbc25f09e6a6fe5847e6b94c</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>357</attachid>
            <date>2012-06-25 16:04:11 +0200</date>
            <delta_ts>2012-06-25 16:04:11 +0200</delta_ts>
            <desc>test case</desc>
            <filename>plop.java</filename>
            <type>text/x-java</type>
            <size>221</size>
            <attacher name="Calixte">calixte.denizet</attacher>
            
              <data encoding="base64">aW1wb3J0IGphdmF4Lm1lZGlhLm9wZW5nbC5HTERyYXdhYmxlRmFjdG9yeTsKCnB1YmxpYyBjbGFz
cyBwbG9wIHsKICAgIAogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykg
ewoJR0xEcmF3YWJsZUZhY3RvcnkgZmFjdG9yeSA9IEdMRHJhd2FibGVGYWN0b3J5LmdldERlc2t0
b3BGYWN0b3J5KCk7CglTeXN0ZW0ub3V0LnByaW50bG4oZmFjdG9yeSk7CiAgICB9Cn0=
</data>

          </attachment>
      

    </bug>

</bugzilla>