http://bugs.winehq.org/show_bug.cgi?id=9958
--- Comment #3 from Anastasius Focht focht@gmx.net 2007-10-09 16:18:59 --- Hello,
the "hang" is a combination of wine bug and sloppy programming of game guard devs.
The hang occurs in gameguard.des process while trying to load a splash screen. Due to a bug in wine oleaut32 api function, a hang occurs because specific assumptions are not met/some code paths are not executed.
--- snip (spawned thread) --- ... 000d:Call user32.FindWindowA(00000000,1001f274 "GameGuard QA Redirector 1.0 ") ret=100033ee 000d:Call winex11.drv.CreateDesktopWindow(00010020) ret=60491bdb 000d:Ret winex11.drv.CreateDesktopWindow() retval=00000001 ret=60491bdb 000d:Call winex11.drv.MsgWaitForMultipleObjectsEx(00000001,617ab884,ffffffff,00000040,00000000) ret=6046c3da --- snip ---
earlier:
--- snip --- ... 0033:Call oleaut32.OleLoadPicturePath(0034edcc L"C:\Program Files\OGPlanet\Albatross18\GameGuard\Splash.jpg",00000000,00000000,00000000,0041a398,00428158) ret=00404a75 0033:Call ole32.CreateBindCtx(00000000,0034ebe4) ret=605ea086 0033:Call ntdll.RtlAllocateHeap(00110000,00000000,00000034) ret=60675ee5 0033:Ret ntdll.RtlAllocateHeap() retval=00133990 ret=60675ee5 0033:Call KERNEL32.GetThreadLocale() ret=60675f3a 0033:Ret KERNEL32.GetThreadLocale() retval=00000409 ret=60675f3a 0033:Ret ole32.CreateBindCtx() retval=00000000 ret=605ea086 0033:Call KERNEL32.LoadLibraryA(60648660 "urlmon.dll") ret=6062fd50 ... 0033:Ret ole32.CoTaskMemFree() retval=00000001 ret=00672ed5 0033:Ret oleaut32.OleLoadPicturePath() retval=800401f0 ret=00404a75 0033:Call KERNEL32.CreateThread(00000000,00000000,00404810,00000000,00000000,0034fdd0) ret=00403bb7 0033:Ret KERNEL32.CreateThread() retval=000000a0 ret=00403bb7 ... --- snip ---
oleaut32.OleLoadPicturePath() returns with 0x800401F0 error -> "CoInitialize has not been called" - which is of course true. Due to that error, some (threaded) code is incorrectly skipped.
I wrote a small test client under windows xp to verify. It seems OleLoadPicturePath implicitly initializes OLE in its apartment (= no explicit CoInitialize() needed). So clearly a wine bug.
You can either fix this by using native oleaut32.dll override or by explicitly calling CoInitialize() and CoUninitialize() before any CoCreateInstance() calls in that api function.
Regards