Reading Debug Trace Examples:Dlls

From Wine-Wiki

Jump to: navigation, search

Contents

Dlls

Many times winetricks can be used to suppliment wine with a missing or incomplete dll. It is often the best method of trying a dll as it knows most of the tricks that wine needs and makes pretty sure the version of the dll is correct for wine.

Incomplete Dlls

Sometimes a dll is incomplete as one user found:

0009:Call usp10.ScriptItemize(7a2204f0 L" p\7a1c",00000002,000000ff,00000000,00000000,7b8ef018,7b8ef858) ret=0060c1f6
fixme:uniscribe:ScriptItemize L" p\7a1c",2,255,(nil),(nil),0x7b8ef018,0x7b8ef858
0009:Ret  usp10.ScriptItemize() retval=80070057 ret=0060c1f6
0009:Call ntdll.RtlReAllocateHeap(7a1c0000,00000000,7a220688,2cd741b0) ret=006c4566


P. Beutner: [ Nov 05] The ScriptItemize() function is only implemented as stub atm, e.g. it does nothing, so i guess that somehow crashes your app. Try to use the native usp10.dll.

D. Clark provided some more info and pointed to where you can check what is implemented in the dll: the Wine version of usp10.dll is new as of 2005-07-27, so that may be why the program did not crash with earlier versions of Wine. [...] Before July, the Wine version of the dll did not exist. What applications sometimes do is test for the existance of a DLL, and if present, use functions in it. It would appear that may be what this app is doing. [...] Almost nothing is actually implemented in it, currently. http://source.winehq.org/source/dlls/usp10/usp10.c

Further Reading

Missing Dll

$ wine start Dreamweaver.exe L"C:\\Archivosde programa\\Macromedia\\DreamweaverMX\\Configuration\\JSExtensions\\DWEMLaunch.dll") not found

Alex: Dreamweaver still can't find the [...] even with the ["wine start exename.exe"] command, as demonstrated in the previous trace.

V. Margolen: You have to run it from other directory. Actually from _any_ directory but the one that exe is in. Don't ask me - ask m$ why they came up with this sort of .... stuff. Btw it will fail on win exactly the same way. [...]You need _literally_ run : wine start Dreamweaver.exe. And you can not be in the directory with that program. wine archive


err:module:import_dll Library Notifications.bpl (which is needed by L"C:\\Program Files\\UBC.new\\Adwiser2Main.bpl") not found

R. Klazes: If wine says "needed by xxxx" it means the xxxx file /is/ found, so there is only the case of odacvcl70.bpl, double check that file.


err:thunk:_loadthunk (NWMID95B.DLT, thunkobj_ThunkData16, NWMID95B.DLL): 
Unable to load 'NWMID95B.DLT', error 2

E.Pouch: wine dies because of this... it cannot find (or load) nwmid95b.dlt Wine Archive Linke



Does this mean the program cant find a dll?

