BUTR / Bannerlord.BLSE

Continuation of BUTRLoader
https://www.nexusmods.com/mountandblade2bannerlord/mods/1
MIT License
10 stars 1 forks source link

Running through proton leads to crash (Could not resolve type) #113

Open bicobus opened 1 month ago

bicobus commented 1 month ago

Running the launcher (not Ex), will properly start the game. But it crashes before reaching the main menu. LauncherEx crashes right away.

The runtime on with the game runs on linux is Mono, not the .NET Framework. Could that be a cause?

BLSE Exception:
Version: 1.5.7.0

Type: System.TypeInitializationException
Message: The type initializer for 'Bannerlord.BUTR.Shared.Helpers.ModuleInfoHelper' threw an exception.
Source: Bannerlord.Harmony
CallStack:
  at Bannerlord.Harmony.SubModule.ValidateHarmony () [0x0009e] in <6c67f487df7e41999f089c7de219c00f>:0 
  at Bannerlord.Harmony.SubModule.OnSubModuleLoad () [0x00006] in <6c67f487df7e41999f089c7de219c00f>:0 
  at TaleWorlds.MountAndBlade.Module.InitializeSubModules () [0x0004e] in <64fe2eb825c9440da4938d9a99618c7f>:0 
  at TaleWorlds.MountAndBlade.Module.LoadSubModules () [0x001ec] in <64fe2eb825c9440da4938d9a99618c7f>:0 
  at TaleWorlds.MountAndBlade.Module.Initialize () [0x000c9] in <64fe2eb825c9440da4938d9a99618c7f>:0 
  at ManagedCallbacks.CoreCallbacksGenerated.Module_Initialize (System.Int32 thisPointer) [0x00006] in <92c29e71d46c4c11b748b949ec26afe1>:0 
  at (wrapper native-to-managed) ManagedCallbacks.CoreCallbacksGenerated.Module_Initialize(int)

Inner 
Type: System.TypeLoadException
Message: Could not resolve type with token 010000c8 from typeref (expected class 'Mono.Cecil.IReflectionImporter' in assembly 'Mono.Cecil, Version=0.11.5.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e') assembly:Mono.Cecil, Version=0.11.5.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e type:Mono.Cecil.IReflectionImporter member:(null)
Source: MonoMod.Utils
CallStack:
  at MonoMod.Utils.DynamicMethodDefinition..ctor (System.String name, System.Type returnType, System.Type[] parameterTypes) [0x00040] in <3a2a1307c411416a9ec924fe3fc8ad8f>:0 
  at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,string,System.Type,System.Type[])
  at HarmonyLib.BUTR.Extensions.AccessTools2+DynamicMethodDefinitionHandle.Create (System.String name, System.Type returnType, System.Type[] parameterTypes) [0x00007] in <6c67f487df7e41999f089c7de219c00f>:0 
  at HarmonyLib.BUTR.Extensions.AccessTools2.StaticFieldRefAccessInternal[F] (System.Reflection.FieldInfo fieldInfo, System.Boolean logErrorInTrace) [0x00084] in <6c67f487df7e41999f089c7de219c00f>:0 
  at HarmonyLib.BUTR.Extensions.AccessTools2.StaticFieldRefAccess[F] (System.Reflection.FieldInfo fieldInfo, System.Boolean logErrorInTrace) [0x00005] in <6c67f487df7e41999f089c7de219c00f>:0 
  at HarmonyLib.BUTR.Extensions.AccessTools2.StaticFieldRefAccess[TField] (System.Type type, System.String fieldName, System.Boolean logErrorInTrace) [0x0000e] in <6c67f487df7e41999f089c7de219c00f>:0 
  at HarmonyLib.BUTR.Extensions.AccessTools2.StaticFieldRefAccess[TField] (System.String typeColonFieldname, System.Boolean logErrorInTrace) [0x00027] in <6c67f487df7e41999f089c7de219c00f>:0 
  at Bannerlord.BUTR.Shared.Helpers.ModuleInfoHelper..cctor () [0x00025] in <6c67f487df7e41999f089c7de219c00f>:0 
Aragas commented 1 month ago

Don't have access to a Linux right now, but it looks like for some reason some of the MonoMod assemblies are loaded with the wrong version