-
Notifications
You must be signed in to change notification settings - Fork 5
EasyNPC on linux (MO2) #229
Description
[Question/Issue] Running EasyNPC on Linux via Proton/Wine fails with NotImplementedException in ModernWpf
Hello,
I'm trying to run EasyNPC on Linux (Linux Mint) through Steam's Proton (and Wine), as part of a Skyrim SE modding setup with Mod Organizer 2. The application starts but crashes immediately with a specific exception related to the ModernWpf library.
I have followed the standard steps for running Windows tools on Linux for Skyrim modding:
Game & Tools: Skyrim SE (Steam), Mod Organizer 2 (via Portable instance), EasyNPC.
Environment: Configured the Proton prefix for Skyrim (App ID 489830) to use Windows 10 via winecfg.
Dependencies: Installed vcrun2022 and the .NET 5.0 Desktop Runtime (version 5.0.17) into the prefix.
MO2 Integration: The tool is added to MO2's executables. USVFS hooks are injected successfully (confirmed in logs).
The Problem / Error:
When executing EasyNPC.exe directly via Wine/Proton, it crashes. The terminal shows a long error, but the core issue appears to be a System.NotImplementedException when ModernWpf tries to call a specific Windows API.
The key error lines are:
text
System.NotImplementedException: The method or operation is not implemented.
at WinRT.EventSource1.Subscribe(TDelegate del) at Windows.UI.ViewManagement.UISettings.add_ColorValuesChanged(TypedEventHandler2 value)
at ModernWpf.ColorsHelper.ListenToSystemColorChanges()
This suggests the ModernWpf library relies on Windows.UI.ViewManagement.UISettings.add_ColorValuesChanged, which is not implemented in the current Wine/Proton build I'm using (Wine 9.0 from Ubuntu repos / Proton Experimental).
Full Context & Logs:
A more complete log from a recent run is here:
text
[leny@Leny-Mint:~/Games/mod-organizer-2-skyrimspecialedition/modorganizer2/Tools/EasyNPC-0.9.6$ grep -A 20 -B 5 "System.NotImplementedException" easynpc_error.log
012c:err:setupapi:create_dest_file failed to create L"C:\windows\system32\xpssvcs.dll" (error=80)
wine: configuration in L"/home/leny/.steam/steam/steamapps/compatdata/489830/pfx" has been updated.
---> System.TypeInitializationException: The type initializer for 'ModernWpf.ThemeManager' threw an exception.
---> System.TypeInitializationException: The type initializer for 'ModernWpf.ColorsHelper' threw an exception.
---> System.NotImplementedException: The method or operation is not implemented.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at WinRT.ExceptionHelpers.GetExceptionForHR(Int32 hr, Boolean useGlobalErrorState, Boolean& restoredExceptionFromGlobalState)
at WinRT.ExceptionHelpers.g__Throw|20_0(Int32 hr)
at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
at WinRT.EventSource1.Subscribe(TDelegate del) at Windows.UI.ViewManagement.UISettings.add_ColorValuesChanged(TypedEventHandler2 value)
at ModernWpf.ColorsHelper.ListenToSystemColorChanges()
at ModernWpf.ColorsHelper..ctor()
at ModernWpf.ColorsHelper..cctor()
--- End of inner exception stack trace ---
at ModernWpf.ThemeManager..cctor()
--- End of inner exception stack trace ---
at ModernWpf.ThemeManager.get_Current()
at ModernWpf.ThemeResources.EndInit()
at ModernWpf.ThemeResources.System.ComponentModel.ISupportInitialize.EndInit()
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)
--- End of inner exception stack trace ---
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
0144:err:eventlog:ReportEventW L".NET Version: 5.0.17\n"
0144:err:eventlog:ReportEventW L"Description: The process was terminated due to an unhandled exception.\n"
0144:err:eventlog:ReportEventW L"Exception Info: System.Windows.Markup.XamlParseException: A inicializa\00e7\00e3o de 'ModernWpf.ThemeResources' iniciou uma exce\00e7\00e3o.\r\n"
0144:err:eventlog:ReportEventW L" ---> System.TypeInitializationException: The type initializer for 'ModernWpf.ThemeManager' threw an exception.\r\n"
0144:err:eventlog:ReportEventW L" ---> System.TypeInitializationException: The type initializer for 'ModernWpf.ColorsHelper' threw an exception.\r\n"
0144:err:eventlog:ReportEventW L" ---> System.NotImplementedException: The method or operation is not implemented.\r\n"
0144:err:eventlog:ReportEventW L" at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)\r\n"
0144:err:eventlog:ReportEventW L" at WinRT.ExceptionHelpers.GetExceptionForHR(Int32 hr, Boolean useGlobalErrorState, Boolean& restoredExceptionFromGlobalState)\r\n"
0144:err:eventlog:ReportEventW L" at WinRT.ExceptionHelpers.g__Throw|20_0(Int32 hr)\r\n"
0144:err:eventlog:ReportEventW L" at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)\r\n"
0144:err:eventlog:ReportEventW L" at WinRT.EventSource1.Subscribe(TDelegate del)\r\n" 0144:err:eventlog:ReportEventW L" at Windows.UI.ViewManagement.UISettings.add_ColorValuesChanged(TypedEventHandler2 value)\r\n"
0144:err:eventlog:ReportEventW L" at ModernWpf.ColorsHelper.ListenToSystemColorChanges()\r\n"
0144:err:eventlog:ReportEventW L" at ModernWpf.ColorsHelper..ctor()\r\n"
0144:err:eventlog:ReportEventW L" at ModernWpf.ColorsHelper..cctor()\r\n"
0144:err:eventlog:ReportEventW L" --- End of inner exception stack trace ---\r\n"
0144:err:eventlog:ReportEventW L" at ModernWpf.ThemeManager..cctor()\r\n"
0144:err:eventlog:ReportEventW L" --- End of inner exception stack trace ---\r\n"
0144:err:eventlog:ReportEventW L" at ModernWpf.ThemeManager.get_Current()\r\n"
0144:err:eventlog:ReportEventW L" at ModernWpf.ThemeResources.EndInit()\r\n"
0144:err:eventlog:ReportEventW L" at ModernWpf.ThemeResources.System.ComponentModel.ISupportInitialize.EndInit()\r\n"
0144:err:eventlog:ReportEventW L" at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)\r\n"
0144:err:eventlog:ReportEventW L" --- End of inner exception stack trace ---\r\n"
0144:err:eventlog:ReportEventW L" at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)\r\n"
0144:err:eventlog:ReportEventW L" at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)\r\n"
0144:err:eventlog:ReportEventW L" at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)\r\n"
grep: easynpc_error.log: arquivo binário coincide com o padrão
leny@Leny-Mint:~/Games/mod-organizer-2-skyrimspecialedition/modorganizer2/Tools/EasyNPC-0.9.6$ ]
My Questions:
Is there any known workaround, configuration, or specific version of Proton/Wine that can make EasyNPC's ModernWpf interface work on Linux?
Are there any plans to consider Linux/Proton compatibility, perhaps by using a different UI framework or providing a fallback mode for unsupported APIs?
This tool is fantastic for managing NPC appearance mods, and having it run on Linux would be a huge help for the growing Linux modding community. Thank you for your time and for creating EasyNPC.
System Info:
OS: Linux Mint 21.x (based on Ubuntu 22.04)
Wine/Proton: Wine 9.0 (system), Proton Experimental (Steam)
Game: The Elder Scrolls V: Skyrim Special Edition (Steam, App ID 489830)
Mod Manager: Mod Organizer 2 (Portable instance)