https://bugs.winehq.org/show_bug.cgi?id=50407
Bug ID: 50407 Summary: Multiple Adobe CC products fail to start, reporting 'err:module:LdrInitializeThunk "CRClient.dll" failed to initialize' ('_Syserror_map' should return non-NULL string for unknown errors) Product: Wine Version: 6.0-rc3 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: msvcp Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
found with various Adobe CC products. User visible symptom in console:
--- snip --- err:module:LdrInitializeThunk "CRClient.dll" failed to initialize, aborting --- snip ---
Mentioned in bug 47015 and probably more. Users install a crapload of MSVC runtimes via 'winetricks' hence the error is gone - only to run into other Wine bugs.
--- snip --- $ WINEDEBUG=+seh,+relay,+msvcp wine ./Adobe\ Audition.exe >>log.txt 2>&1 ... 0104:Ret PE DLL (proc=0000000012F6C30C,module=0000000012EF0000 L"AuUIToolkit.dll",reason=PROCESS_ATTACH,res=000000000021FB00) retval=1 0104:Call PE DLL (proc=0000000013134EF4,module=0000000013100000 L"CRClient.dll",reason=PROCESS_ATTACH,res=000000000021FB00) ... 0104:Call msvcp140.?_Syserror_map@std@@YAPEBDH@Z(00000000) ret=1310db9c 0104:trace:msvcp:_Syserror_map (0) 0104:Ret msvcp140.?_Syserror_map@std@@YAPEBDH@Z() retval=00000000 ret=1310db9c 0104:trace:seh:dispatch_exception code=c0000005 flags=0 addr=000000001310DBAA ip=000000001310DBAA tid=0104 0104:trace:seh:dispatch_exception info[0]=0000000000000000 0104:trace:seh:dispatch_exception info[1]=0000000000000000 0104:trace:seh:dispatch_exception rax=0000000000000000 rbx=0000000000000000 rcx=00000000ffe0e8d7 rdx=0000000000000050 0104:trace:seh:dispatch_exception rsi=000000000021ea10 rdi=000000000021e960 rbp=000000000021eaf0 rsp=000000000021e8b0 0104:trace:seh:dispatch_exception r8=0000000000000fff r9=0000000000000000 r10=000000000021e40b r11=0000000000000246 0104:trace:seh:dispatch_exception r12=000000000021fb00 r13=00000000ffd90000 r14=0000000000387f6a r15=0000000000387f53 0104:trace:seh:call_vectored_handlers calling handler at 000000007B011BA0 code=c0000005 flags=0 0104:trace:seh:call_vectored_handlers handler at 000000007B011BA0 returned 0 ... 0104:exception c0000005 in PE entry point (proc=0000000013134EF4,module=0000000013100000,reason=PROCESS_ATTACH,res=000000000021FB00) 0104:Ret PE DLL (proc=0000000013134EF4,module=0000000013100000 L"CRClient.dll",reason=PROCESS_ATTACH,res=000000000021FB00) retval=0 0104:Call PE DLL (proc=0000000013134EF4,module=0000000013100000 L"CRClient.dll",reason=PROCESS_DETACH,res=000000000021FB00) 0104:Ret PE DLL (proc=0000000013134EF4,module=0000000013100000 L"CRClient.dll",reason=PROCESS_DETACH,res=000000000021FB00) retval=0 0104:err:module:LdrInitializeThunk "CRClient.dll" failed to initialize, aborting 0104:err:module:LdrInitializeThunk Initializing dlls for L"Z:\home\focht\Downloads\audition\1\universal\App\Adobe Audition.exe" failed, status c0000005 ... --- snip ---
_Syserror_map(0) seems intentional at this place. I found no preceding code path in the dll init code that passes an actual error value.
Corresponding client code:
--- snip --- 000000001310DB80 | mov qword ptr ss:[rsp+8],rbx | 000000001310DB85 | push rdi | 000000001310DB86 | sub rsp,30 | 000000001310DB8A | xor ebx,ebx | 000000001310DB8C | mov ecx,r8d | error = 0 (caller) 000000001310DB8F | mov dword ptr ss:[rsp+20],ebx | 000000001310DB93 | mov rdi,rdx | 000000001310DB96 | call qword ptr ds:[<&_Syserror_map>] | 000000001310DB9C | mov qword ptr ds:[rdi+18],F | 000000001310DBA4 | mov qword ptr ds:[rdi+10],rbx | 000000001310DBA8 | mov byte ptr ds:[rdi],bl | 000000001310DBAA | cmp byte ptr ds:[rax],bl | NULL -> *boom* 000000001310DBAC | je crclient.1310DBBB | 000000001310DBAE | or rbx,FFFFFFFFFFFFFFFF | 000000001310DBB2 | inc rbx | 000000001310DBB5 | cmp byte ptr ds:[rax+rbx],0 | 000000001310DBB9 | jne crclient.1310DBB2 | 000000001310DBBB | mov r8,rbx | 000000001310DBBE | mov rdx,rax | 000000001310DBC1 | mov rcx,rdi | 000000001310DBC4 | call crclient.13106950 | 000000001310DBC9 | mov rbx,qword ptr ss:[rsp+40] | 000000001310DBCE | mov rax,rdi | 000000001310DBD1 | add rsp,30 | 000000001310DBD5 | pop rdi | 000000001310DBD6 | ret | --- snip ---
Wine source:
https://source.winehq.org/git/wine.git/blob/9d7a710fc0d1a0ecea17a68675d3899a...
--- snip --- 2853 #if _MSVCP_VER >= 110 2854 /* ?_Syserror_map@std@@YAPBDH@Z */ 2855 /* ?_Syserror_map@std@@YAPEBDH@Z */ 2856 const char* __cdecl _Syserror_map(int err) 2857 { 2858 int i; 2859 2860 TRACE("(%d)\n", err); 2861 2862 for(i = 0; i < ARRAY_SIZE(syserror_map); i++) 2863 { 2864 if(syserror_map[i].err == err) 2865 return syserror_map[i].str; 2866 } 2867 return NULL; 2868 } 2869 #endif --- snip ---
Returning NULL for unknown error codes (no mapping found) is not desirable. Wine should return a string in such cases to avoid crashes.
$ wine --version wine-6.0-rc3-34-g9d7a710fc0d
Regards
https://bugs.winehq.org/show_bug.cgi?id=50407
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://ccmdls.adobe.com/Ad | |obeProducts/AUDT/13.0.4.39/ | |win64/dea80cdb-fd91-4256-8f | |97-d293433bac74/AdobeAuditi | |on13All.zip
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
unlike Adobe CC 2019 editions (bug 47015 etc.) I couldn't find any direct links for Adobe CC 2020.
https://prodesigntools.com/adobe-cc-2019-direct-download-links.html
Fortunately using the pattern from 2019 one can deduce the main payload: 'AdobeAudition13All.zip'. Searching for that on the net returns full download links.
The server downloads are supposed to be accessed with Adobe CC client only. Attempt to download with browser or wget will result in: "You don't have permission to access".
Fortunately there is an easy way to get those downloads: impersonation via custom user agent string ;-)
--- snip --- $ wget -U "Creative Cloud" \
https://ccmdls.adobe.com/AdobeProducts/AUDT/13.0.4.39/win64/dea80cdb-fd91-42... --- snip ---
The archive is supposed to be used with the Adobe installer app. But again, one can work around it.
--- snip --- $ 7z l AdobeAudition13All.zip
Scanning the drive for archives: 1 file, 309615360 bytes (296 MiB)
Listing archive: AdobeAudition13All.zip
-- Path = AdobeAudition13All.zip Type = zip Physical Size = 309615360
Date Time Attr Size Compressed Name ------------------- ----- ------------ ------------ ------------------------ 2020-03-08 22:14:16 D.... 0 2 1\CreateDirectory 2020-03-08 22:14:14 D.... 0 2 1\CreateDirectory\AdobeCommon 2020-03-08 22:14:14 D.... 0 2 1\CreateDirectory\AdobeCommon\Keyfiles 2020-03-08 22:14:14 D.... 0 2 1\CreateDirectory\AdobeCommon\Keyfiles\Audition 2020-03-08 22:14:08 D.... 0 2 1\CreateDirectory\AdobeCommon\Keyfiles\Audition\13.0 2020-03-08 22:14:08 D.... 0 2 1\CreateDirectory\AdobeCommon\Keyfiles\Audition\13.0\Adobe Audition Preview Files 2020-03-08 22:14:08 D.... 0 2 1\CreateDirectory\AdobeCommon\Keyfiles\Audition\13.0\Media Cache Files 2020-03-08 22:14:14 D.... 0 2 1\CreateDirectory\INSTALLDIR 2020-03-08 22:14:14 D.... 0 2 1\CreateDirectory\INSTALLDIR\Adobe Audition 2020 2020-03-08 22:14:14 D.... 0 2 1\CreateDirectory\INSTALLDIR\Adobe Audition 2020\Required 2020-03-08 22:14:14 D.... 0 2 1\CreateDirectory\INSTALLDIR\Adobe Audition 2020\Required\data 2020-03-08 22:14:08 D.... 0 2 1\CreateDirectory\INSTALLDIR\Adobe Audition 2020\Required\data\cache 2020-03-08 22:14:16 D.... 0 2 1\CreateDirectory\UserRoamingAppData ... 2020-03-08 22:14:12 D.... 0 2 1\universal 2020-03-08 22:13:14 D.... 0 2 1\universal\App 2020-03-08 22:13:14 ....A 1788496 741852 1/universal/App/ACE.dll 2020-03-08 22:13:14 ....A 87120 34117 1/universal/App/ACEWrapper.dll 2020-03-08 22:13:14 ....A 1815632 222504 1/universal/App/Adobe Audition.exe ... 2020-03-08 21:13:18 ....A 522750 82344 1/universal/App/typesupport/unicode/mappings/win/CP950.TXT 2020-03-08 22:13:14 ....A 634448 239428 1/universal/App/utest.dll 2020-03-08 22:13:14 ....A 546896 199693 1/universal/App/VideoFrame.dll 2020-03-08 22:13:14 ....A 1411152 532092 1/universal/App/VideoRenderer.dll 2020-03-08 22:13:14 ....A 706640 315189 1/universal/App/VulcanControl.dll 2020-03-08 22:13:14 ....A 648272 295617 1/universal/App/VulcanMessage5.dll 2020-03-08 22:13:14 ....A 2864720 842325 1/universal/App/xerces.dll 2020-03-08 22:13:14 ....A 1645136 710921 1/universal/App/ZXPSignLib-minimal.dll 2020-03-08 22:14:16 ....A 51942 2499 AdobeAudition13All.pimx ------------------- ----- ------------ ------------ ------------------------ 2020-03-09 05:01:48 895281787 309404184 917 files, 131 folders
--- snip ---
'AdobeAudition13All.pimx' is an XML file which provides information how the archive content is supposed to be used with the installer. File extraction/destination paths, registry entries etc.
--- snip --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Package> <Type>core</Type> <PackageName>AdobeAudition13All</PackageName> <ProcessorFamily>64-bit</ProcessorFamily> <Assets> <Asset source="[StagingFolder]\universal\App" target="[INSTALLDIR]\Adobe Audition 2020" recursive="true"/> <Asset source="[StagingFolder]\HelpCfg" target="[AdobeCommon]\HelpCfg" recursive="true"/> <Asset source="[StagingFolder]\support\ui_files\stable" target="[AdobeCommon]\Keyfiles\Audition\13.0\Icons" recursive="true"/> <Asset source="[StagingFolder]\CreateDirectory\INSTALLDIR\Adobe Audition 2020\Required\data\cache" target="[INSTALLDIR]\Adobe Audition 2020\Required\data\cache" recursive="true" isRecursiveDelete="true"/> <Asset source="[StagingFolder]\CreateDirectory\AdobeCommon\Keyfiles\Audition\13.0" target="[AdobeCommon]\Keyfiles\Audition\13.0" recursive="true" isRecursiveDelete="true" isUserPreferences="true"/> <Asset source="[StagingFolder]\CreateDirectory\UserRoamingAppData\Adobe\Audition\13.0" target="[UserRoamingAppData]\Adobe\Audition\13.0" recursive="true" isRecursiveDelete="true" isUserPreferences="true"/> <Asset source="[StagingFolder]\CreateDirectory\UserRoamingAppData\Adobe\GPUSniffer\13.0" target="[UserRoamingAppData]\Adobe\GPUSniffer\13.0" recursive="true" isRecursiveDelete="true" isUserPreferences="true"/> </Assets> <Commands> <Registry> <Path>HKEY_CLASSES_ROOT.auproj</Path> <Name>Default</Name> <Type>REG_SZ</Type> <Value>AdobeAudition13_auproj</Value> </Registry> ... --- snip ---
Armed with that information and little shell scripting one can get a working installation without the (non-working) installer.
All this is not directly related to the Wine issue(s) but I found it worth sharing.
After fixing this bug, it runs into bug 50401.
$ sha1sum AdobeAudition13All.zip b2800e4fd28f3c669cd0b3754ec11a9e8e18cee1 AdobeAudition13All.zip
$ du -sh AdobeAudition13All.zip 296M AdobeAudition13All.zip
$ wine --version wine-6.0-rc4
Regards
https://bugs.winehq.org/show_bug.cgi?id=50407
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |b54ab691a7a484b7ce3d38b2d77 | |088fb8f946257 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/b54ab691a7a484b7ce3d38b2d7... ("ucrtbase: Fix _Syserror_map behavior on unknown error.").
Thanks Piotr
--- snip --- ... 0104:Call PE DLL (proc=0000000013134EF4,module=0000000013100000 L"CRClient.dll",reason=PROCESS_ATTACH,res=000000000021FB00) ... 0104:trace:msvcrt:_initterm Call init function 0000000013101260 0104:Call msvcp140.?_Syserror_map@std@@YAPEBDH@Z(00000000) ret=1310db9c 0104:trace:msvcp:_Syserror_map (0) 0104:Ret msvcp140.?_Syserror_map@std@@YAPEBDH@Z() retval=00b17ae0 ret=1310db9c 0104:Call ucrtbase.memcpy(0021e960,00b17ae0,0000000d) ret=13106a53 0104:Ret ucrtbase.memcpy() retval=0021e960 ret=13106a53 0104:Call ucrtbase.memcpy(0021e9d0,0021e960,0000000d) ret=13106c96 0104:Ret ucrtbase.memcpy() retval=0021e9d0 ret=13106c96 0104:Call ucrtbase.memmove(0021e9f0,0021e9d0,0000000e) ret=13106cf7 0104:Ret ucrtbase.memmove() retval=0021e9f0 ret=13106cf7 0104:Call ucrtbase.__std_exception_copy(0021ea10,131501c0) ret=1310da82 0104:trace:seh:__std_exception_copy (000000000021EA10 00000000131501C0) 0104:Call ntdll.RtlAllocateHeap(13f60000,00000000,0000000e) ret=00335abe 0104:Ret ntdll.RtlAllocateHeap() retval=1403fd70 ret=00335abe 0104:Ret ucrtbase.__std_exception_copy() retval=1403fd01 ret=1310da82 0104:Call ucrtbase._register_onexit_function(1314f498,131387e0) ret=131345d6 0104:trace:msvcrt:_register_onexit_function (000000001314F498 00000000131387E0) 0104:Ret ucrtbase._register_onexit_function() retval=00000000 ret=131345d6 0104:trace:msvcrt:_initterm returned 0104:trace:msvcrt:_initterm Call init function 00000000131013A0 ... 0104:trace:msvcrt:_initterm returned 0104:Ret ucrtbase._initterm() retval=00000009 ret=13134cb3 0104:Ret PE DLL (proc=0000000013134EF4,module=0000000013100000 L"CRClient.dll",reason=PROCESS_ATTACH,res=000000000021FB00) retval=1 --- snip ---
$ wine --version wine-6.1-70-g433b9081ba7
Regards
https://bugs.winehq.org/show_bug.cgi?id=50407
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.2.
https://bugs.winehq.org/show_bug.cgi?id=50407
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|https://ccmdls.adobe.com/Ad |https://web.archive.org/web |obeProducts/AUDT/13.0.4.39/ |/20210221122639if_/http://m |win64/dea80cdb-fd91-4256-8f |oodle.lawley.wa.edu.au/ACC/ |97-d293433bac74/AdobeAuditi |products/AdobeProducts/AUDT |on13All.zip |/13.0.0.519/win64/38ed1943- | |a0e8-44a1-a4c6-48cda3e3b145 | |/AdobeAudition13All.zip
https://bugs.winehq.org/show_bug.cgi?id=50407
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=50407
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #4 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.1.