https://bugs.winehq.org/show_bug.cgi?id=51317
Bug ID: 51317 Summary: multiple applications fail with NLogConfigurationException in Wine-Mono (PlagiarismDetector, WinAuth, Panzer Paladin) Product: Wine Version: 6.11 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: mscoree Assignee: wine-bugs@winehq.org Reporter: madewokherd@gmail.com Distribution: ---
This is essentially the following NLog bug: https://github.com/NLog/NLog/issues/2598
NLog is getting tripped up by the op_Implicit method on System.String which doesn't exist on .NET Framework, and which it can't call with reflection.
This causes PlagiarismDetector to fail to load with: [ERROR] FATAL UNHANDLED EXCEPTION: System.Windows.Markup.XamlParseException: The invocation of the constructor on type 'PlagiarismDetector.MainWindow' that matches the specified binding constraints threw an exception. ---> System.TypeInitializationException: The type initializer for 'PlagiarismDetector.MainWindow' threw an exception. ---> NLog.NLogConfigurationException: Error when setting property 'Name' on Console Target[(unnamed)] ---> System.NotSupportedException: Cannot invoke method with stack pointers via reflection
It also affects WinAuth (https://web.archive.org/web/20210310120512/https://github.com/winauth/winaut...) once bug 25167 is fixed, and Panzer Paladin in Proton (https://github.com/ValveSoftware/Proton/issues/4225).
We can't just remove or make non-public String.op_Implicit because libraries other than mscorlib use it.
https://bugs.winehq.org/show_bug.cgi?id=51317
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.detectareplagiat | |.ro/dp/DetectarePlagiatInst | |aller.exe Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=51317
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=51317
--- Comment #1 from Esme Povirk madewokherd@gmail.com --- Removing or renaming the method is intractable for various reasons. The decision to import a bunch of corefx code means op_Implicit use is ubiquitous.
So I added a hack https://gitlab.winehq.org/wine-mono/corefx/-/commit/d5dc206d496e537c4f6725c4...
https://bugs.winehq.org/show_bug.cgi?id=51317
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.detectareplagiat |https://web.archive.org/web |.ro/dp/DetectarePlagiatInst |/20170616070944/http://www. |aller.exe |detectareplagiat.ro/dp/Dete | |ctarePlagiatInstaller.exe
https://bugs.winehq.org/show_bug.cgi?id=51317
--- Comment #2 from Esme Povirk madewokherd@gmail.com --- Hm, turns out the work-around is incomplete because some assemblies statically link NLog.
It occurred to me since then that we may be able to make this work by moving op_Implicit to an extension class used internally.
https://bugs.winehq.org/show_bug.cgi?id=51317
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- Oh, never mind, I don't think op_Implicit can be used that way.