RimWorld

RimWorld

Hair Modding Plus
 This topic has been pinned, so it's probably important
Bug Reports
Good evening.

This is a thread I have created to centralize any bug reports for this mod. I am sure that OP appreciates any assistance in bettering his Mod that you can render.


Warm regards,
-TURTLESHROOM
< >
Showing 1-10 of 10 comments
TurtleShroom 8 Aug, 2021 @ 2:41pm 

Exception drawing Corpse_Human335035: System.TypeInitializationException: The type initializer for 'ButterfishHairModdingPlus.HarmonyPatches_BHair' threw an exception. ---> System.NullReferenceException: Null method for butterfish.hairmoddingplus at HarmonyLib.PatchProcessor.Patch () [0x0001d] in <c38a8c3281a047488dac8c9d063b7abb>:0 at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <c38a8c3281a047488dac8c9d063b7abb>:0 at ButterfishHairModdingPlus.HarmonyPatches_BHair..cctor () [0x0014e] in <9bb034475a4f41be8003f12935577b16>:0 --- End of inner exception stack trace --- at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr) at ButterfishHairModdingPlus.Patch_Core.UseModifiedGraphicParams (Verse.PawnGraphicSet __instance) [0x00019] in <9bb034475a4f41be8003f12935577b16>:0 at (wrapper dynamic-method) Verse.PawnGraphicSet.Verse.PawnGraphicSet.ResolveAllGraphics_Patch5(Verse.PawnGraphicSet) at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnAt_Patch4(Verse.PawnRenderer,UnityEngine.Vector3,System.Nullable`1<Verse.Rot4>,bool) at Verse.Corpse.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x0000b] in <1b9c4c73530448bcbb33283e1d4d7d05>:0 at Verse.Thing.Draw () [0x00015] in <1b9c4c73530448bcbb33283e1d4d7d05>:0 at (wrapper dynamic-method) Verse.ThingWithComps.Verse.ThingWithComps.Draw_Patch2(Verse.ThingWithComps) at Verse.DynamicDrawManager.DrawDynamicThings () [0x000d8] in <1b9c4c73530448bcbb33283e1d4d7d05>:0 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Error rendering pawn portrait: The type initializer for 'ButterfishHairModdingPlus.HarmonyPatches_BHair' threw an exception. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Error rendering pawn portrait: The type initializer for 'ButterfishHairModdingPlus.HarmonyPatches_BHair' threw an exception. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Error rendering pawn portrait: The type initializer for 'ButterfishHairModdingPlus.HarmonyPatches_BHair' threw an exception. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Error rendering pawn portrait: The type initializer for 'ButterfishHairModdingPlus.HarmonyPatches_BHair' threw an exception. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Error rendering pawn portrait: The type initializer for 'ButterfishHairModdingPlus.Harmony
4288  [developer] 17 Aug, 2021 @ 1:17pm 
Thanks for the foresight!
As for the error, the 1.3 update is still a work in progress, so I recommend checking back when it's done. Thank you for your patience.
4288  [developer] 26 Aug, 2021 @ 4:50am 
1.3 update is out now, please let me know if there's any bugs crawling around.
TurtleShroom 8 Oct, 2021 @ 12:30pm 
Error rendering pawn portrait: System.NullReferenceException: Object reference not set to an instance of an object at ButterfishHairModdingPlus.Patch_ShowHair.SHCompat_OverrideTryGetCustomHairMat (System.Object __instance, System.Boolean& __result, Verse.Pawn pawn, Verse.Rot4 facing, UnityEngine.Material& mat) [0x00076] in <86978c601a544367b81582307cfea2c2>:0 at (wrapper dynamic-method) ShowHair.HairUtilityFactory+HairUtility.ShowHair.HairUtilityFactory+HairUtility.TryGetCustomHairMat_Patch1(ShowHair.HairUtilityFactory/HairUtility,Verse.Pawn,Verse.Rot4,UnityEngine.Material&) at ShowHair.Patch_PawnRenderer_DrawHeadHair.DrawMeshNowOrLaterPatch (UnityEngine.Mesh mesh, UnityEngine.Vector3 loc, UnityEngine.Quaternion quat, UnityEngine.Material mat, System.Boolean drawNow) [0x00013] in <13461d2759ff4dc586e4c088e72bc14c>:0 at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.DrawHeadHair_Patch2(Verse.PawnRenderer,UnityEngine.Vector3,UnityEngine.Vector3,single,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags) at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnInternal_Patch1(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags) at Verse.PawnRenderer.RenderCache (Verse.Rot4 rotation, System.Single angle, UnityEngine.Vector3 positionOffset, System.Boolean renderHead, System.Boolean renderBody, System.Boolean portrait, System.Boolean renderHeadgear, System.Boolean renderClothes, System.Collections.Generic.Dictionary`2[TKey,TValue] overrideApparelColor, System.Nullable`1[T] overrideHairColor, System.Boolean stylingStation) [0x00138] in <b64badbf3c3d41018b3ca5d3e8c77771>:0 UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string) Verse.PawnRenderer:RenderCache (Verse.Rot4,single,UnityEngine.Vector3,bool,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.PawnCacheRenderer:OnPostRender () (wrapper dynamic-method) RimWorld.PawnCacheRenderer:RimWorld.PawnCacheRenderer.RenderPawn_Patch2 (RimWorld.PawnCacheRenderer,Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,single,Verse.Rot4,bool,bool,bool,bool,bool,UnityEngine.Vector3,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.PortraitsCache:RenderPortrait (Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,Verse.Rot4,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.PortraitsCache:Get (Verse.Pawn,UnityEngine.Vector2,Verse.Rot4,UnityEngine.Vector3,single,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.Page_ConfigureStartingPawns:DrawPawnList (UnityEngine.Rect) (wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns:RimWorld.Page_ConfigureStartingPawns.DoWindowContents_Patch1 (RimWorld.Page_ConfigureStartingPawns,UnityEngine.Rect) Verse.Window:InnerWindowOnGUI (int) UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

This error happened when I loaded a Flower Man from the Folian Race Mod.
Last edited by TurtleShroom; 8 Oct, 2021 @ 12:31pm
TurtleShroom 8 Oct, 2021 @ 12:30pm 
Error rendering pawn portrait: System.NullReferenceException: Object reference not set to an instance of an object at ButterfishHairModdingPlus.Patch_ShowHair.SHCompat_OverrideTryGetCustomHairMat (System.Object __instance, System.Boolean& __result, Verse.Pawn pawn, Verse.Rot4 facing, UnityEngine.Material& mat) [0x00076] in <86978c601a544367b81582307cfea2c2>:0 at (wrapper dynamic-method) ShowHair.HairUtilityFactory+HairUtility.ShowHair.HairUtilityFactory+HairUtility.TryGetCustomHairMat_Patch1(ShowHair.HairUtilityFactory/HairUtility,Verse.Pawn,Verse.Rot4,UnityEngine.Material&) at ShowHair.Patch_PawnRenderer_DrawHeadHair.DrawMeshNowOrLaterPatch (UnityEngine.Mesh mesh, UnityEngine.Vector3 loc, UnityEngine.Quaternion quat, UnityEngine.Material mat, System.Boolean drawNow) [0x00013] in <13461d2759ff4dc586e4c088e72bc14c>:0 at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.DrawHeadHair_Patch2(Verse.PawnRenderer,UnityEngine.Vector3,UnityEngine.Vector3,single,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags) at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnInternal_Patch1(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags) at Verse.PawnRenderer.RenderCache (Verse.Rot4 rotation, System.Single angle, UnityEngine.Vector3 positionOffset, System.Boolean renderHead, System.Boolean renderBody, System.Boolean portrait, System.Boolean renderHeadgear, System.Boolean renderClothes, System.Collections.Generic.Dictionary`2[TKey,TValue] overrideApparelColor, System.Nullable`1[T] overrideHairColor, System.Boolean stylingStation) [0x00138] in <b64badbf3c3d41018b3ca5d3e8c77771>:0 UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string) Verse.PawnRenderer:RenderCache (Verse.Rot4,single,UnityEngine.Vector3,bool,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.PawnCacheRenderer:OnPostRender () (wrapper dynamic-method) RimWorld.PawnCacheRenderer:RimWorld.PawnCacheRenderer.RenderPawn_Patch2 (RimWorld.PawnCacheRenderer,Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,single,Verse.Rot4,bool,bool,bool,bool,bool,UnityEngine.Vector3,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.PortraitsCache:RenderPortrait (Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,Verse.Rot4,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.PortraitsCache:Get (Verse.Pawn,UnityEngine.Vector2,Verse.Rot4,UnityEngine.Vector3,single,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.Page_ConfigureStartingPawns:DrawPawnList (UnityEngine.Rect) (wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns:RimWorld.Page_ConfigureStartingPawns.DoWindowContents_Patch1 (RimWorld.Page_ConfigureStartingPawns,UnityEngine.Rect) Verse.Window:InnerWindowOnGUI (int) UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

This error happened when I loaded an "Among Us" Spaceman from the Amogus Mod.
TurtleShroom 8 Oct, 2021 @ 12:31pm 
Error rendering pawn portrait: System.NullReferenceException: Object reference not set to an instance of an object at ButterfishHairModdingPlus.Patch_ShowHair.SHCompat_OverrideTryGetCustomHairMat (System.Object __instance, System.Boolean& __result, Verse.Pawn pawn, Verse.Rot4 facing, UnityEngine.Material& mat) [0x00076] in <86978c601a544367b81582307cfea2c2>:0 at (wrapper dynamic-method) ShowHair.HairUtilityFactory+HairUtility.ShowHair.HairUtilityFactory+HairUtility.TryGetCustomHairMat_Patch1(ShowHair.HairUtilityFactory/HairUtility,Verse.Pawn,Verse.Rot4,UnityEngine.Material&) at ShowHair.Patch_PawnRenderer_DrawHeadHair.DrawMeshNowOrLaterPatch (UnityEngine.Mesh mesh, UnityEngine.Vector3 loc, UnityEngine.Quaternion quat, UnityEngine.Material mat, System.Boolean drawNow) [0x00013] in <13461d2759ff4dc586e4c088e72bc14c>:0 at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.DrawHeadHair_Patch2(Verse.PawnRenderer,UnityEngine.Vector3,UnityEngine.Vector3,single,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags) at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnInternal_Patch1(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags) at Verse.PawnRenderer.RenderCache (Verse.Rot4 rotation, System.Single angle, UnityEngine.Vector3 positionOffset, System.Boolean renderHead, System.Boolean renderBody, System.Boolean portrait, System.Boolean renderHeadgear, System.Boolean renderClothes, System.Collections.Generic.Dictionary`2[TKey,TValue] overrideApparelColor, System.Nullable`1[T] overrideHairColor, System.Boolean stylingStation) [0x00138] in <b64badbf3c3d41018b3ca5d3e8c77771>:0 UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string) Verse.PawnRenderer:RenderCache (Verse.Rot4,single,UnityEngine.Vector3,bool,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.PawnCacheRenderer:OnPostRender () (wrapper dynamic-method) RimWorld.PawnCacheRenderer:RimWorld.PawnCacheRenderer.RenderPawn_Patch2 (RimWorld.PawnCacheRenderer,Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,single,Verse.Rot4,bool,bool,bool,bool,bool,UnityEngine.Vector3,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.PortraitsCache:RenderPortrait (Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,Verse.Rot4,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.PortraitsCache:Get (Verse.Pawn,UnityEngine.Vector2,Verse.Rot4,UnityEngine.Vector3,single,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool) RimWorld.Page_ConfigureStartingPawns:DrawPawnList (UnityEngine.Rect) (wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns:RimWorld.Page_ConfigureStartingPawns.DoWindowContents_Patch1 (RimWorld.Page_ConfigureStartingPawns,UnityEngine.Rect) Verse.Window:InnerWindowOnGUI (int) UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
This error happened with a normal man.
4288  [developer] 10 Oct, 2021 @ 10:49am 
Can you share the full modlist you had when you encountered these errors? Testing this mod with only the 2 race mods you mentioned, Show Hair, and Alien Races works fine for me (well the Amogus mod threw up a bunch of unrelated errors so it's a bit sus).
Last edited by 4288; 10 Oct, 2021 @ 10:50am
TurtleShroom 10 Oct, 2021 @ 3:10pm 
Originally posted by 4288:
Can you share the full modlist you had when you encountered these errors? Testing this mod with only the 2 race mods you mentioned, Show Hair, and Alien Races works fine for me (well the Amogus mod threw up a bunch of unrelated errors so it's a bit sus).

I have well over four hundred Mods. Do you really want to torture yourself?
4288  [developer] 10 Oct, 2021 @ 5:05pm 
Haha alright, then could you try and trim your modlist temporarily to try and isolate the set of mods that causes this issue? Because there's definitely an unknown mod at play here that's causing this.
Tia 12 Sep, 2022 @ 4:57am 
Gidday, similar looking error a year later.

Exception drawing Corpse_Human85817: System.NullReferenceException: Object reference not set to an instance of an object
at ButterfishHairModdingPlus.Patch_ShowHair.SHCompat_OverrideTryGetCustomHairMat (System.Object __instance, System.Boolean& __result, Verse.Pawn pawn, Verse.Rot4 facing, UnityEngine.Material& mat) [0x00076] in <94f4a31524294bc9aa7b9e6e56ee1329>:0
at (wrapper dynamic-method) ShowHair.HairUtilityFactory+HairUtility.ShowHair.HairUtilityFactory+HairUtility.TryGetCustomHairMat_Patch1(ShowHair.HairUtilityFactory/HairUtility,Verse.Pawn,Verse.Rot4,UnityEngine.Material&)
at ShowHair.Patch_PawnRenderer_DrawHeadHair.DrawMeshNowOrLaterPatch (UnityEngine.Mesh mesh, UnityEngine.Vector3 loc, UnityEngine.Quaternion quat, UnityEngine.Material mat, System.Boolean drawNow) [0x00013] in <13461d2759ff4dc586e4c088e72bc14c>:0
at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.DrawHeadHair_Patch2(Verse.PawnRenderer,UnityEngine.Vector3,UnityEngine.Vector3,single,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags)
at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnInternal_Patch1(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags)
at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnAt_Patch0(Verse.PawnRenderer,UnityEngine.Vector3,System.Nullable`1<Verse.Rot4>,bool)
at Verse.Corpse.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x0000b] in <81af9f8a18324e17b286924a43555a7c>:0
at Verse.Thing.Draw () [0x00015] in <81af9f8a18324e17b286924a43555a7c>:0
at Verse.ThingWithComps.Draw () [0x0000e] in <81af9f8a18324e17b286924a43555a7c>:0
at (wrapper dynamic-method) Verse.DynamicDrawManager.Verse.DynamicDrawManager.DrawDynamicThings_Patch1(Verse.DynamicDrawManager)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch3 (string)
(wrapper dynamic-method) Verse.DynamicDrawManager:Verse.DynamicDrawManager.DrawDynamicThings_Patch1 (Verse.DynamicDrawManager)
(wrapper dynamic-method) Verse.Map:Verse.Map.MapUpdate_Patch2 (Verse.Map)
(wrapper dynamic-method) Verse.Game:Verse.Game.UpdatePlay_Patch3 (Verse.Game)


Had a dozen or so corpses spamming that style of error (everything except the corpse id was the same), hairs from Core, Vanilla Hair Expanded, all sorts throwing it. Mostly Vanilla but a at least one from Roo's HD Hairs. (I checked them while trawling the save log for names to rekill ingame)

I would try a binary compare on my modlist (~350) but I wouldn't be able to load the save to test. :D

Hopefully the log is useful. Only other hair mechanic mod I can think of is Gradient Hair which you've said is patched so =/

And hair lists are Core, Royalty, Eccentric Extras, Vanilla Expanded, Roo's HD, Roo's Royalty HD.

Aaand about a minute I went and debug killed all the corpses, a new corpse started doing it. =/

Few weeks later I am getting this error with live bodies, so that's fun.
Last edited by Tia; 25 Sep, 2022 @ 4:42am
< >
Showing 1-10 of 10 comments
Per page: 1530 50