http://bugs.winehq.org/show_bug.cgi?id=24196
Summary: oleaut32: typelib registration should not fail bitness-neutral assemblies (32-bit typelib wrapped in 64-bit PE, x64 .NET 2.0 installer) Product: Wine Version: 1.3.1 Platform: x86-64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: oleaut32 AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
another x64 .NET Framework 2.0 installer bug. The typelib registration fails for some assemblies:
--- snip --- ... 002c:Call KERNEL32.CreateProcessA(00000000,7fffec16f650 ""C:\windows\Microsoft.NET\Framework64\v2.0.50727\regtlibv12.exe" "C:\windows\Microsoft.NET\Framework64\v2.0.50727\System.Drawing.tlb"",00000000,00000000,7fff00000001,00000000,00000000,00000000,7fffec8edfe8,7fffec8eb9e0) ret=4fc035780 ... 002e:Call oleaut32.LoadTypeLib(7ffff143f880 L"C:\windows\Microsoft.NET\Framework64\v2.0.50727\System.Drawing.tlb",7ffff143f870) ret=004027bf ... 002e:Call KERNEL32.LoadLibraryExW(7ffff143f360 L"C:\windows\Microsoft.NET\Framework64\v2.0.50727\System.Drawing.tlb",00000000,0000000b) ret=7ffff105ffb0 002e:Ret KERNEL32.LoadLibraryExW() retval=7fffefad0001 ret=7ffff105ffb0 ... 002e:Ret oleaut32.LoadTypeLib() retval=00000000 ret=004027bf 002e:Call oleaut32.RegisterTypeLib(7ffff74d30d0,7ffff143f880 L"C:\windows\Microsoft.NET\Framework64\v2.0.50727\System.Drawing.tlb",00000000) ret=00402808 ... 002e:Ret oleaut32.RegisterTypeLib() retval=800288bd ret=00402808 ... 002c:Call msi.MsiRecordSetStringW(00000005,00000000,7fffec8ec620 L"RegisterTypeLib of C:\windows\Microsoft.NET\Framework64\v2.0.50727\System.Drawing.tlb failed : 800288bd") ret=4fc0358bd --- snip ---
The PE file containing typelib resources "System.Drawing.tlb" is a PE64 binary.
Dumping the typelib resource reveals:
--- snip --- Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F Ascii
000002B0 4D 53 46 54 02 00 01 00 00 00 00 00 09 04 00 00 MSFT......... 000002C0 00 00 00 00 41 00 00 00 02 00 00 00 00 00 00 00 ....A.......... 000002D0 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... --- snip ---
flags: 0x41 -> indicates the typelib itself is 32 bit (SYSKIND = SYS_WIN32)
The folder "c:\windows\Microsoft.NET\Framework64\v2.0.50727" contains assemblies with following characteristics:
64-bit PE + 64 bit typelib part (flags = 0x43 -> SYSKIND = SYS_WIN64) 64-bit PE + 32 bit typelib part (flags = 0x41 -> SYSKIND = SYS_WIN32)
I verified that Wine msi correctly installs them into their appropriate 32 bit and 64 bit folders.
The 32-bit counterparts from "c:\windows\Microsoft.NET\Framework\v2.0.50727" are all:
32-bit PE + 32 bit typelib part (flags = 0x41 -> SYSKIND = SYS_WIN32)
===
What causes the embedded typelib to be 32-bit? Well, the .NET assemblies these typelibs belong to are flagged as "MSIL" assemblies. These are bitness-neutral assemblies that are portable and can run under any platform.
When you look at 64-bit -> "c:\windows\Microsoft.NET\Framework64\v2.0.50727\RedistList\FrameworkList.xml":
--- snip --- <File AssemblyName="System.Drawing" Version="2.0.0.0" PublicKeyToken="b03f5f7f11d50a3a" Culture="neutral" ProcessorArchitecture="MSIL" FileVersion="2.0.50727.42" InGAC="true" /> --- snip ---
Example for bitness-aware assembly (managed C++ assemblies are automatically platform specific):
64-bit -> "c:\windows\Microsoft.NET\Framework64\v2.0.50727\RedistList\FrameworkList.xml":
--- snip --- <File AssemblyName="System.Data" Version="2.0.0.0" PublicKeyToken="b77a5c561934e089" Culture="neutral" ProcessorArchitecture="AMD64" FileVersion="2.0.50727.42" InGAC="true" /> --- snip ---
32-bit -> "c:\windows\Microsoft.NET\Framework\v2.0.50727\RedistList\FrameworkList.xml":
(the 64 bit .NET Framework 2.0 redist contains both: the 64 bit _and_ 32 bit runtime)
--- snip --- <File AssemblyName="System.Data" Version="2.0.0.0" PublicKeyToken="b77a5c561934e089" Culture="neutral" ProcessorArchitecture="x86" FileVersion="2.0.50727.42" InGAC="true" /> --- snip ---
I guess Wine should not fail on these bitness-neutral assemblies that contain 32-bit typelibs.
--- snip dlls/oleaut32/typelib.c ---
HRESULT WINAPI RegisterTypeLib( ITypeLib * ptlib, /* [in] Pointer to the library*/ OLECHAR * szFullPath, /* [in] full Path of the library*/ OLECHAR * szHelpDir) /* [in] dir to the helpfile for the library, may be NULL*/ { ... if (ptlib == NULL || szFullPath == NULL) return E_INVALIDARG;
if (FAILED(ITypeLib_GetLibAttr(ptlib, &attr))) return E_FAIL;
TRACE("(%s,%d)", debugstr_w(szFullPath), attr->syskind);
#ifdef _WIN64 if (attr->syskind != SYS_WIN64) return TYPE_E_BADMODULEKIND; #else if (attr->syskind != SYS_WIN32 && attr->syskind != SYS_WIN16) return TYPE_E_BADMODULEKIND; #endif ... } --- snip dlls/oleaut32/typelib.c ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=24196
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download, | |Installer, win64 URL| |http://www.microsoft.com/do | |wnloads/details.aspx?family | |id=b44a0000-acf8-4fa1-affb- | |40e78d788b00&displaylang=en Depends on| |24189
--- Comment #1 from Anastasius Focht focht@gmx.net 2010-08-29 06:55:47 CDT --- Hello,
filling some fields.
Regards
http://bugs.winehq.org/show_bug.cgi?id=24196
Bug 24196 depends on bug 24189, which changed state.
Bug 24189 Summary: msi: set "System64Folder" standard property in x64 environment (64bit installer of .NET Framework 2.0) http://bugs.winehq.org/show_bug.cgi?id=24189
What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
http://bugs.winehq.org/show_bug.cgi?id=24196
--- Comment #2 from Anastasius Focht focht@gmx.net 2012-02-10 17:07:30 CST --- Hello,
revisiting, still present.
http://source.winehq.org/git/wine.git/blob/0425a110d92ba61fcb3638443bc7782c9...
$ wine --version wine-1.4-rc2-96-gb0bc037
Regards
http://bugs.winehq.org/show_bug.cgi?id=24196
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #3 from Austin English austinenglish@gmail.com 2013-04-17 16:05:38 CDT --- Still in wine-1.5.28-66-g6899279
http://bugs.winehq.org/show_bug.cgi?id=24196
Sylvain Petreolle spetreolle@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spetreolle@yahoo.fr
http://bugs.winehq.org/show_bug.cgi?id=24196
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com 2013-09-11 11:16:40 CDT --- Commit http://source.winehq.org/git/wine.git/commit/f1398510df7687d36006714b1429583... could help this case, could you please retest?
http://bugs.winehq.org/show_bug.cgi?id=24196
--- Comment #5 from Austin English austinenglish@gmail.com 2013-09-11 18:30:41 CDT --- (In reply to comment #4)
Commit http://source.winehq.org/git/wine.git/commit/f1398510df7687d36006714b1429583... could help this case, could you please retest?
It now fails earlier in wine-1.7.1-209-gc191f62 as compared to wine-1.4.
The failure now is: err:msi:ITERATE_Actions Execution halted, action L"CA_Check64OS.3643236F_FC70_11D3_A536_0090278A1BB8" returned 1603
failing before the installation steps themselves start (according to the GUI, at least).
Note that if you have the mono installer cached, you'll likely need to move it out of the way, since it can't be uninstalled in a 64-bit wineprefix (bug 34490). I'll attach some logs.
http://bugs.winehq.org/show_bug.cgi?id=24196
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #6 from Austin English austinenglish@gmail.com 2013-09-11 18:58:05 CDT --- Looking at the +msi,+relay trace, it's failing because it expects the Windows version to be 2003 or later:
0047:trace:msi:ACTION_CustomAction Handling custom action L"CA_Check64OS.3643236F_FC70_11D3_A536_0090278A1BB8" (13 (null) L"This installation package supports only 64-bit version of Advanced Server 2003 or later.")
Setting winecfg to Windows Server 2003 lets it install.
BUT: The MS page says XP 64-bit should work: o 64-bit support: 64-bit CPU support requires the latest 64-bit version of either Windows XP Professional \Windows Server 2003.
I don't have a 64-bit windows XP vm handy to test, so there may be a bug in that it doesn't install in Wine under XP mode. This bug, however, is fixed.
Lastly, I built wine at the mentioned commit (f1398510df7687d36006714b14295833100f8bf5). At that commit, the installer does complete, but there are several crashes before it completes (in ngen.exe). In wine-1.7.1-209-gc191f62, it installs with no crashes. I didn't look further into what commit fixed what issue.
http://bugs.winehq.org/show_bug.cgi?id=24196
--- Comment #7 from Hans Leidekker hans@meelstraat.net 2013-09-12 02:10:06 CDT --- (In reply to comment #6) ...
Lastly, I built wine at the mentioned commit (f1398510df7687d36006714b14295833100f8bf5). At that commit, the installer does complete, but there are several crashes before it completes (in ngen.exe). In wine-1.7.1-209-gc191f62, it installs with no crashes. I didn't look further into what commit fixed what issue.
That might have been b64fabf39e923ebfaa9a77ed9dea05acf7e38dcb.
http://bugs.winehq.org/show_bug.cgi?id=24196
--- Comment #8 from Austin English austinenglish@gmail.com 2013-09-12 16:40:40 CDT --- (In reply to comment #7)
(In reply to comment #6) ...
Lastly, I built wine at the mentioned commit (f1398510df7687d36006714b14295833100f8bf5). At that commit, the installer does complete, but there are several crashes before it completes (in ngen.exe). In wine-1.7.1-209-gc191f62, it installs with no crashes. I didn't look further into what commit fixed what issue.
That might have been b64fabf39e923ebfaa9a77ed9dea05acf7e38dcb.
No, the install fails at that commit (even in 2k3 mode).
http://bugs.winehq.org/show_bug.cgi?id=24196
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2013-09-13 13:20:45 CDT --- Closing bugs fixed in 1.7.2.
http://bugs.winehq.org/show_bug.cgi?id=24196
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |f1398510df7687d36006714b142 | |95833100f8bf5
https://bugs.winehq.org/show_bug.cgi?id=24196
Sylvain Petreolle spetreolle@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|spetreolle@yahoo.fr |
https://bugs.winehq.org/show_bug.cgi?id=24196
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.microsoft.com/do |https://web.archive.org/web |wnloads/details.aspx?family |/20100925191339/http://down |id=b44a0000-acf8-4fa1-affb- |load.microsoft.com/download |40e78d788b00&displaylang=en |/a/3/f/a3f1bf98-18f3-4036-9 | |b68-8e6de530ce0a/NetFx64.ex | |e