http://bugs.winehq.org/show_bug.cgi?id=30185
Bug #: 30185 Summary: SuperPower 2 demo crashes on launch Product: Wine Version: 1.4 Platform: x86 URL: http://www.gamefront.com/files/3631719/SuperPower_2_De mo OS/Version: Linux Status: UNCONFIRMED Keywords: download Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: gyebro69@gmail.com Classification: Unclassified
Created attachment 39396 --> http://bugs.winehq.org/attachment.cgi?id=39396 terminal output
The installed demo, when started with joshua.exe, crashes immediately. I get the same crash with older Wine versions as well (1.2.3, pre-1.0). To install the demo I used Wine-1.4 because of bug #30182.
Fedora 16 x86 gcc version 4.6.2 20111027 (Red Hat 4.6.2-1) (GCC)
http://bugs.winehq.org/show_bug.cgi?id=30185
--- Comment #1 from GyB gyebro69@gmail.com 2012-03-16 06:58:38 CDT --- Created attachment 39397 --> http://bugs.winehq.org/attachment.cgi?id=39397 7zipped +relay,+seh,+tid log (uncompressed 1.1 MB)
http://bugs.winehq.org/show_bug.cgi?id=30185
--- Comment #2 from GyB gyebro69@gmail.com 2012-03-16 07:05:34 CDT --- The last bit of traces before the crash happens:
0026:Starting thread proc 0x10051350 (arg=0x10092558) 0026:Call shell32.ExtractAssociatedIconW(00000000,10067e1c L"shell32.dll",0076e998) ret=10056386 0026:Call user32.GetSystemMetrics(0000000b) ret=7e575720 0026:Ret user32.GetSystemMetrics() retval=00000020 ret=7e575720 0026:Call user32.GetSystemMetrics(0000000c) ret=7e575731 0026:Ret user32.GetSystemMetrics() retval=00000020 ret=7e575731 0026:Call user32.PrivateExtractIconsW(10067e1c L"shell32.dll",00000089,00000020,00000020,0076e65c,00000000,00000001,00000000) ret=7e57577e 0026:Ret user32.PrivateExtractIconsW() retval=00000000 ret=7e57577e 0026:Call KERNEL32.GetModuleFileNameW(00000000,10067e1c,00000104) ret=7e56ad42 0026:trace:seh:raise_exception code=c0000005 flags=0 addr=0xb7484566 ip=b7484566 tid=0026
http://bugs.winehq.org/show_bug.cgi?id=30185
Jarkko K jarkko_korpi@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jarkko_korpi@hotmail.com
--- Comment #3 from Jarkko K jarkko_korpi@hotmail.com --- Created attachment 48160 --> http://bugs.winehq.org/attachment.cgi?id=48160 debug 1.7.16
https://bugs.winehq.org/show_bug.cgi?id=30185
austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #4 from austinenglish@gmail.com --- (In reply to Jarkko K from comment #3)
Created attachment 48160 [details] debug 1.7.16
err:dsound:get_mmdevenum CoCreateInstance failed: 80040154
your sound setup is borked.
I get something similar to Bela: Backtrace: =>0 0xf75481f1 __memcpy_ssse3_rep+0x991() in libc.so.6 (0x0072e6f8) 1 0x7b8578ed GetModuleFileNameW+0x11c(hModule=<couldn't compute location>, lpFileName=<couldn't compute location>, size=<couldn't compute location>) [/home/austin/wine-git/dlls/kernel32/module.c:689] in kernel32 (0x0072e6f8) 2 0x7e3b0c4b ExtractAssociatedIconW+0x9a(hInst=<couldn't compute location>, lpIconPath=<couldn't compute location>, lpiIcon=<couldn't compute location>) [/home/austin/wine-git/dlls/shell32/iconcache.c:773] in shell32 (0x0072e968) 0xf75481f1 __memcpy_ssse3_rep+0x991 in libc.so.6: repe movq %mm0,0x0(%esi)
in wine-1.7.16-199-ga6e53ea
http://bugs.winehq.org/show_bug.cgi?id=30185
hanska2@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hanska2@luukku.com
--- Comment #5 from hanska2@luukku.com --- The issue is still the same 1.7.22
http://bugs.winehq.org/show_bug.cgi?id=30185
--- Comment #6 from hanska2@luukku.com --- Console shows only message:
fixme:service:scmdatabase_autostart_services Auto-start service L"hwinterface" failed to start: 2
https://bugs.winehq.org/show_bug.cgi?id=30185
Teras teras@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |teras@luukku.com
--- Comment #7 from Teras teras@luukku.com --- Still crashing 1.7.36
https://bugs.winehq.org/show_bug.cgi?id=30185
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Component|-unknown |shell32
--- Comment #8 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
The app tries to read the icon resource 132 for 'Control Panel' from shell32.dll via 'ExtractAssociatedIconW' which obviously fails because Wine doesn't provide it. Actually, there are multiple problems, the missing icon resource being the less evil thing.
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+resource,+icon wine ./joshua.exe >>log.txt 2>&1 ... 0024:Starting thread proc 0x10051350 (arg=0x10092558) 0024:Call shell32.ExtractAssociatedIconW(00000000,10067e1c L"shell32.dll",0083e9d8) ret=10056386 0024:Call user32.GetSystemMetrics(0000000b) ret=7e0cefb4 0024:Ret user32.GetSystemMetrics() retval=00000020 ret=7e0cefb4 0024:Call user32.GetSystemMetrics(0000000c) ret=7e0cefc6 0024:Ret user32.GetSystemMetrics() retval=00000020 ret=7e0cefc6 0024:Call user32.PrivateExtractIconsW(10067e1c L"shell32.dll",00000089,00000020,00000020,0083e6c8,00000000,00000001,00000000) ret=7e0cf0d5 0024:trace:icon:PrivateExtractIconsW L"shell32.dll" 137 32x32 0x83e6c8 (nil) 1 0x00000000 0024:trace:icon:ICO_ExtractIconExW L"shell32.dll", 137, 1 (nil) 0x00000000 0024:trace:icon:USER32_GetResourceTable 0x840000 0x83e4d0 0024:warn:icon:ICO_ExtractIconExW nIconIndex 137 is larger than iconDirCount 23 0024:Ret user32.PrivateExtractIconsW() retval=00000000 ret=7e0cf0d5 0024:Call KERNEL32.GetModuleFileNameW(00000000,10067e1c,00000104) ret=7e0c3648 0024:trace:seh:raise_exception code=c0000005 flags=0 addr=0xf75129d1 ip=f75129d1 tid=0024 0024:trace:seh:raise_exception info[0]=00000001 0024:trace:seh:raise_exception info[1]=10067e1c 0024:trace:seh:raise_exception eax=00115820 ebx=f7543970 ecx=00000054 edx=10067e20 esi=10067e1c edi=00000000 0024:trace:seh:raise_exception ebp=0083e6c8 esp=0083e650 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010202 0024:trace:seh:call_stack_handlers calling handler at 0x7bc9ecab code=c0000005 flags=0 --- snip ---
During fallback lookup it tries to update the user-provided buffer for the module name which is unfortunately living in .rdata section = read-only, causing the fault. The app supplies a constant string literal as buffer, hence it never assumes the buffer is being written to.
Memory map of dll in question:
--- snip --- Address Size Owner Section Description ... 10000000 00001000 ginger_s 10000000 PE header 10001000 00066000 ginger_s 10000000 .text code 10067000 00029000 ginger_s 10000000 .rdata imports,exports 10090000 00004000 ginger_s 10000000 .data data 10094000 00001000 ginger_s 10000000 .rsrc resources 10095000 0000B000 ginger_s 10000000 .reloc relocations ... --- snip ---
App code showing hard-coded buffer and instance handle:
--- snip --- 10056360 83EC 7C SUB ESP,7C 10056363 53 PUSH EBX 10056364 55 PUSH EBP 10056365 56 PUSH ESI 10056366 57 PUSH EDI 10056367 8D4424 10 LEA EAX,DWORD PTR SS:[ESP+10] 1005636B 50 PUSH EAX 1005636C 68 1C7E0610 PUSH ginger_s.10067E1C ; const WCHAR* "shell32.dll" 10056371 33ED XOR EBP,EBP 10056373 55 PUSH EBP ; hInstance = NULL 10056374 894C24 28 MOV DWORD PTR SS:[ESP+28],ECX 10056378 C74424 1C 89000000 MOV DWORD PTR SS:[ESP+1C],89 10056380 FF15 50730610 CALL DWORD PTR DS:[<&SHELL32.ExtractAssociatedIconW> ... --- snip ---
Source: http://source.winehq.org/git/wine.git/blob/e330a128d54613d2f7322cc3da2c8a5fe...
(the usual shell32 coding style/indenting inconsistencies aside)
--- snip --- 743 HICON WINAPI ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon) 744 { 745 HICON hIcon = NULL; 746 WORD wDummyIcon = 0; 747 748 TRACE("%p %s %p\n", hInst, debugstr_w(lpIconPath), lpiIcon); 749 750 if(lpiIcon == NULL) 751 lpiIcon = &wDummyIcon; 752 753 hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); 754 755 if( hIcon < (HICON)2 ) 756 { if( hIcon == (HICON)1 ) /* no icons found in given file */ ... 768 if( hIcon == (HICON)1 ) 769 *lpiIcon = 2; /* MSDOS icon - we found .exe but no icons in it */ 770 else 771 *lpiIcon = 6; /* generic icon - found nothing */ 772 773 if (GetModuleFileNameW(hInst, lpIconPath, MAX_PATH)) 774 hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(*lpiIcon)); 775 } 776 return hIcon; 777 } --- snip ---
MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/ms648067%28v=vs.85%...
Maybe on Windows the error path with user-buffer being updated is never hit due to successful icon resource retrieval or a check is done if the user-buffer is writeable. Another explanation could be that the caller provided instance handle is not to be used as fallback lookup. It's not explicitly mentioned in remarks section of the function in MSDN where the lookup sequence is explained.
$ sha1sum SP2Demo.zip fd589918790c82f363f9688842b59f0b7eab77b2 SP2Demo.zip
$ du -sh SP2Demo.zip 165M SP2Demo.zip
$ wine --version wine-1.7.36-16-g748788f
Regards
https://bugs.winehq.org/show_bug.cgi?id=30185
Thadah Denyse juchuf@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |juchuf@gmail.com
--- Comment #9 from Thadah Denyse juchuf@gmail.com --- Created attachment 50962 --> https://bugs.winehq.org/attachment.cgi?id=50962 Wine 1.7.38 backtrace
Crashes on Wine 1.7.38 too, on Steam.
https://bugs.winehq.org/show_bug.cgi?id=30185
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #10 from Sebastian Lackner sebastian@fds-team.de --- A patch to fix this issue was added to Wine Staging: https://github.com/wine-compholio/wine-staging/tree/master/patches/shell32-P...
https://bugs.winehq.org/show_bug.cgi?id=30185
--- Comment #11 from Thadah Denyse juchuf@gmail.com --- Game works flawlessly with the patch.
https://bugs.winehq.org/show_bug.cgi?id=30185
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |michael@fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/shell32-Placeh | |older_Icons
https://bugs.winehq.org/show_bug.cgi?id=30185
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=30185
Maik Wagner maiktapwagner@aol.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |maiktapwagner@aol.com
--- Comment #12 from Maik Wagner maiktapwagner@aol.com --- The link to the download seems to be dead. I got the demo from a different source: http://www.gamepressure.com/download.asp?ID=5934
sha1sum sp2demob.exe 0432fd8c6593465af8fffcdd2cc2db20d7b9a50d sp2demob.exe
This version starts up fine: I can get into the main menu and start the demo. Unfortunately I keeps saying "Connected" and then returns to the main menu.
mwagner@linux-24v3:~/Downloads> wine --version wine-1.9.15 (Staging)
https://bugs.winehq.org/show_bug.cgi?id=30185
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/shell32-Placeh |er/patches/shell32-Placehol |older_Icons |der_Icons CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=30185
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |45660
https://bugs.winehq.org/show_bug.cgi?id=30185 Bug 30185 depends on bug 45660, which changed state.
Bug 45660 Summary: SuperPower 2 demo fails to install https://bugs.winehq.org/show_bug.cgi?id=45660
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
https://bugs.winehq.org/show_bug.cgi?id=30185
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.gamefront.com/fi |https://download.cnet.com/S |les/3631719/SuperPower_2_De |uperPower-2/3000-7483_4-103 |mo |19338.html Fixed by SHA1| |12a6a58cca74ef35dd1ff06e75d | |e74dc78ff74fd Status|STAGED |RESOLVED CC| |alexhenrie24@gmail.com Resolution|--- |FIXED
--- Comment #13 from Alex Henrie alexhenrie24@gmail.com --- Steps to install SuperPower 2 demo:
1. Install https://web.archive.org/web/20160305010920/www.installengine.com/isengine/isscript.msi with `msiexec /i`.
2. Install SuperPower 2 demo from https://download.cnet.com/SuperPower-2/3000-7483_4-10319338.html.
The demo stopped crashing with the addition of the 138th icon to shell32: https://source.winehq.org/git/wine.git/commitdiff/12a6a58cca74ef35dd1ff06e75...
If the game actually displays the icon somewhere, it won't be the right one because we're still missing some icons from 0 to 137, so our 138th icon does not correspond to Windows's 138th icon. Open a new bug if you notice any icons that look out of place.
https://bugs.winehq.org/show_bug.cgi?id=30185
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.15.
https://bugs.winehq.org/show_bug.cgi?id=30185
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x
https://bugs.winehq.org/show_bug.cgi?id=30185
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |---
--- Comment #15 from Michael Stefaniuc mstefani@winehq.org --- Removing the 3.0.x milestone from bug fixes included in 3.0.4.