Login  Register

Re: [JOGL2.0 rc2] Win XP 32 - ATI drivers and VM crashes

Posted by Sven Gothel on Mar 19, 2011; 8:39am
URL: https://forum.jogamp.org/JOGL2-0-rc2-Win-XP-32-ATI-drivers-and-VM-crashes-tp2642286p2701497.html

On Tuesday, March 15, 2011 02:09:48 Wade Walker [via jogamp] wrote:

>
> I think I've found the root cause of this bug. It looks like the GL context
> is not set up on the main thread. This leaves the main thread's info block
> null, which causes an access violation inside the ATI DLL when you try to
> call a WGL EXT function. More information is in the bug report at
> https://jogamp.org/bugzilla/show_bug.cgi?id=480.
>
> This one looks too hard for me to fix by myself, though  I've looked at the
> code paths involved, and there's no obvious way to get a context set up on
> it. We'll need to wait for Sven to do it so the fix makes sense with the
> rest of the code.

GREAT job analysing this Wade - thx.

+++

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x69346b76, pid=3628, tid=2868
#

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  jogamp.opengl.windows.wgl.WGLExtImpl.dispatch_wglChoosePixelFormatARB1(JLjava/lang/Object;IZLjava/lang/Object;IZILjava/lang/Object;IZLjava/lang/Object;IZJ)Z+0
j  jogamp.opengl.windows.wgl.WGLExtImpl.wglChoosePixelFormatARB(J[II[FII[II[II)Z+287
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.wglChoosePixelFormatARB(JLjogamp/opengl/windows/wgl/WindowsWGLDrawableFactory$SharedResource;Ljavax/media/opengl/GLCapabilitiesImmutable;[II[F)[I+86

+++

https://jogamp.org/bugzilla/show_bug.cgi?id=480#c7

You say:
  http://jogamp.org/git/?p=jogl.git;a=commit;h=8adc04788a6d9dd44de5a4636b46d14dbb70b799
  - freezes ?

  http://jogamp.org/git/?p=jogl.git;a=commit;h=f62b95c7bf2997bf7c309a7a186c4f46155f7c2a
  - crashes ?

+++

https://jogamp.org/bugzilla/show_bug.cgi?id=480#c7
https://jogamp.org/bugzilla/show_bug.cgi?id=480#c8

Wow, ATI needs the context to be current for 'wglChoosePixelFormatARB'
for some old GPU's (same driver) ?

This is puzzling .. indeed, we have a similar workaround for pbuffers on X11 for ATI:
  http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java;h=8203a440ca418b894110cbf89a0ef3aa55f8fc25;hb=HEAD#l348

And yes, I removed the (redundant) makeCurrent for PFD selection,
but that was far earlier .. so it might be something else.

+++

WindowsWGLGraphicsConfiguration.GLCapabilities2AttribList(..) set's up the
to be queried WGL/ARB attributes - since f62b95c7bf2997bf7c309a7a186c4f46155f7c2a has an impact,
maybe somehow one attribute makes the ATI driver to crash ?

I remember we had a similar issue with using unsupported attributes (ie PBUFFER, ..).

If I would have such a test machine, I would remove all unrequired attributes in this method
and just give it a try. Then devide and conquer .. to find the offending attribute.


One may give me access to such a machine via SSH ..

Cheers, Sven