[Bug 30469] Multiple .NET 2.0 applications abort with error 'System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' (SegFlex demo)

WineHQ Bugzilla wine-bugs at winehq.org
Tue Jan 26 19:00:00 CST 2021


https://bugs.winehq.org/show_bug.cgi?id=30469

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Fixed by SHA1|                            |7c06862c52683dc230dd0f372ea
                   |                            |f8fb6a5d3284a
             Status|CLOSED                      |RESOLVED
          Component|-unknown                    |fusion
         Resolution|INVALID                     |FIXED
           Keywords|                            |dotnet
            Summary|crash in segflex            |Multiple .NET 2.0
                   |                            |applications abort with
                   |                            |error
                   |                            |'System.IO.FileNotFoundExce
                   |                            |ption: Could not load file
                   |                            |or assembly
                   |                            |'System.Windows.Forms,
                   |                            |Version=2.0.0.0,
                   |                            |Culture=neutral,
                   |                            |PublicKeyToken=b77a5c561934
                   |                            |e089' (SegFlex demo)
                URL|                            |https://web.archive.org/web
                   |http://www.segflex.com.br/d |/20140627043415/http://segf
                   |emonstrativo.htm            |lex.com.br/download/SegFlex
                   |                            |Demo.exe

--- Comment #4 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

while putting stable links in various bugs for documentation I sometimes
test/investigate bugs again on a whim.

Although 8 years late I have to apologize to 'daduck10'. There was indeed a bug
in Wine at that time.

The .NET 2.0 application binds to 'System.Windows.Forms' assembly v2.0.0.0 with
public key token 'b77a5c561934e089'.

--- snip ---
...
0009:Call shlwapi.PathFindFileNameW(0032d0ac
L"C:\\windows\\assembly\\GAC_32\\System.Windows.Forms\\2.0.0.0__b77a5c561934e089\\System.Windows.Forms.dll")
ret=79f8a1e6
0009:Ret  shlwapi.PathFindFileNameW() retval=0032d140 ret=79f8a1e6
0009:Call KERNEL32.GetFileAttributesW(0032d0ac
L"C:\\windows\\assembly\\GAC_32\\System.Windows.Forms\\2.0.0.0__b77a5c561934e089")
ret=79eb7b18
0009:Ret  KERNEL32.GetFileAttributesW() retval=ffffffff ret=79eb7b18 
...
0009:Call shlwapi.PathFindFileNameW(0032d0ac
L"C:\\windows\\assembly\\GAC_MSIL\\System.Windows.Forms\\2.0.0.0__b77a5c561934e089\\System.Windows.Forms.dll")
ret=79f8a1e6
0009:Ret  shlwapi.PathFindFileNameW() retval=0032d144 ret=79f8a1e6
0009:Call KERNEL32.GetFileAttributesW(0032d0ac
L"C:\\windows\\assembly\\GAC_MSIL\\System.Windows.Forms\\2.0.0.0__b77a5c561934e089")
ret=79eb7b18
0009:Ret  KERNEL32.GetFileAttributesW() retval=ffffffff ret=79eb7b18 
...
0009:Call shlwapi.PathFindFileNameW(0032d0ac
L"C:\\windows\\assembly\\GAC\\System.Windows.Forms\\2.0.0.0__b77a5c561934e089\\System.Windows.Forms.dll")
ret=79f8a1e6
0009:Ret  shlwapi.PathFindFileNameW() retval=0032d13a ret=79f8a1e6
0009:Call KERNEL32.GetFileAttributesW(0032d0ac
L"C:\\windows\\assembly\\GAC\\System.Windows.Forms\\2.0.0.0__b77a5c561934e089")
ret=79eb7b18
0009:Ret  KERNEL32.GetFileAttributesW() retval=ffffffff ret=79eb7b18 
--- snip ---

External assembly references of main assembly:

