https://bugs.winehq.org/show_bug.cgi?id=43472
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Ever confirmed|0 |1 CC| |focht@gmx.net Summary|R-Link 2 Toolbox crashes on |R-Link 2 Toolbox crashes on |startup |startup (Wine's | |'packager.dll' is preferred | |over native, causing | |failure to load app | |provided library with same | |name) URL| |https://rcs-rlmanager.aw.at | |os.net/archives/win/RLink2T | |oolbox-latest.exe Status|UNCONFIRMED |NEW
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
Relevant part of trace log.
--- snip --- $ pwd /home/focht/.wine/drive_c/users/focht/Local Settings/Application Data/R-Link 2 Toolbox
$ WINEDEBUG=+tid,+seh,+relay,+loaddll,+module wine ./R-Link\ 2\ Toolbox.exe
log.txt 2>&1
... 00b8:Call KERNEL32.GetCommandLineW() ret=004021a9 00b8:Ret KERNEL32.GetCommandLineW() retval=00115968 ret=004021a9 00b8:Call shell32.CommandLineToArgvW(00115968 L""C:\users\focht\Local Settings\Application Data\R-Link 2 Toolbox\R-Link 2 Toolbox.exe"",0033fd88) ret=004021b0 ... 00b8:Ret shell32.CommandLineToArgvW() retval=00136948 ret=004021b0 00b8:Call KERNEL32.LoadLibraryW(004031f0 L"packager.dll") ret=004021c1 00b8:trace:module:load_dll looking for L"packager.dll" in L"C:\users\focht\Local Settings\Application Data\R-Link 2 Toolbox;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" ... 00b8:trace:module:get_load_order looking for L"C:\users\focht\Local Settings\Application Data\R-Link 2 Toolbox\packager.dll" 00b8:trace:module:get_load_order got hardcoded default for L"C:\users\focht\Local Settings\Application Data\R-Link 2 Toolbox\packager.dll" 00b8:trace:module:load_builtin_dll Trying built-in L"C:\users\focht\Local Settings\Application Data\R-Link 2 Toolbox\packager.dll" ... 00b8:warn:module:load_builtin_dll failed to load .so lib for builtin L"C:\users\focht\Local Settings\Application Data\R-Link 2 Toolbox\packager.dll": /home/focht/.wine/dosdevices/c:/users/focht/Local Settings/Application Data/R-Link 2 Toolbox/packager.dll: invalid ELF header 00b8:trace:module:load_builtin_dll Trying built-in L"packager.dll" ... 00b8:trace:module:load_builtin_callback loaded packager.dll 0x136c60 0x7e2d0000 00b8:trace:loaddll:load_builtin_dll Loaded L"C:\windows\system32\packager.dll" at 0x7e2d0000: builtin 00b8:Call PE DLL (proc=0x7e2e24c9,module=0x7e2d0000 L"packager.dll",reason=WINE_PREATTACH,res=(nil)) 00b8:Ret PE DLL (proc=0x7e2e24c9,module=0x7e2d0000 L"packager.dll",reason=WINE_PREATTACH,res=(nil)) retval=1 00b8:trace:module:load_dll Loaded module L"C:\users\focht\Local Settings\Application Data\R-Link 2 Toolbox\packager.dll" (builtin) at 0x7e2d0000 00b8:trace:module:process_attach (L"packager.dll",(nil)) - START 00b8:Call PE DLL (proc=0x7e2e24c9,module=0x7e2d0000 L"packager.dll",reason=PROCESS_ATTACH,res=(nil)) 00b8:Call KERNEL32.DisableThreadLibraryCalls(7e2d0000) ret=7e2e24b4 00b8:Ret KERNEL32.DisableThreadLibraryCalls() retval=00000001 ret=7e2e24b4 00b8:Ret PE DLL (proc=0x7e2e24c9,module=0x7e2d0000 L"packager.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 00b8:trace:module:process_attach (L"packager.dll",(nil)) - END 00b8:Ret KERNEL32.LoadLibraryW() retval=7e2d0000 ret=004021c1 00b8:Call KERNEL32.GetProcAddress(7e2d0000,00403224 "start_launcher") ret=004022e8 00b8:Ret KERNEL32.GetProcAddress() retval=00000000 ret=004022e8 00b8:Call KERNEL32.GetProcAddress(7e2d0000,00403234 "stop_launcher") ret=004022f2 00b8:Ret KERNEL32.GetProcAddress() retval=00000000 ret=004022f2 00b8:trace:seh:raise_exception code=c0000005 flags=0 addr=(nil) ip=00000000 tid=00b8 00b8:trace:seh:raise_exception info[0]=00000008 00b8:trace:seh:raise_exception info[1]=00000000 00b8:trace:seh:raise_exception eax=00000000 ebx=00000001 ecx=0041162c edx=0000007f esi=00136948 edi=00000000 00b8:trace:seh:raise_exception ebp=7e2d0000 esp=0033fd6c cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010202 00b8:trace:seh:call_stack_handlers calling handler at 0x4027e9 code=c0000005 flags=0 00b8:Call msvcr120._except_handler4_common(0040400c,0040244a,0033fd14,0033fe30,0033fa48,0033f8fc) ret=00402807 00b8:trace:seh:_except_handler4_common exception c0000005 flags=0 at (nil) handler=0x4027e9 0x33fa48 0x33f8fc cookie=773ce092 scope table=0x4035d8 cookies=-2/0,-52/0 00b8:trace:seh:_except_handler4_common level 0 prev -2 filter 0x402721 00b8:Call msvcr120._XcptFilter(c0000005,0033f7a4) ret=00402732 00b8:trace:seh:_XcptFilter (c0000005,0x33f7a4) 00b8:Ret msvcr120._XcptFilter() retval=00000000 ret=00402732 00b8:trace:seh:_except_handler4_common filter returned CONTINUE_SEARCH 00b8:trace:seh:_except_handler4_common reached -2, returning ExceptionContinueSearch 00b8:Ret msvcr120._except_handler4_common() retval=00000001 ret=00402807 00b8:trace:seh:call_stack_handlers handler at 0x4027e9 returned 1 00b8:trace:seh:call_stack_handlers calling handler at 0x7bcad785 code=c0000005 flags=0 00b8:Call KERNEL32.UnhandledExceptionFilter(0033f864) ret=7bcad7c0 wine: Unhandled page fault on execute access to 0x00000000 at address (nil) (thread 00b8), starting debugger... ... Backtrace: =>0 0x00000000 (0x7e2d0000) 1 0x00000003 (0x00905a4d) 0x00000000: -- no code accessible -- Modules: Module Address Debug info Name (40 modules) PE 400000- 408000 Deferred r-link 2 toolbox ELF 7b400000-7b7f0000 Deferred kernel32<elf> -PE 7b420000-7b7f0000 \ kernel32 ELF 7bc00000-7bd09000 Deferred ntdll<elf> -PE 7bc30000-7bd09000 \ ntdll ELF 7c000000-7c004000 Deferred <wine-loader> ELF 7e2ce000-7e2e7000 Deferred packager<elf> -PE 7e2d0000-7e2e7000 \ packager ELF 7e2e7000-7e30c000 Deferred imm32<elf> -PE 7e2f0000-7e30c000 \ imm32 ... Threads: process tid prio (all id:s are in hex) ... 000000b7 (D) C:\users\focht\Local Settings\Application Data\R-Link 2 Toolbox\R-Link 2 Toolbox.exe 000000b8 0 <== --- snip ---
The app ships a library named 'packager.dll' in its install directory.
--- snip --- $ pwd /home/focht/.wine/drive_c/users/focht/Local Settings/Application Data/R-Link 2 Toolbox
$ ls -1sh total 3.6M 0 app 448K msvcp120.dll 756K msvcr100.dll 952K msvcr120.dll 208K packager.dll 24K R-Link 2 Toolbox.exe 8.0K R-Link 2 Toolbox.ico 0 runtime 44K unins000.dat 1.2M unins000.exe --- snip ---
Wine provides a builtin 'packager.dll' which is currently a stub for Microsoft's Windows OLE Package Manager (Object Packager 2 component). The builtin library is preferred by default over any native version (app provided one). The symbol lookup fails because the library has an entirely different meaning -> different exports.
You can work around by:
--- snip --- $ WINEDLLOVERRIDES=packager=n wine ./R-Link\ 2\ Toolbox.exe --- snip ---
or setting the override permanently in registry using 'winecfg'.
Wine should prefer native over builtin (DLL_WINE_PREATTACH -> FALSE) for this component.
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/packager/packager_mai...
--- snip --- 673 BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) 674 { 675 TRACE("(%p, %u, %p)\n", instance, reason, reserved); 676 677 switch(reason){ 678 case DLL_PROCESS_ATTACH: 679 g_instance = instance; 680 DisableThreadLibraryCalls(instance); 681 break; 682 } 683 684 return TRUE; 685 } --- snip ---
$ sha1sum RLink2Toolbox-latest.exe de7a9b3d62047d3cb4161b7e9a842269434b1762 RLink2Toolbox-latest.exe
$ du -sh RLink2Toolbox-latest.exe 48M RLink2Toolbox-latest.exe
$ wine --version wine-2.13-94-g5d9a4c4dbd
Regards