<?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>118</bug_id>
          
          <creation_ts>2004-11-01 10:41:20 +0100</creation_ts>
          <short_desc>EXCEPTION_ACCESS_VIOLATION on show of 2nd canvas (ATI-specific)</short_desc>
          <delta_ts>2010-03-24 07:47:03 +0100</delta_ts>
          <reporter_accessible>0</reporter_accessible>
          <cclist_accessible>0</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>1</version>
          <rep_platform>All</rep_platform>
          <op_sys>windows</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://delsci.com/java/BuggyFrame.zip</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>134</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2010-03-24 07:47:03 +0100</bug_when>
    <thetext>


---- Reported by delwarl 2004-11-01 22:41:20 ----

Opening up a second JFrame &amp; GLCanvas with a Menu action causes an 
EXCEPTION_ACCESS_VIOLATION on Windows 2k with ATI hardware &amp; drivers.  The 
problem does not occur with nVidia hardware under Windows or with ATI hardware 
under Mac OS X.  The latest beta (1.1b06) does not solve the problem.

A simple test app can be downloaded from the associated URL (BuggyFrame.zip).

 An unexpected exception has been detected in native code outside the VM.
 Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at 
PC=0x24F8A703
  Function=DrvSetContext+0x11313
 Library=E:\WINNT\system32\atioglxx.dll
 
 at net.java.games.jogl.impl.windows.WGL.wglCreateContext(Native Method)
 at net.java.games.jogl.impl.windows.WindowsGLContext.
                            choosePixelFormatAndCreateContext
(WindowsGLContext.java:495)

...



---- Additional Comments From kbr 2005-01-28 19:05:39 ----

Created an attachment
Copy of submitter&apos;s test case




---- Additional Comments From kbr 2005-01-28 19:12:23 ----

This doesn&apos;t crash on my machine but the creation of the second GLCanvas does
fail with a GLException indicating that the pixel format of the second window
could not be set. This is almost certainly due to poor multithreading behavior
in ATI&apos;s drivers and interaction with the new dummyGL code; the question is
whether a good workaround can be found.




---- Additional Comments From kbr 2005-01-30 17:10:38 ----

The root cause of this bug was not the new DummyGL code, but severe bugs in
ATI&apos;s OpenGL drivers where it appears that if an OpenGL context is ever made
current on more than one thread during the lifetime of an application, problems
begin to occur such as the SetPixelFormat call failing on the just the next
newly-created HDC, or all subsequent SetPixelFormat calls failing on all
subsequently-created HDCs. This was occurring because the single-threaded ATI
workaround&apos;s automatic detection mechanism was not being enabled until the first
time a context was made current, but by then it was typically too late; the
context was made current on the end user&apos;s thread during e.g. Frame.show(), and
if it was ever made current on another thread (like the AWT event queue thread,
which is where all OpenGL operations are performed when the single-threaded
workaround is enabled) then the problems would begin.

The failure has only been seen on Windows so far; ATI&apos;s drivers on X11 seem to
be better behaved. The workaround is to check for the presence of ATI&apos;s drivers
very early during JOGL&apos;s initialization, by looking in the system directory for
atioglxx.dll, and enabling the single-threaded workaround if it was found. This
workaround causes the attached test case to work properly.




---- Additional Comments From kbr 2005-01-30 17:13:44 ----

*** Issue 130 has been marked as a duplicate of this issue. ***



--- Bug imported by sgothel@jausoft.com 2010-03-24 07:47 EDT  ---

This bug was previously known as _bug_ 118 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=118
Imported an attachment (id=27)

Unknown bug field &quot;has_duplicates&quot; encountered while moving bug
   &lt;has_duplicates&gt;
     &lt;bug_id&gt;130&lt;/bug_id&gt;
     &lt;who&gt;kbr&lt;/who&gt;
     &lt;when&gt;2005-01-30 17:13:44&lt;/when&gt;
&lt;/has_duplicates&gt;
CC member delwarl does not have an account here
The original submitter of attachment 27 is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>27</attachid>
            <date>2005-01-28 19:05:00 +0100</date>
            <delta_ts>2005-01-28 19:05:00 +0100</delta_ts>
            <desc>Copy of submitter&apos;s test case</desc>
            <filename>BuggyFrame.zip</filename>
            <type>application/x-compressed</type>
            <size>1397</size>
            <attacher name="Sven Gothel">sgothel</attacher>
            
              <data encoding="base64">UEsDBBQAAAAIAHGyYTHG8gnj1QQAAPIMAAAfAAAAY29tL2RlbHNjaS9idWdzL0J1Z2d5RnJhbWUu
amF2YaVXSW/jNhS+G/B/IHySU1dxJpl2msAHx9s4VWw3zlKgKQJaoiUOaEogKS+d5r/3kZIsehu0
Ux0i+W383sqX8zM05FKJ1Fc05vIaeTjlfoRURBBOEkZ9rBnIuU3DcNMXeEHqCPNAC3AkCSO+qlbQ
GaqNE8JraC7ihVHuU0bQPeGpi+DpLUF6RVWEfuy2H4dvL+OHX9sP46dRF1EJZhRScWYGoJBaA0wA
fUUZQ1Lpv77AMkIABLRRhEWwwgIQSjSPGYtX8tpomz9tjlJO1gkgIwEia58kxoUIpGcEcAREZTzK
EQf3lgT5cUBQnCpJ4a3hP9+7xthTaWlKQ44Zuka93zu9yeNwPHprdzq96fTteTj22pqAnObab5rn
Yx3Fvp8KAZpYoUmn1Vx/uOp/av/cvDSW+xBnjavVFcspUZ2YK7JWPzTXFxeXF5mIR2cCi02rd/36
MhyNHl/lRiqyuPzwqpMSsvXaDRgrPYdzOFHuF7zEbg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