RimWorld

RimWorld

Hermaphrodite Gene
Mod is in conflict with "Humanoid Alien Races"
If this mod and Humanoid Alien Races are in the same list you get one of two errors:

If this is first you get:
Error in static constructor of AlienRace.HarmonyPatches: System.TypeInitializationException: The type initializer for 'AlienRace.HarmonyPatches' threw an exception. ---> System.Exception: Wrong null argument: brtrue NULL
at HarmonyLib.MethodBodyReader+<>c__DisplayClass24_0.<FinalizeILCodes>b__2 (HarmonyLib.CodeInstruction codeInstruction) [0x0015f] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00203] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x002be] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.PatchProcessor.Patch () [0x000fc] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <255414689d344b1385ae719f6cce8c55>:0
at AlienRace.HarmonyPatches..cctor () [0x01d42] in <e718be9058284ff4888f04ae180d63dc>: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 Verse.StaticConstructorOnStartupUtility.CallAll () [0x00025] in <38562b1a2ab64eacb931fb5df05ca994>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.StaticConstructorOnStartupUtility:CallAll ()
Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_5 ()
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 ()
"

and if it's after you get:

"Error in static constructor of HermaphroditeGene.Main: System.TypeInitializationException: The type initializer for 'HermaphroditeGene.Main' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method static Verse.AcceptanceReport RimWorld.PregnancyUtility::CanEverProduceChild(Verse.Pawn first, Verse.Pawn second) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Label #3 is not marked in method `RimWorld.PregnancyUtility.CanEverProduceChild_Patch1'
at System.Reflection.Emit.ILGenerator.label_fixup (System.Reflection.MethodBase mb) [0x00053] in <eae584ce26bc40229c1b1aa476bfa589>:0
at System.Reflection.Emit.DynamicMethod.CreateDynMethod () [0x0004a] in <eae584ce26bc40229c1b1aa476bfa589>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <eae584ce26bc40229c1b1aa476bfa589>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <eae584ce26bc40229c1b1aa476bfa589>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
at MonoMod.RuntimeDetour.Platforms.DetourRuntimeMonoPlatform.GetMethodHandle (System.Reflection.MethodBase method) [0x00011] in <255414689d344b1385ae719f6cce8c55>:0
at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.GetIdentifiable (System.Reflection.MethodBase method) [0x00000] in <255414689d344b1385ae719f6cce8c55>:0
at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.Pin (System.Reflection.MethodBase method) [0x00014] in <255414689d344b1385ae719f6cce8c55>:0
at MonoMod.RuntimeDetour.DetourHelper.Pin[T] (T method) [0x00005] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x00659] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x000bb] in <255414689d344b1385ae719f6cce8c55>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x00093] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.Harmony.PatchAll () [0x0001b] in <255414689d344b1385ae719f6cce8c55>:0
at HermaphroditeGene.Main..cctor () [0x0000a] in <2702318819ab4f87a073f9ed7af7af84>: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 Verse.StaticConstructorOnStartupUtility.CallAll () [0x00025] in <38562b1a2ab64eacb931fb5df05ca994>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.StaticConstructorOnStartupUtility:CallAll ()
Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_5 ()
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 ()

"
< >
Showing 1-2 of 2 comments
Bardez 8 Apr, 2023 @ 10:03pm 
Seconding this. It's an error that continues ad infinitum. I had to Alt+F4 the game. I'm not surprised, though, and hopefully HAR can go someday soon.
Phant0m5 26 May, 2023 @ 1:44am 
Yeah. Seems like both this mod and HAR patch the same function, "CanEverProduceChild", which checks the gender of the lovin participants. There's probably some way to make the mod hook into HAR and use their own patch so this mods' becomes unneeded when loaded together, but it's been a long time since I've coded anything more complex than a dice roller so it's all wizardry to me.
< >
Showing 1-2 of 2 comments
Per page: 1530 50