> err:module:import_dll Library VCL30.dpl (which is needed by L"C:\\Program Files\\Mincom\\MIMS Open 
> Enterprise\\4.3\\bin\\msqexp.exe") not found

U. Bonnes: "dpl" or "dll" ?

Investigate deeper. Run e.g. with WINEDEBUG=+relay and look what happens when the application tries to find VCL30. WINEDEBUG=+relay,+file,+ntdll might give even more clues.Wine Archive

VB Run times

err:module:import_dll Library MSVBVM60.DLL (which is needed by L"Z:\\media\\sda1\\files\\Games\\ManiaA3_Client\\A3.exe") not found

A. English:[mar 09] 'winetricks vbrun60'

Relay Trace

Here is an example from running the relay log [Jan 09 bug 16499:

0009:Call KERNEL32.LoadLibraryA(0a0540a0 "ATMLIB.dll") ret=09fdee47
0009:Ret  KERNEL32.LoadLibraryA() retval=00000000 ret=09fdee47 
0009:Call KERNEL32.RaiseException(c06d007e,00000000,00000001,0033d784) ret=09fdee86

D. Kegel: So perhaps we need to start implementing that DLL. Does copying atmlib.dll (and maybe atmfd.dll) from your installation of windows into .wine/drive_c/windows/system32 help?



When installing I got the following errors:

fixme:richedit:RichEditANSIWndProc EM_AUTOURLDETECT: stub
fixme:richedit:RichEditANSIWndProc WM_SETFONT: stub
fixme:richedit:RichEditANSIWndProc EM_LIMITTEXT: stub
fixme:richedit:RichEditANSIWndProc EM_EXLIMITTEXT: stub
fixme:richedit:ME_ReleaseStyle all style references freed (good!)
err:menubuilder:InvokeShellLinker failed to fork and exec wineshelllink
err:menubuilder:InvokeShellLinker failed to fork and exec wineshelllink
fixme:msvcrt:_setmbcp Unreal codepages (e.g. -3) not implemented
fixme:msvcrt:_setmbcp Unreal codepages (e.g. -3) not implemented
      ^^^^^^

A. Browaeys: I would say that using msvcrt from windows and telling wine to use it as native may help. Wine Archive Link

Further Reading

Dll Version Information

trace:ver:ConvertVersionInfo32To16 wLength 114, wValueLength 39, bText
64500, value 0x7baffbdc, child 0x7baffc2c
trace:ver:ConvertVersionInfo32To16 Copied key from 0x7baffbd6 to 0x7baffb08: "?\x01"
trace:ver:ConvertVersionInfo32To16 Copied value from 0x7baffbdc to 0x7baffb0c: "????????\x05"
trace:ver:ConvertVersionInfo32To16 Converting 0x7baffc2c to 0x7baffb18
trace:ver:ConvertVersionInfo32To16 wLength 114, wValueLength 118, bText 105, value 0x7baffc48, child 0x7baffd34
trace:ver:ConvertVersionInfo32To16 Copied key from 0x7baffc32 to 0x7baffb1c: "ce Pack 2"
trace:ver:ConvertVersionInfo32To16 Copied value from 0x7baffc48 to 0x7baffb28: "??\x01" 


It looks like Translation Manager is doing a GetFileVersionInfoA with a fixed size of 512. It should have used GetFileVersionInfoSizeA probably first to get the size of the needed buffer. [According to ]MSDN: 'The VerQueryValue function retrieves specified version information from the specified version-information resource. To retrieve the appropriate resource, before you call VerQueryValue, you must first call the GetFileVersionInfoSize function, and then the GetFileVersionInfo function.'

The smaller than needed buffer leads us to the not-correct strings that show up in your trace. This means I have to change:

768 i f ( !VersionInfoIs16( info ) )
769 {
770 /* FIXME : The conversion is maybe a bit overkill, we only need 1 value */
771
772 ConvertVersionInfo32To16( (VS_VERSION_INFO_STRUCT32 *)info,
773 (VS_VERSION_INFO_STRUCT16 *)info );
774 }

in info.c [a patch was promised soon] Wine Archive

Manifests

0010:trace:file:RtlGetFullPathName_U (L"C:\\windows\\system32\\cmd.exe.manifest" 520 0xff9aaaf4 (nil)) attr=00000000 sharing=00000001 disp=1   
options=00000010 ea=(nil).0x00000000
0009:trace:seh:start_debugger Starting debugger "winedbg --auto 8 100"
0010:trace:heap:RtlAllocateHeap (0x110000,00000002,00000038): returning 0x114e58
0010:trace:actctx:get_manifest_in_module looking for res #0001 in module 0x7ec10000 L"C:\\windows\\system32\\cmd.exe"
0010:trace:heap:RtlFreeHeap (0x110000,00000002,0x114e58): returning TRUE
0010:trace:resource:LdrFindResource_U module 0x7ec10000 type #0018 name #0001 lang 0000 level 3
0010:trace:resource:find_entry_by_id root 0x7ec322e4 dir 0x7ec322e4 id 0018 not found
0010:trace:actctx:get_manifest_in_associated_manifest looking for manifest associated with (null) id 1
0010:trace:heap:RtlAllocateHeap (0x110000,00000002,00000060): returning 0x114e58 
0009:trace:heap:RtlFreeHeap (0x110000,00000002,0x1361e0): returning TRUE
0010:trace:file:RtlDosPathNameToNtPathName_U (L"C:\\windows\\system32\\cmd.exe.manifest",0xffdc6170,(nil),(nil))
0009:trace:process:CreateProcessW started process pid 000f tid 0010 
0010:trace:file:RtlGetFullPathName_U (L"C:\\windows\\system32\\cmd.exe.manifest" 520 0xffdc5f14 (nil))

R. Dunn: cmd.exe *may* have a manifest, it's just that it won't specify common controls v6 (which enables the theming code in >= XP). For example, patch.exe and install.exe in cygwin have .manifest files to tell Vista "I am *not* an installer!".

When Wine (or Windows >= XP) loads a process (exe or dll), it looks for a .manifest file in the folder where the exe is located. If it does not find one there, it looks for a RT_MANIFEST resource in the processes resource block. Failing that, it assumes that the process was not built with a manifest. NOTE: I'm not sure on the ordering of the check for a manifest file (i.e. which takes precedence -- external file or embedded resource). In the trace log above, you can see that Wine is checking for an embedded manifest resource first, then the external .manifest file. So the problem lies elsewhere... do you have any more information on the debug output?

sfc

A user noted this error msg: fixme:sfc:SfcIsFileProtected ((nil), L"C:\\Program Files\\GeneXproTools 4\\SampleRuns\\XOR.gep") stub

D. Riekenberg: This indicates, that the Installer is correct. When an Installer does not give the fixme, it's outdated / incomplete. ":sfc:" is the dllname, and when you look at the only source-file, you will find: * Implementation of the System File Checker (Windows File Protection) wine archive

Personal tools