Help with mod errors

Started by amirtondari, August 20, 2021, 06:53:34 PM

Previous topic - Next topic

amirtondari

hi, can anyone help with this errors

1.
Error while instantiating a mod of type Replace_Stuff.Mod: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Patching exception in method null ---> System.ArgumentException: Undefined target method for patch method static System.Boolean Replace_Stuff.Replace.InterceptBlueprint::Prefix(RimWorld.Blueprint_Build& __result, Verse.BuildableDef sourceDef, Verse.IntVec3 center, Verse.Map map, Verse.Rot4 rotation, RimWorld.Faction faction, Verse.ThingDef stuff)
  at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase& lastOriginal) [0x00047] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00057] in <c38a8c3281a047488dac8c9d063b7abb>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00127] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00082] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.Harmony.PatchAll () [0x0001b] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at Replace_Stuff.Mod..ctor (Verse.ModContentPack content) [0x00018] in <1330b84157e2494997040cf6ccbeb112>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <eae584ce26bc40229c1b1aa476bfa589>:0
   --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007a] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at Verse.LoadedModManager.CreateModClasses () [0x00076] in <9bdc0a9d1f6744a18eed5eecd85205c5>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.LoadedModManager:CreateModClasses ()
Verse.LoadedModManager:LoadAllActiveMods ()
Verse.PlayDataLoader:DoPlayLoad ()
Verse.PlayDataLoader:LoadAllPlayData (bool)
Verse.Root/<>c:<Start>b__6_1 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>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 ()

2.
Error in static constructor of VFECore.HarmonyPatches: System.TypeInitializationException: The type initializer for 'VFECore.HarmonyPatches' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method System.Void Verse.StaticTextureAtlas::Bake(System.Boolean rebake) ---> System.FormatException: Method System.Void Verse.StaticTextureAtlas::Bake(System.Boolean rebake) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) Verse.StaticTextureAtlas:Verse.StaticTextureAtlas.Bake_Patch0 (Verse.StaticTextureAtlas,bool): IL_00a9: stloc.s   4


  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x0008c] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x000bb] in <c38a8c3281a047488dac8c9d063b7abb>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00082] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at HarmonyLib.Harmony.PatchAll () [0x0001b] in <c38a8c3281a047488dac8c9d063b7abb>:0
  at VFECore.HarmonyPatches..cctor () [0x00001] in <1e0ed349b06943b7b24f9cbc5b50cb93>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
  at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle type) [0x0002a] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at (wrapper dynamic-method) Verse.StaticConstructorOnStartupUtility.Verse.StaticConstructorOnStartupUtility.CallAll_Patch1()
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
(wrapper dynamic-method) Verse.StaticConstructorOnStartupUtility:Verse.StaticConstructorOnStartupUtility.CallAll_Patch1 ()
Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_3 ()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent ()
Verse.LongEventHandler:LongEventsUpdate (bool&)
(wrapper dynamic-method) Verse.Root:Verse.Root.Update_Patch1 (Verse.Root)
Verse.Root_Entry:Update ()

3.
Failed to get last layer on apparel item (see your config errors)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.Log:ErrorOnce (string,int)
RimWorld.ApparelProperties:get_LastLayer ()
CharacterEditor.PRMod:UpdateApparel ()
CharacterEditor.PRMod:LoadAndResolveModData ()
CharacterEditor.PRMod:DefsLoaded ()
HugsLib.HugsLibController:OnDefsLoaded ()
(wrapper dynamic-method) HugsLib.HugsLibController:HugsLib.HugsLibController.LoadReloadInitialize_Patch1 (HugsLib.HugsLibController)
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>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 ()

4.
Exception from asynchronous event: System.NullReferenceException: Object reference not set to an instance of an object
  at Replace_Stuff.ThingDefGenerator_ReplaceFrame.NewReplaceFrameDef_Thing (Verse.ThingDef def) [0x00138] in <1330b84157e2494997040cf6ccbeb112>:0
  at Replace_Stuff.ThingDefGenerator_ReplaceFrame+<ImpliedReplaceFrameDefs>d__4.MoveNext () [0x00074] in <1330b84157e2494997040cf6ccbeb112>:0
  at Replace_Stuff.ThingDefGenerator_ReplaceFrame.AddReplaceFrames (System.Boolean addShortHash) [0x00059] in <1330b84157e2494997040cf6ccbeb112>:0
  at Replace_Stuff.Mod+ModStartup+<>c.<.cctor>b__0_0 () [0x00000] in <1330b84157e2494997040cf6ccbeb112>:0
  at Verse.LongEventHandler.RunEventFromAnotherThread (System.Action action) [0x00008] in <9bdc0a9d1f6744a18eed5eecd85205c5>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>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 ()


the first and the forth error cause architect menu go empty except cancel order for each tab and will solve after deactivating replace stuff mod i've used this mod for so long no issues until now that appeared out of nowhere

Canute