http://bugs.winehq.org/show_bug.cgi?id=10525
Summary: HLSW 2 crashes at start Product: Wine Version: CVS/GIT Platform: PC-x86-64 URL: http://hlsw.net/?page=download&category=hlsw OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-misc AssignedTo: wine-bugs@winehq.org ReportedBy: greg87@online.de
Created an attachment (id=9271) --> (http://bugs.winehq.org/attachment.cgi?id=9271) +all
As the title says. One of the rare apps that do absolutly nothing, just bombing out.
http://bugs.winehq.org/show_bug.cgi?id=10525
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xerox_xerox2000@yahoo.co.uk Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-11-21 12:10:18 --- Confirming the crash. It looks as if it cannot find a resource. Ultimate stupid hack below gets up the login window for me. Did you check if this application runs in windows?
diff --git a/dlls/kernel32/resource.c b/dlls/kernel32/resource.c index ff2ec95..e26ddfa 100644 --- a/dlls/kernel32/resource.c +++ b/dlls/kernel32/resource.c @@ -233,7 +233,8 @@ HRSRC WINAPI FindResourceExW( HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD return HRSRC_32(ret); }
- return find_resourceW( hModule, type, name, lang ); + if( find_resourceW( hModule, type, name, lang ) ) return find_resourceW( hModule, type, name, lang ); + else return find_resourceW(hModule,0x0004, 0x047b,0x0409); }
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #2 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-11-21 12:25:46 --- Actually that resource _is_ present in the .exe file. It's of type RT_MENU, and looks like:
1434 MENU LANGUAGE LANG_GERMAN, SUBLANG_GERMAN { POPUP "!Status" { MENUITEM "!Away", 32937 MENUITEM SEPARATOR MENUITEM "!Online", 32936 MENUITEM "!Invisible", 32935 MENUITEM SEPARATOR MENUITEM "!Offline", 32934 } }
I don't get really why loading this fails, but it seems to be really the cause of the crash.
http://bugs.winehq.org/show_bug.cgi?id=10525
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |starlog@cfl.rr.com
--- Comment #3 from Vitaliy Margolen vitaliy@kievinfo.com 2007-11-23 02:21:34 --- *** Bug 10545 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #4 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-11-23 10:42:28 --- Created an attachment (id=9301) --> (http://bugs.winehq.org/attachment.cgi?id=9301) +resource, +relay,+seh log
Here's last part of the debuglog, where it fails to load the specific resource , and crashes
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #5 from Tom starlog@cfl.rr.com 2007-11-23 18:13:51 --- I also cannot get it to even launch, so any thing I can help let me know. Running Ubuntu 7.04
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #6 from Tom starlog@cfl.rr.com 2007-11-30 19:09:13 --- Created an attachment (id=9420) --> (http://bugs.winehq.org/attachment.cgi?id=9420) starting not working
This is what happens from a fresh load on Ubuntu 7.04
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #7 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-03-22 04:40:36 --- A user submitted garbage test results into appdb, so it's still crashing. I had another look at the crash, and it looks that this is the culprit:
0009:Ret KERNEL32.GetLastError() retval=00000717
That resolves to ERROR_RESOURCE_LANG_NOT_FOUND. With a simple hack like below the app starts fine, so this must be a bug somehow in FindResourceExW. Maybe someone who knows a lot about resources could have a look.
Hack:
diff --git a/dlls/kernel32/resource.c b/dlls/kernel32/resource.c index f49ea24..131e746 100644 --- a/dlls/kernel32/resource.c +++ b/dlls/kernel32/resource.c @@ -221,6 +221,7 @@ HRSRC WINAPI FindResourceA( HMODULE hModule, LPCSTR name, LPCSTR type ) HRSRC WINAPI FindResourceExW( HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang ) { TRACE( "%p %s %s %04x\n", hModule, debugstr_w(type), debugstr_w(name), lang ); + lang=MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL);
if (!hModule) hModule = GetModuleHandleW(0); else if (!HIWORD(hModule))
http://bugs.winehq.org/show_bug.cgi?id=10525
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |kernel32 Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2008-03-22 08:20:10 --- I added a test case demonstrating that FindResourceExW is correct to fail in that case. Not idea what the real problem is...
http://bugs.winehq.org/show_bug.cgi?id=10525
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #9 from Anastasius Focht focht@gmx.net 2008-03-22 17:23:16 --- Hello,
FindResourceExW is not to blame here. The real problem is that the client is causing a page fault in resource enumeration callback proc while enumerating through RT_MENU resources.
At the point of the page fault, the app has several chained SEH's installed, mainly C++ exception handlers. By comparing SEH chains I found the problem (and obvious solution). In Windows there sits a system installed SEH between the app SEH which is installed on resource enum callback entry and the next app SEH installed by app function which calls EnumResourceNamesW.
wine SEH chain (fictive names for illustration):
<rogue_code_here> app_SEH_res_enum_callback (C++ handler) app_SEH_blah1 (C++ handler) app_SEH_blah2 (C++ handler) ...
windows SEH chain (fictive names for illustration):
<rogue_code_here> app_SEH_res_enum_callback (C++ handler) sys_SEH_res_enum (page fault handler) app_SEH_blah1 (C++ handler) app_SEH_blah2 (C++ handler) ...
This is probably a precaution of windows to safeguard against rogue app code while calling client supplied resource enum callbacks. The solution is to add SEH for page faults to all resource enum functions which call app supplied callbacks.
Pseudo code example:
--- snip dlls/kernel32/resource.c --- BOOL WINAPI EnumResourceNamesW( ...) { .. __TRY { /* resource enumeration loop */ for( ...) { /* call client enum proc (callback) which might cause page fault */ ret = pfn( args); } } __EXCEPT_PAGE_FAULT { status = STATUS_ACCESS_VIOLATION; ret = FALSE; } __ENDTRY .. if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); return ret; } --- snip dlls/kernel32/resource.c ---
Although guarding only EnumResourceNamesW() seems to let the app's login screen come up, I suggest to add SEH's to all resource enumeration functions which call client supplied callbacks. To verify this behaviour, you could write test cases which supply page fault causing callbacks when calling each resource enum API. Ideally, the SEH of EnumResourceXXX caller should never see page faults ;-)
Regards
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #10 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-04-19 04:14:40 --- Created an attachment (id=12295) --> (http://bugs.winehq.org/attachment.cgi?id=12295) patch from comment #9
Hi, i can confirm the findings from comment #9; HLSW starts fine with the attached patch. I'll add keyword patch
http://bugs.winehq.org/show_bug.cgi?id=10525
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #11 from Connor rocket2dmn@aol.com 2008-05-01 22:42:59 --- Created an attachment (id=12633) --> (http://bugs.winehq.org/attachment.cgi?id=12633) hlsw will not start
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #12 from Gregor Münch greg87@online.de 2008-05-25 13:00:27 --- Thx for the patch, its working. I hope a patch to fix the crash will find its way to git.
http://bugs.winehq.org/show_bug.cgi?id=10525
haarp liquitsnake@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |liquitsnake@gmx.net
http://bugs.winehq.org/show_bug.cgi?id=10525
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified
--- Comment #13 from Austin English austinenglish@gmail.com 2009-01-18 03:46:56 --- Removing deprecated CVS/GIT version tag. Please retest in current git. If the bug is still present in today's wine, but was not present in some earlier version of wine, please update version field to earliest known version of wine that had the bug. Thanks!
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #14 from Jouni Järvinen jounijarvis@gmail.com 2009-04-16 11:41:44 --- Created an attachment (id=20490) --> (http://bugs.winehq.org/attachment.cgi?id=20490) HLSW traceback 0
A traceback on WINE1.1.18, Ubuntu32 Ibex. Emulation mode=XP.
http://bugs.winehq.org/show_bug.cgi?id=10525
Jouni Järvinen jounijarvis@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jounijarvis@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=10525
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dekloe@zonnet.nl
--- Comment #15 from Jeff Zaroyko jeffz@jeffz.name 2009-10-05 07:40:54 --- *** Bug 16320 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=10525
Andrey Turkin andrey.turkin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.turkin@gmail.com
--- Comment #16 from Andrey Turkin andrey.turkin@gmail.com 2009-10-06 00:26:23 --- Please retest
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #17 from Jos de Kloe dekloe@zonnet.nl 2009-10-13 15:37:08 --- (In reply to comment #16)
I have retested several versions of the gensdatapro application (which had a bug that was marked as a duplicate of this one, see http://bugs.winehq.org/show_bug.cgi?id=16320 using wine version wine-1.1.30-414-g7be2f6d
Clearly the startup bug is solved, and all versions of the program do start now without crashing or errors. There are still some minor issues with this app. but this is a great step forward, so thanks to all involved for your effort.
Jos.
http://bugs.winehq.org/show_bug.cgi?id=10525
--- Comment #18 from Jouni Järvinen jounijarvis@gmail.com 2009-10-13 15:56:50 --- Allow me to compliment everyone who've made some progress with this app. Incompatibility is even lesser problem now.
http://bugs.winehq.org/show_bug.cgi?id=10525
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #19 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-10-13 16:02:03 --- reported fixed
http://bugs.winehq.org/show_bug.cgi?id=10525
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #20 from Alexandre Julliard julliard@winehq.org 2009-10-23 13:18:18 --- Closing bugs fixed in 1.1.32.
http://bugs.winehq.org/show_bug.cgi?id=10525
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |95eb435a33826ee46f87cc687c1 | |ea16c6fc10c8f Version|unspecified |0.9.49.