https://bugs.winehq.org/show_bug.cgi?id=39792
Bug ID: 39792 Summary: Saturn PCB Design Toolkit sometimes needs SHCore.dll Product: Wine Version: 1.8-rc3 Hardware: x86 URL: http://www.saturnpcb.com/pcb_toolkit.htm OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: jhansonxi@gmail.com Distribution: Ubuntu
Created attachment 53090 --> https://bugs.winehq.org/attachment.cgi?id=53090 Stand-alone exe without installer
Execution on Wine fails due to a dependency on SHCore.dll:
err:module:import_dll Loading library SHCORE.DLL (which is needed by L"C:\PCB Toolkit V6.86.exe") failed (error c000012f). err:module:LdrInitializeThunk Main exe initialization for L"C:\PCB Toolkit V6.86.exe" failed, status c0000135
While trying to get it working I installed it on WinXP to identify registry entries and file additions via the old ZDNet installation monitor utility InCtrl5. PCB Toolkit worked without problems there. When I attempted to find SHCore.dll to use with Wine I discovered WinXP doesn't have it (Dependency Walker confirmed it's missing). The Wine OS version is set to WinXP according to winecfg yet it still requires it on Wine. WTF?
I obtained the dll from a Win8 system and the PCB Toolkit started working on Wine. The native dll is a real pain because it has many dependencies which vary depending on its specific version. This page lists one set of dependencies but I had to use many different files according to the Wine errors when it failed to load: http://www.nirsoft.net/dll_information/windows8/shcore_dll.html
Uses Advanced Installer so bug #34989 applies but dev sent me standalone exe (attached). Verified the sha1sum of both the standalone and the one installed by Advanced Installer on WinXP (9412a5ae1b83ec98ef9fbc05d5588ed8cb01c7c1). It doesn't require its reg entries but it will complain about invalid defaults at initial start-up.
Xubuntu 14.04 x86_64, AMD Phenom 9550, GeForce GTX 750Ti with Nvidia 340.96 driver. PCB Toolkit v6.86 on wine-staging
https://bugs.winehq.org/show_bug.cgi?id=39792
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |NEW CC| |focht@gmx.net Component|-unknown |ntdll Summary|Saturn PCB Design Toolkit |Saturn PCB Design Toolkit |sometimes needs SHCore.dll |6.86 fails to load, | |reporting missing | |'SHCore.dll' dependency | |(import descriptors with | |empty thunk list must be | |ignored) Ever confirmed|0 |1
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
It seems the Delphi compiler the app was built with has a strange habit to emit import descriptors with empty thunk list for API that ought to be delay loaded at runtime.
Wine's loader needs to ignore these import descriptors, not trying to load the dll.
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+module,+imports wine ./PCB\ Toolkit\ V6.86.exe
log.txt 2>&1
... 0033:trace:module:load_dll looking for L"Z:\home\focht\Downloads\PCB Toolkit V6.86.exe" in L".;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0033:trace:module:get_load_order looking for L"Z:\home\focht\Downloads\PCB Toolkit V6.86.exe" 0033:trace:module:get_load_order got main exe default n,b for L"Z:\home\focht\Downloads\PCB Toolkit V6.86.exe" 0033:trace:module:load_native_dll Trying native dll L"Z:\home\focht\Downloads\PCB Toolkit V6.86.exe" 0033:trace:module:map_image mapped PE file at 0x400000-0xa2d000 0033:trace:module:map_image mapping section .text at 0x401000 off 600 size 37ba00 virt 37c000 flags 60000020 0033:trace:module:map_image clearing 0x77ca00 - 0x77d000 0033:trace:module:map_image mapping section .data at 0x77d000 off 37c000 size 2ec00 virt 4e000 flags c0000040 0033:trace:module:map_image clearing 0x7abc00 - 0x7ac000 0033:trace:module:map_image mapping section .tls at 0x7cb000 off 3aac00 size 200 virt 1000 flags c0000040 0033:trace:module:map_image clearing 0x7cb200 - 0x7cc000 0033:trace:module:map_image mapping section .rdata at 0x7cc000 off 3aae00 size 200 virt 1000 flags 50000040 0033:trace:module:map_image clearing 0x7cc200 - 0x7cd000 0033:trace:module:map_image mapping section .idata at 0x7cd000 off 3ab000 size 3a00 virt 4000 flags 40000040 0033:trace:module:map_image clearing 0x7d0a00 - 0x7d1000 0033:trace:module:map_image mapping section .didata at 0x7d1000 off 3aea00 size a00 virt 1000 flags c0000040 0033:trace:module:map_image clearing 0x7d1a00 - 0x7d2000 0033:trace:module:map_image mapping section .edata at 0x7d2000 off 3af400 size 400 virt 1000 flags 40000040 0033:trace:module:map_image clearing 0x7d2400 - 0x7d3000 0033:trace:module:map_image mapping section .rsrc at 0x7d3000 off 3af800 size 210600 virt 211000 flags 40000040 0033:trace:module:map_image clearing 0x9e3600 - 0x9e4000 0033:trace:module:map_image mapping section .reloc at 0x9e4000 off 5bfe00 size 48e00 virt 49000 flags 50000040 0033:trace:module:map_image clearing 0xa2ce00 - 0xa2d000 0033:warn:module:alloc_module disabling no-exec because of L"PCB Toolkit V6.86.exe" 0033:trace:module:load_dll Loaded module L"Z:\home\focht\Downloads\PCB Toolkit V6.86.exe" (native) at 0x400000 0033:trace:module:alloc_tls_slot module 0x400000 data 0x7cb000-0x7cb0f0 zerofill 0 index 0x77d11c callback 0x7cc010 flags 0 -> slot 0 0033:trace:module:alloc_tls_slot thread 0033 tls block (nil) -> 0x115c40 0033:trace:module:alloc_tls_slot thread 0033 slot 0: 240/0 bytes at 0x1171c0 0033:trace:module:load_dll looking for L"ADVAPI32.DLL" in L"Z:\home\focht\Downloads;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0033:trace:module:get_load_order looking for L"C:\windows\system32\ADVAPI32.DLL" 0033:trace:module:get_load_order got hardcoded default for L"ADVAPI32.DLL" 0033:trace:module:load_dll L"C:\windows\system32\ADVAPI32.DLL" is a fake Wine dll 0033:trace:module:load_builtin_dll Trying built-in L"ADVAPI32.DLL" 0033:trace:module:load_dll looking for L"kernel32.dll" in L"Z:\home\focht\Downloads;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0033:trace:module:load_dll Found L"C:\windows\system32\KERNEL32.dll" for L"kernel32.dll" at 0x7b820000, count=2 ... 0033:trace:module:load_dll looking for L"SHCORE.DLL" in L"Z:\home\focht\Downloads;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0033:trace:module:get_load_order looking for L"SHCORE.DLL" 0033:trace:module:get_load_order got hardcoded default for L"SHCORE.DLL" 0033:trace:module:load_builtin_dll Trying built-in L"SHCORE.DLL" 0033:warn:module:load_builtin_dll cannot open .so lib for builtin L"SHCORE.DLL": /home/focht/projects/wine/wine.repo/install/bin/../lib/wine/shcore.dll.so: cannot open shared object file: No such file or directory 0033:warn:module:load_dll Failed to load module L"SHCORE.DLL"; status=c0000135 0033:err:module:import_dll Library SHCORE.DLL (which is needed by L"Z:\home\focht\Downloads\PCB Toolkit V6.86.exe") not found 0033:err:module:LdrInitializeThunk Main exe initialization for L"Z:\home\focht\Downloads\PCB Toolkit V6.86.exe" failed, status c0000135 ... --- snip ---
Dump of PE section header table:
--- snip --- 1. item: Name: .text VirtualSize: 0x0037C000 VirtualAddress: 0x00001000 SizeOfRawData: 0x0037BA00 PointerToRawData: 0x00000600 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0x60000020 (CODE, EXECUTE, READ)
2. item: Name: .data VirtualSize: 0x0004E000 VirtualAddress: 0x0037D000 SizeOfRawData: 0x0002EC00 PointerToRawData: 0x0037C000 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0xC0000040 (INITIALIZED_DATA, READ, WRITE)
3. item: Name: .tls VirtualSize: 0x00001000 VirtualAddress: 0x003CB000 SizeOfRawData: 0x00000200 PointerToRawData: 0x003AAC00 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0xC0000040 (INITIALIZED_DATA, READ, WRITE)
4. item: Name: .rdata VirtualSize: 0x00001000 VirtualAddress: 0x003CC000 SizeOfRawData: 0x00000200 PointerToRawData: 0x003AAE00 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0x50000040 (INITIALIZED_DATA, SHARED, READ)
5. item: Name: .idata VirtualSize: 0x00004000 VirtualAddress: 0x003CD000 SizeOfRawData: 0x00003A00 PointerToRawData: 0x003AB000 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0x40000040 (INITIALIZED_DATA, READ)
6. item: Name: .didata VirtualSize: 0x00001000 VirtualAddress: 0x003D1000 SizeOfRawData: 0x00000A00 PointerToRawData: 0x003AEA00 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0xC0000040 (INITIALIZED_DATA, READ, WRITE)
... --- snip ---
'.idata' = regular imports '.didata' = delayed imports
Partial dump of PE import descriptor table:
--- snip --- ->Import Table 1. ImageImportDescriptor: OriginalFirstThunk: 0x003CD1B8 TimeDateStamp: 0x00000000 (GMT: Thu Jan 01 00:00:00 1970) ForwarderChain: 0x00000000 Name: 0x003CE3A8 ("ADVAPI32.DLL") FirstThunk: 0x003CD200
Ordinal/Hint API name ------------ --------------------------------------- 0x0000 "RegCloseKey" ... 0x0000 "RegUnLoadKeyW"
21. ImageImportDescriptor: OriginalFirstThunk: 0x003CE3A0 TimeDateStamp: 0x00000000 (GMT: Thu Jan 01 00:00:00 1970) ForwarderChain: 0x00000000 Name: 0x003CE49C ("SHCORE.DLL") FirstThunk: 0x003CE3A4
Ordinal/Hint API name ------------ --------------------------------------- <empty>
--- snip ---
Actually there are more descriptors with empty imports list. It's just that Wine provides builtins for these otherwise it would fail earlier.
* DWMAPI.DLL * MSIMG32.DLL * IMM32.DLL * WTSAPI32.DLL * WINDOWSCODECS.DLL * UXTHEME.DLL * SHELL32.DLL * SHCORE.DLL <-- no builtin
Dump of PE delay import directory ('.didata'):
--- snip --- ... 11. DelayImportDescriptor: grAttrs: 0x00000001 (dlattrRva) DLLName (R)VA: 0x003D1521 ("SHCORE.DLL") Hmod (R)VA: 0x003D1480 IAT (R)VA: 0x003D1484 INT (R)VA: 0x003D148C BoundIAT (R)VA: 0x003D1494 UnloadIAT (R)VA: 0x003D149C TimeDateStamp: 0x00000000 (GMT: Thu Jan 01 00:00:00 1970)
Ordinal/Hint API name ------------ --------------------------------------- 0x0000 "GetDpiForMonitor"
--- snip ---
ProtectionID scan:
--- snip --- -=[ ProtectionID v0.6.6.7 DECEMBER]=- (c) 2003-2015 CDKiLLER & TippeX Build 24/12/14-22:48:13 Ready... Scanning -> Z:\home\focht\Downloads\PCB Toolkit V6.86.exe [x] Error - Unable to open file.. skipped -> LastError : 0x20 (032) [i] Error Translation : Sharing violation.
- Scan Took : 0.5 Second(s) [000000005h (5) tick(s)] [0 of 573 scan(s) done]
Scanning -> Z:\home\focht\Downloads\PCB Toolkit V6.86.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 6327296 (0608C00h) Byte(s) Compilation TimeStamp : 0x562C447D -> Sun 25th Oct 2015 02:54:53 (GMT) [TimeStamp] 0x562C447D -> Sun 25th Oct 2015 02:54:53 (GMT) | PE Header | - | Offset: 0x00000208 | VA: 0x00400208 | - [File Heuristics] -> Flag #1 : 00000000000001001000000100100000 (0x00048120) [Entrypoint Section Entropy] : 6.54 (section #0) ".text " | Size : 0x37BA00 (3652096) byte(s) [DllCharacteristics] -> Flag : (0x0000) -> NONE [SectionCount] 9 (0x9) | ImageSize 0x62D000 (6475776) byte(s) [Export] 73% of function(s) (17 of 23) are in file | 0 are forwarded | 15 code | 8 data | 0 uninit data | 0 unknown | [VersionInfo] Company Name : Saturn PCB Design. Inc. [VersionInfo] Product Name : Saturn PCB Toolkit [VersionInfo] Product Version : 6.86 [VersionInfo] File Version : 6.8.6.0 [VersionInfo] Version Comments : www.saturnpcb.com [CdKeySerial] found "Unregistered" @ VA: 0x0012C5E1 / Offset: 0x0012BBE1 [CdKeySerial] found "Invalid code" @ VA: 0x003A0872 / Offset: 0x0039F872 [CdKeySerial] found "Invalid code" @ VA: 0x003A08BF / Offset: 0x0039F8BF [CdKeySerial] found "Invalid code" @ VA: 0x003A1294 / Offset: 0x003A0294 [CdKeySerial] found "Invalid code" @ VA: 0x003A12E1 / Offset: 0x003A02E1 [CompilerDetect] -> Borland Delphi (unknown version) - 20% probability [!] File appears to have no protection or is using an unknown protection - Scan Took : 1.837 Second(s) [00000048Bh (1163) tick(s)] [499 of 573 scan(s) done] --- snip ---
$ sha1sum PCB\ Toolkit\ V6.86.zip d8b9d485bb89a9b22bbfd217d1a2a5502f20977e PCB Toolkit V6.86.zip
$ du -sh PCB\ Toolkit\ V6.86.zip 2.9M PCB Toolkit V6.86.zip
$ wine --version wine-1.8-rc4
Regards
https://bugs.winehq.org/show_bug.cgi?id=39792
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #2 from Austin English austinenglish@gmail.com --- Hi Focht,
Is this the reason for various (Windows) QT apps having lines like:
err:module:import_dll Library QtXmlPcQt324.dll (which is needed by L"C:\Program Files\PictureCode\PhotoNinja32_1.2.5\plugins\imageformats\qsvg4.dll") not found (bug 38596)
in their log?
https://bugs.winehq.org/show_bug.cgi?id=39792
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello Austin,
--- quote --- Is this the reason for various (Windows) QT apps having lines like:
err:module:import_dll Library QtXmlPcQt324.dll (which is needed by L"C:\Program Files\PictureCode\PhotoNinja32_1.2.5\plugins\imageformats\qsvg4.dll") not found (bug 38596)
in their log? --- quote ---
No, it has nothing to do with this problem.
Although the error message from Wine loader might look scary, the QT plugin 'LoadLibrary' failure is completely harmless.
The same would happen on Windows - it's just that the NT loader is silent about these 'LoadLibrary' failures unless loader snaps are enabled (internal loader trace/diagnostics functionality).
Import table of 'qsvg4.dll':
--- snip ---
1. ImageImportDescriptor: OriginalFirstThunk: 0x00004DA0 TimeDateStamp: 0x00000000 (GMT: Thu Jan 01 00:00:00 1970) ForwarderChain: 0x00000000 Name: 0x00004EF4 ("QtSvgPcQt324.dll") FirstThunk: 0x000041D8
Ordinal/Hint API name ------------ --------------------------------------- 0x0060 "?render@QSvgRenderer@PcQt@@QAEXPAVQPainter@2@ABVQRectF@2@@Z" 0x0005 "??0QSvgRenderer@PcQt@@QAE@PAVQObject@1@@Z" 0x0097 "?viewBox@QSvgRenderer@PcQt@@QBE?AVQRect@2@XZ" 0x0041 "?load@QSvgRenderer@PcQt@@QAE_NPAVQXmlStreamReader@2@@Z" 0x000D "??1QSvgRenderer@PcQt@@UAE@XZ" 0x003F "?load@QSvgRenderer@PcQt@@QAE_NABVQByteArray@2@@Z"
2. ImageImportDescriptor: OriginalFirstThunk: 0x00004DBC TimeDateStamp: 0x00000000 (GMT: Thu Jan 01 00:00:00 1970) ForwarderChain: 0x00000000 Name: 0x00004F88 ("QtXmlPcQt324.dll") FirstThunk: 0x000041F4
Ordinal/Hint API name ------------ --------------------------------------- 0x0066 "??0QXmlStreamReader@PcQt@@QAE@XZ" 0x024E "?setDevice@QXmlStreamReader@PcQt@@QAEXPAVQIODevice@2@@Z" 0x0095 "??1QXmlStreamReader@PcQt@@QAE@XZ"
3. ImageImportDescriptor: OriginalFirstThunk: 0x00004D0C TimeDateStamp: 0x00000000 (GMT: Thu Jan 01 00:00:00 1970) ForwarderChain: 0x00000000 Name: 0x000055D0 ("QtGuiPcQt324.dll") FirstThunk: 0x00004144
Ordinal/Hint API name ------------ --------------------------------------- 0x05F7 "??4QColor@PcQt@@QAEAAV01@ABV01@@Z" 0x076F "??BQColor@PcQt@@QBE?AVQVariant@1@XZ" 0x03BC "??0QTransform@PcQt@@QAE@XZ" ... --- snip ---
Regards
https://bugs.winehq.org/show_bug.cgi?id=39792
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/ntdll-Unused_I | |mport_Descr
https://bugs.winehq.org/show_bug.cgi?id=39792
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- Please try the staged patchset, it should fix the issue.
https://bugs.winehq.org/show_bug.cgi?id=39792
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #5 from super_man@post.com --- (In reply to Sebastian Lackner from comment #4)
Please try the staged patchset, it should fix the issue.
The patch indeed works.
There is an error about " is not a valid integer value. ??? Unrelated?
https://bugs.winehq.org/show_bug.cgi?id=39792
--- Comment #6 from Sebastian Lackner sebastian@fds-team.de --- (In reply to super_man from comment #5)
There is an error about " is not a valid integer value. ??? Unrelated?
Sounds unrelated to me. Either a different bug, or harmless terminal output by the application itself.
https://bugs.winehq.org/show_bug.cgi?id=39792
--- Comment #7 from super_man@post.com --- It's actually a popup message. But after accepting it the program starts with no issues with the patch.
https://bugs.winehq.org/show_bug.cgi?id=39792
Joerg Schiermeier mywine@schiermeier-it.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mywine@schiermeier-it.de
--- Comment #8 from Joerg Schiermeier mywine@schiermeier-it.de --- Hi!
Just found this error also in "The Bat!". See AppDB: https://appdb.winehq.org/objectManager.php?sClass=version&iId=32523
"The Bat!" is a mailer written in Delphi.
During start of this app it said: "Missing file shcore.dll" and crash.
https://bugs.winehq.org/show_bug.cgi?id=39792
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |b89f88841e38e0adc0cd6f35e6e | |62b00ba19ec41 Status|STAGED |RESOLVED Resolution|--- |FIXED
--- Comment #9 from Sebastian Lackner sebastian@fds-team.de --- Fixed with http://source.winehq.org/git/wine.git/commit/b89f88841e38e0adc0cd6f35e6e62b0....
https://bugs.winehq.org/show_bug.cgi?id=39792
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.4.
https://bugs.winehq.org/show_bug.cgi?id=39792
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.8.x CC| |mstefani@redhat.com
https://bugs.winehq.org/show_bug.cgi?id=39792
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #11 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.5.