goatcorp / Dalamud

FFXIV plugin framework and API
GNU Affero General Public License v3.0
1.26k stars 282 forks source link

Native/Mixed plugins fail to load #515

Closed daemitus closed 3 years ago

daemitus commented 3 years ago

We probably need a new manifest entry, or a try again in the plugin loader that sets this kind of plugin as not-unloadable/reloadable.

14:10:17.712 | ERR [LOCALPLUGIN] Not a plugin: F:\ffxiv\NativeHousemate\x64\Debug\NativeHousemate.dll
System.BadImageFormatException: Cannot load a mixed assembly into a collectible AssemblyLoadContext.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromStream(IntPtr ptrNativeAssemblyLoadContext, IntPtr ptrAssemblyArray, Int32 iAssemblyArrayLen, IntPtr ptrSymbols, Int32 iSymbolArrayLen, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.InternalLoad(ReadOnlySpan`1 arrAssembly, ReadOnlySpan`1 arrSymbols)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromStream(Stream assembly, Stream assemblySymbols)
   at McMaster.NETCore.Plugins.Loader.ManagedLoadContext.LoadAssemblyFromFilePath(String path)
   at Dalamud.Plugin.Internal.LocalPlugin..ctor(FileInfo dllFile, LocalPluginManifest manifest) in C:\goatsoft\companysecrets\dalamud\Plugin\Internal\LocalPlugin.cs:line 66
SheepGoMeh commented 3 years ago

The repo for NativeHousemate is available here

goaaats commented 3 years ago

I think it's better that we don't support this for now to save on complexity in the already complex plugin system. If there's a real need, we can always come back to it.