https://bugs.winehq.org/show_bug.cgi?id=37188
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Version|unspecified |1.7.25 URL| |http://www.16x16.org/downlo | |ad/ccw/ccw_1_1.zip Keywords| |download Component|ntdll |-unknown CC| |focht@gmx.net Ever confirmed|0 |1 Summary|[counterclockwise] unable |Counterclockwise (CCW) 1.1 |to start |crashes on startup (invalid | |'iPixelType' value 0x18 | |passed to | |'ChoosePixelFormat' | |function)
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
It seems the game requests a stupid pixel format which causes failure to set up GL context later.
At one point it calls 'glGetString(GL_EXTENSIONS)' on that GL context which returns NULL by design since the context doesn't exist due to earlier failure.
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+opengl wine ./ccw.exe >>log.txt 2>&1 ... 0023:Call gdi32.ChoosePixelFormat(001c0033,00566180) ret=004ec466 0023:Call opengl32.wglChoosePixelFormat(001c0033,00566180) ret=7ea618e2 0023:trace:wgl:wglChoosePixelFormat 0x1c0033 0x566180: size 40 version 1 flags 37 type 24 color 0 0,0,0,0 accum 0 depth 0 stencil 0 aux 0 ... <all mismatches> ... 0023:trace:wgl:glxdrv_wglDescribePixelFormat (0x1c0033,164,40,0x77f4dc) 0023:trace:wgl:get_pixel_format Returning fmt_id=0x19c for iPixelFormat=164 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - size / version : 40 / 1 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - dwFlags : PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - iPixelType : PFD_TYPE_RGBA 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - Color : 32 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - Red : 8 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - Green : 8 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - Blue : 8 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - Alpha : 8 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - Accum : 64 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - Depth : 24 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - Stencil : 8 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - Aux : 4 0023:trace:wgl:dump_PIXELFORMATDESCRIPTOR - iLayerType : PFD_MAIN_PLANE 0023:trace:wgl:wglChoosePixelFormat pixel type mismatch for iPixelFormat=164 0023:trace:wgl:wglChoosePixelFormat returning 0 0023:Ret opengl32.wglChoosePixelFormat() retval=00000000 ret=7ea618e2 0023:Ret gdi32.ChoosePixelFormat() retval=00000000 ret=004ec466 0023:Call gdi32.SetPixelFormat(001c0033,00000000,00566180) ret=004ec484 0023:Call opengl32.wglSetPixelFormat(001c0033,00000000,00566180) ret=7ea61ad3 0023:Call gdi32.__wine_get_wgl_driver(001c0033,0000000b) ret=7dffd669 0023:Ret gdi32.__wine_get_wgl_driver() retval=7de3b020 ret=7dffd669 0023:trace:wgl:set_pixel_format (0x1c0033,0) 0023:err:wgl:set_pixel_format Invalid format 0 0023:Ret opengl32.wglSetPixelFormat() retval=00000000 ret=7ea61ad3 0023:Ret gdi32.SetPixelFormat() retval=00000000 ret=004ec484 0023:Call opengl32.wglCreateContext(001c0033) ret=004ec498 0023:Call gdi32.__wine_get_wgl_driver(001c0033,0000000b) ret=7dffd669 0023:Ret gdi32.__wine_get_wgl_driver() retval=7de3b020 ret=7dffd669 0023:Ret opengl32.wglCreateContext() retval=00000000 ret=004ec498 0023:Call opengl32.wglMakeCurrent(001c0033,00000000) ret=004ec4b3 0023:Ret opengl32.wglMakeCurrent() retval=00000001 ret=004ec4b3 ... 0023:Call opengl32.glGetString(00001f03) ret=004a6d2f 0023:Ret opengl32.glGetString() retval=00000000 ret=004a6d2f 0023:Call msvcrt.strlen(0056b014 "basic_string::_S_construct NULL not valid") ret=005365cb 0023:Ret msvcrt.strlen() retval=00000029 ret=005365cb ... 0023:Call KERNEL32.MultiByteToWideChar(00000000,00000000,7e7aa53a "Runtime error!",0000000e,0077ef20,00000400) ret=7e7764dc 0023:Ret KERNEL32.MultiByteToWideChar() retval=0000000e ret=7e7764dc 0023:Call KERNEL32.MultiByteToWideChar(00000000,00000000,7e7aa563 "abnormal program termination",0000001c,0077e720,00000400) ret=7e7764dc 0023:Ret KERNEL32.MultiByteToWideChar() retval=0000001c ret=7e7764dc ... 0023:Call user32.MessageBoxIndirectW(0077e6d4) ret=7e75a65a --- snip ---
Dumping the descriptor:
--- snip --- Wine-dbg>p *pfd {nSize=0x28, nVersion=0x1, dwFlags=0x25, iPixelType=24, cColorBits=0, cRedBits=0, cRedShift=0, cGreenBits=0, cGreenShift=0, cBlueBits=0, cBlueShift=0, cAlphaBits=0, cAlphaShift=0, cAccumBits=0, cAccumRedBits=0, cAccumGreenBits=0, cAccumBlueBits=0, cAccumAlphaBits=16, cDepthBits=0, cStencilBits=0, cAuxBuffers=0, iLayerType=0, bReserved=0, dwLayerMask=0, dwVisibleMask=0, dwDamageMask=0} --- snip ---
The descriptor iPixelType value 0x18 is _hard_ coded from PE '.data' section, there is no mistake here.
Maybe Windows has a different heuristics here, still finding/providing a match given that stupid 'iPixelType' value.
$ du -sh ccw_1_1.zip 7.1M ccw_1_1.zip
$ sha1sum ccw_1_1.zip cd9f753e2d4a98a491bbbc201530e2861bf377f8 ccw_1_1.zip
$ wine --version wine-1.7.25-21-gc87901d
Regards