https://bugs.winehq.org/show_bug.cgi?id=39361
Bug ID: 39361 Summary: WildStar Launcher2 crashes immediately after startup Product: Wine-staging Version: 1.7.51 Hardware: x86 URL: http://wildstar.patcher.ncsoft.com/Wildstar.exe OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: xomachiner@gmail.com CC: erich.e.hoover@wine-staging.com, michael@fds-team.de, sebastian@fds-team.de Distribution: ArchLinux
Created attachment 52461 --> https://bugs.winehq.org/attachment.cgi?id=52461 Application calls
WildStar Launcher2 crashes without any error message right after start. The problem probably in shell32.dll component. There is some results of investigation:
1. System calls The application before being crashed done two important calls (application related call log attached below): CreateActCtxW(structure) and GetLastError()
The first of them returns 0xffffffff (-1) and the second returns 0x715 The mentioned "structure" have following data:
typedef struct tagACTCTX { ULONG cbSize = 0x20; DWORD dwFlags = ACTCTX_FLAG_SET_PROCESS_DEFAULT | ACTCTX_FLAG_RESOURCE_NAME_VALID | ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID; LPCWSTR lpSource = (by pointer) "shell32.dll"; USHORT wProcessorArchitecture = 0x0; LANGID wLangId = 0x0; LPCTSTR lpAssemblyDirectory = (by pointer) "c:\windows\system32"; LPCTSTR lpResourceName = (instead of pointer) 0x0000007c; LPCTSTR lpApplicationName = NULL; HMODULE hModule = NULL; }
A quick check of MSDN showed that return value -1(INVALID_HANDLE_VALUE) from first call means that function failed to create a handle, and errorcode obtained from GetLastError function related to resource problem (ERROR_RESOURCE_TYPE_NOT_FOUND)
2. Dirty hack Moreover if the returnvalue of CreateActCtxW will be replaced on the fly (using winedbg), the application runs further and shows launcher window. (Not always, there are some other problems which can crash application before window drawing)
If shell32.dll will be replaced by original one from WinXP, the application also passes this call but crashes in another place.
https://bugs.winehq.org/show_bug.cgi?id=39361
--- Comment #1 from Dmitriy xomachiner@gmail.com --- Created attachment 52462 --> https://bugs.winehq.org/attachment.cgi?id=52462 Console log
Console log without WINEDEBUG
https://bugs.winehq.org/show_bug.cgi?id=39361
Dmitriy xomachiner@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Installer
https://bugs.winehq.org/show_bug.cgi?id=39361
--- Comment #2 from Sebastian Lackner sebastian@fds-team.de --- Thanks for reporting this issue.
The Wine-staging product should be used for regressions introduced by Wine Staging patches. Do you know if this is the case? If the problem also exists in the development branch the product "Wine" would be more appropriate (even when the bug is blocked by other issues).
https://bugs.winehq.org/show_bug.cgi?id=39361
Dmitriy xomachiner@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |shell32 Product|Wine-staging |Wine
https://bugs.winehq.org/show_bug.cgi?id=39361
--- Comment #3 from Dmitriy xomachiner@gmail.com --- (In reply to Sebastian Lackner from comment #2)
Thanks for reporting this issue.
The Wine-staging product should be used for regressions introduced by Wine Staging patches. Do you know if this is the case? If the problem also exists in the development branch the product "Wine" would be more appropriate (even when the bug is blocked by other issues).
Thank you for the correction. I'm just encountered the issue in Wine-staging first time, so now I've made test on Wine and got same result. The product have been changed.
https://bugs.winehq.org/show_bug.cgi?id=39361
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW URL|http://wildstar.patcher.ncs |http://wildstar.patcher.ncs |oft.com/Wildstar.exe |oft.com/PTR/WildStarPTR.exe Ever confirmed|0 |1
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- Confirming. However, I couldn't reproduce the issue with your original link, only with the WildStarPTR.exe download. I've replaced it above.
With the following hack the installer proceeds:
--- snip --- --- a/dlls/kernel32/actctx.c +++ b/dlls/kernel32/actctx.c @@ -124,7 +124,7 @@ HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx) if ((status = RtlCreateActivationContext(&hActCtx, pActCtx))) { SetLastError(RtlNtStatusToDosError(status)); - return INVALID_HANDLE_VALUE; + return 0; } return hActCtx; } --- snip ---
https://bugs.winehq.org/show_bug.cgi?id=39361
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com --- As a start you can try to add dummy manifest with 0x7c id to shell32, and it will probably work. Currently it fails trying to locate resource type section that doesn't exist. It's a bit strange that application does that.
https://bugs.winehq.org/show_bug.cgi?id=39361
--- Comment #6 from Dmitriy xomachiner@gmail.com --- (In reply to Nikolay Sivov from comment #5)
As a start you can try to add dummy manifest with 0x7c id to shell32, and it will probably work. Currently it fails trying to locate resource type section that doesn't exist. It's a bit strange that application does that.
Manifest export(using resource editor) from original shell32.dll to buildin works. Thank you for idea!
https://bugs.winehq.org/show_bug.cgi?id=39361
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com --- It's not a good idea to use windows resources, I'm working on making it as minimal as possible.
https://bugs.winehq.org/show_bug.cgi?id=39361
--- Comment #8 from Dmitriy xomachiner@gmail.com --- Created attachment 52466 --> https://bugs.winehq.org/attachment.cgi?id=52466 Dummy manifest
Ok, I've inserted to shell32.dll sample manifest which generated by resource editor("Resource Hacker" exactly) and Wildstar.exe was crashed. So I just deleted some lines from the manifest which not present in extracted from windows one. Result is also works.(resulting manifest is attached to comment)
P.S.: I wonder why the bug can not be reproduced in live Wildstar launcher. All my tests and logs attached to the bug report were obtained from it. Even the address of CreateActCtxW call is identical both PTR and live versions.
https://bugs.winehq.org/show_bug.cgi?id=39361
--- Comment #9 from Nikolay Sivov bunglehead@gmail.com --- I just sent a patch that makes window with license agreement appear - https://www.winehq.org/pipermail/wine-patches/2015-September/142633.html.
https://bugs.winehq.org/show_bug.cgi?id=39361
xxliarxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xxliarxx@gmail.com
--- Comment #10 from xxliarxx@gmail.com --- i can confirm that Nikolay's patch makes the game playable! (wine staging 1.7.51 with CSMT patches from the arch linux aur)
https://bugs.winehq.org/show_bug.cgi?id=39361
Kaito me@mkaito.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |me@mkaito.com
--- Comment #11 from Kaito me@mkaito.com --- (In reply to Nikolay Sivov from comment #9)
I just sent a patch that makes window with license agreement appear - https://www.winehq.org/pipermail/wine-patches/2015-September/142633.html.
I have just compiled wine-staging off git head with this patch and can confirm that it makes the launcher work. Thanks, Nikolay!
https://bugs.winehq.org/show_bug.cgi?id=39361
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |972a74ddfe5d06325338196a26e | |5b9d295205101 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #12 from Nikolay Sivov bunglehead@gmail.com --- Fixed with 972a74ddfe5d06325338196a26e5b9d295205101.
https://bugs.winehq.org/show_bug.cgi?id=39361
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.52.