RimWorld

RimWorld

Altered Carbon 2: ReSleeved
Nox 17 Dec, 2024 @ 7:09am
BUG: Error placing pawns into sleeve gestator when pawns have certain hediffs
If a pawn has stacked hediffs (Hediffs that track severity with stacking modifiers) and bloodloss hediffs it appears that an error in the mod code is aborting setting up the pawn object for the gestator tank furnishing.

This may be happening in a body parts check.

The log that comes out when this happens is :

JobDriver threw exception in toil unnamed's initAction for pawn Protheobas driver=JobDriver_HaulCorpseToGestation (toilIndex=5) driver.job=(AC_HaulCorpseToGestation (Job_15658861) A = Thing_AC_SleeveGestator5797423 B = Thing_Corpse_Human5565962 Giver = JobGiver_Work [workGiverDef: AC_HaulCorpseToSleeveGrower])
System.NullReferenceException: Object reference not set to an instance of an object
[Ref 5C3EE39C]
at AlteredCarbon.AC_Utils.GetMissingParts (Verse.Pawn pawn) [0x00001] in <7b4c3c7e0bc34eceb09feb01b10d772f>:0
at AlteredCarbon.Building_SleeveGestator.PutCorpseForRepurposing (Verse.Corpse corpse) [0x0006c] in <7b4c3c7e0bc34eceb09feb01b10d772f>:0
at AlteredCarbon.JobDriver_HaulCorpseToGestation.<MakeNewToils>b__3_3 () [0x00023] in <7b4c3c7e0bc34eceb09feb01b10d772f>:0
at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00208] in <69945a8ed6c540cf90b578de735e0605>:0
- TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch4 (string)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobUtility.TryStartErrorRecoverJob_Patch2 (Verse.Pawn,string,System.Exception,Verse.AI.JobDriver)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.TryActuallyStartNextToil_Patch0 (Verse.AI.JobDriver)
Verse.AI.JobDriver:ReadyForNextToil ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.DriverTick_Patch0 (Verse.AI.JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick ()
Verse.Pawn:Tick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickList.Tick_Patch0 (Verse.TickList)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch3 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch4 (Verse.Game)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root_Play.Update_Patch0 (Verse.Root_Play)


The full log is at :
https://gist.github.com/HugsLibRecordKeeper/87b4e28c1fb7317cca929df36d3f1f6e

EDIT:

IT's HEDEFs - blood loss hediff always causes it, as do other stacked hediffs.

EDIT FOLLOWUP:
I don't have your source but this appears to be happening in the code that checks to see if there are any critical missing body parts.
Last edited by Nox; 17 Dec, 2024 @ 10:26pm
< >
Showing 1-1 of 1 comments
Got the same bug here
< >
Showing 1-1 of 1 comments
Per page: 1530 50