UnlimitedHugs / RimworldHugsLib

A lightweight shared library for Rimworld modding.
Other
244 stars 59 forks source link

[HugsLib][ERR] Exception during ApplyHarmonyPatches #103

Closed mc-oofert closed 2 months ago

mc-oofert commented 7 months ago

image

RimWorld 1.4.3901 rev238 [HugsLib][ERR] Exception during ApplyHarmonyPatches: HarmonyLib.HarmonyException: Patching exception in method static System.Void RimWorld.MainMenuDrawer::DoMainMenuControls(UnityEngine.Rect rect, System.Boolean anyMapFiles) ---> System.InvalidProgramException: Invalid IL code in (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.MainMenuDrawer.DoMainMenuControls_Patch0 (UnityEngine.Rect,bool): IL_0153: callvirt 0x0000005b

at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x0008c] in :0 at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs1+Job[T] job) [0x000bb] in <dc0bd40696764748b9e78e1488e5d2c5>:0 --- End of inner exception stack trace --- at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0013c] in <dc0bd40696764748b9e78e1488e5d2c5>:0 at HarmonyLib.PatchClassProcessor.Patch () [0x00093] in <dc0bd40696764748b9e78e1488e5d2c5>:0 at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <dc0bd40696764748b9e78e1488e5d2c5>:0 at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable1[T] sequence, System.Action`1[T] action) [0x00014] in :0 at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in :0 at HugsLib.HugsLibController.ApplyHarmonyPatches () [0x00056] in <4a46802aeab646ab99159f7eecb6b57e>:0 UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) HugsLib.Utils.ModLogger:ReportException (System.Exception,string,bool,string) HugsLib.HugsLibController:ApplyHarmonyPatches () HugsLib.HugsLibController:InitializeController () HugsLib.HugsLibController:EarlyInitialize () HugsLib.Core.HugsLibMod:.ctor (Verse.ModContentPack) System.Reflection.MonoCMethod:InternalInvoke (object,object[]) System.Reflection.MonoCMethod:DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) System.Reflection.MonoCMethod:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) System.RuntimeType:CreateInstanceImpl (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Threading.StackCrawlMark&) System.Activator:CreateInstance (System.Type,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[]) System.Activator:CreateInstance (System.Type,object[]) Verse.LoadedModManager:CreateModClasses () Verse.LoadedModManager:LoadAllActiveMods () Verse.PlayDataLoader:DoPlayLoad () Verse.PlayDataLoader:LoadAllPlayData (bool) Verse.Root/<>c:b__6_1 () Verse.LongEventHandler:RunEventFromAnotherThread (System.Action) Verse.LongEventHandler/<>c:b__27_0 () System.Threading.ThreadHelper:ThreadStart_Context (object) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) System.Threading.ThreadHelper:ThreadStart () eading.ExecutionContext,System.Threading.ContextCallback,object) System.Threading.ThreadHelper:ThreadStart ()

UnlimitedHugs commented 2 months ago

Should be fixed as part of the 1.5 update.