RimWorld

RimWorld

Character Editor
TDarksword Aug 29, 2020 @ 11:47am
Error on Startup - The type initializer for 'ChrEdtFix.Main' threw an exception.
Getting the following error twice in my logs on RimWorld start. I've not actually noticed it impacting anything as yet. RimWorld version 1.2.2723 rev661

Error in static constructor of ChrEdtFix.Main: System.TypeInitializationException: The type initializer for 'ChrEdtFix.Main' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method static System.Void CharacterEditor.RenderingTool::RenderPawnInternal(Verse.Pawn pawn, UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.Rot4 bodyFacing, Verse.Rot4 headFacing, System.Boolean isNude, Verse.RotDrawMode bodyDrawType, System.Boolean portrait, System.Boolean headStump) ---> System.FormatException: Method static System.Void CharacterEditor.RenderingTool::RenderPawnInternal(Verse.Pawn pawn, UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.Rot4 bodyFacing, Verse.Rot4 headFacing, System.Boolean isNude, Verse.RotDrawMode bodyDrawType, System.Boolean portrait, System.Boolean headStump) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) CharacterEditor.RenderingTool:CharacterEditor.RenderingTool.RenderPawnInternal_Patch0 (Verse.Pawn,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.Rot4,bool,Verse.RotDrawMode,bool,bool): IL_061e: stelem.ref


at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00092] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x0015d] in <20181e2d55204880a56a9120ef04a53d>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x00082] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <20181e2d55204880a56a9120ef04a53d>:0
at ChrEdtFix.Main..cctor () [0x0000f] in <64eca9fe21fb4ca9b79757349cb95d2a>: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 <567df3e0919241ba98db88bec4c6696f>:0
at Verse.StaticConstructorOnStartupUtility.CallAll () [0x0001a] in <7b345446a85d4ed599f9c604ae61854b>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
Last edited by TDarksword; Aug 29, 2020 @ 11:48am
< >
Showing 1-1 of 1 comments
TDarksword Aug 30, 2020 @ 9:45am 
Found out what this seemed to be, it had left the ChrEdtFix.dll in the folder and not deleted it when that got updated/removed. Unsubbing for Char Edit left the folder with just that dll in it, deleting the folder and then resubbing has not downloaded it again, and not it starts with no error. Grrr @steam workshop not cleaning files correctly :)
< >
Showing 1-1 of 1 comments
Per page: 1530 50