http://bugs.winehq.org/show_bug.cgi?id=12191
--- Comment #6 from Roderick Colenbrander thunderbird2k@gmx.net 2008-03-25 17:51:22 --- When using WineD3D on Windows it uses opengl32.dll and WGL. On Wine we directly use libGL.so for GL functions (using some evil hack I added) and WGL functions are called using some evil mechanism as well.
The function ChoosePixelFormat is part of gdi32 but in essence it is an opengl function. In case of Wine wglChoosePixelFormat is forwarded to gdi32's ChoosePixelFormat.
Anyway ChoosePixelFormat is in the end implemented in the display driver which is winex11.drv. Inside winex11.drv it is X11DRV_ChoosePixelFormat which is in opengl.c. The function looks for a 'best' matching pixel format against the available GLX pixel formats.
Anyway the function should not crash inside X11DRV_ChoosePixelFormat. Likely the function is reading some bad memory or so.