--- snip ---
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Assembly SegFlex, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 3FA9D63A-1567-4559-9BF1-F2FB4E3FF3F0
// Assembly references:
// mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a
// System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
// DevExpress.XtraScheduler.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// DevExpress.XtraScheduler.v8.3.Core, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// DevExpress.XtraNavBar.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// DevExpress.XtraGrid.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// DevExpress.XtraEditors.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// DevExpress.Utils.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// System.Data, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
// System.Xml, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
// DevExpress.XtraPrinting.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// Vintasoft.Twain, Version=5.0.7.3, Culture=neutral,
PublicKeyToken=153caf29a10d2e31
// DevExpress.XtraReports.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// DevExpress.XtraCharts.v8.3.UI, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// System.Drawing, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a
// DevExpress.XtraBars.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// DevExpress.XtraVerticalGrid.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// System.Web.Services, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a
// DevExpress.Data.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// DevExpress.XtraCharts.v8.3, Version=8.3.4.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a
// Interop.DAO, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null

[assembly: AssemblyTitle("SuperSeg")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: Guid("37e34e2d-f340-4f8c-ab0d-17b0c38cb732")]
[assembly: AssemblyCompany("Notebook Dell")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default |
DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyDescription("")]
[assembly: ComVisible(false)]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCopyright("Copyright © Notebook Dell 2007")]
[assembly: AssemblyProduct("SuperSeg")]
[assembly: AssemblyVersion("1.0.0.0")]
--- snip ---

.NET Framework 2.0 installation in 32-bit WINEPREFIX using recent 'winetricks
-q dotnet20'

Wine 1.5.4 (pubkey 0907d8af90186095 = ill-formed)

--- snip ---
$ find .wine/drive_c/ -iname "System.Windows.Forms.dll"
.wine/drive_c/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__0907d8af90186095/System.Windows.Forms.dll
.wine/drive_c/windows/Microsoft.NET/Framework/v2.0.50727/System.Windows.Forms.dll
--- snip ---

Wine 1.5.5 (pubkey b77a5c561934e089 = ok)

--- snip ---
$ find .wine/drive_c/ -iname "System.Windows.Forms.dll"
.wine/drive_c/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
.wine/drive_c/windows/Microsoft.NET/Framework/v2.0.50727/System.Windows.Forms.dll
--- snip ---

It was fixed by commit
https://source.winehq.org/git/wine.git/commitdiff/7c06862c52683dc230dd0f372eaf8fb6a5d3284a
("fusion: Handle DWORD-sized blob indices when loading the public key.").

Part of Wine 1.5.5 release.

Thanks Hans.

---

I got curious about my own claim "it works" from comment #1. After researching
the history of 'winetricks' I came to the conclusion that I used a custom
'winetricks' at that time. Many of the early dotnetXX verbs/workarounds
originated from my bug analysis/comments.

I most likely had native 'fusion' override already in my 'winetricks' which
worked around this bug.

Interestingly, the change to use native 'fusion' override in 'winetricks'
'dotnet20' verb was introduced two months later. It was meant to fix a
different bug/regression, introduced between Wine 1.5.5 and 1.5.6: Bug 30845
("Windows 7 SDK installer fails before putting up GUI"). The bug summary line
is wrong, it was again .NET Framework 2.0 installation which was broken. No one
cared to correct the summary.

https://bugs.winehq.org/show_bug.cgi?id=30845#c10

https://github.com/Winetricks/winetricks/commit/14c2799134bc2ec4c4df8d24d63f5aaa4d3a3d1d
("dotnet20: incorporate new recipe from 30845 ")

--- snip ---
    if w_workaround_wine_bug 30845 "Using native fusion while installing..."
,1.5.5
    then
        w_try env WINEDLLOVERRIDES=mscoree,fusion=n $WINE dotnetfx.exe
${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
    else
        w_try $WINE dotnetfx.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
    fi
--- snip ---

$ wine --version
wine-1.5.4-292-g7c06862c526

$ sha1sum SegFlexDemo.exe 
540a9b6b9e4a9cde113e1d5fd24b29c9b94a4a7b  SegFlexDemo.exe

$ du -sh SegFlexDemo.exe 
18M    SegFlexDemo.exe

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list