Describe the bug
A user experienced a NullReferenceException message when extracting a pawn from the vat. The report from Steam Workshop gave this stacktrace:
JobDriver threw exception in initAction for pawn Grub driver=JobDriver_ExtractGrowerProduct (toilIndex=3) driver.job=(QE_ExtractFromGrowerJob (Job_4563749) A=Thing_QE_PawnVat928027) lastJobGiver=Verse.AI.ThinkNode_QueuedJob
System.NullReferenceException: Object reference not set to an instance of an object
at QEthics.Building_PawnVatGrower.ExtractProduct (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
at QEthics.JobDriver_ExtractGrowerProduct.<MakeNewToils>b__1_0 () [0x00000] in <filename unknown>:0
at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
Expected behavior
All pawn extractions from the cloning vat should either work or fail giving the user an error message with info on why it failed. Here is the end-state of the changes I want to make for this:
If there is a Failure, Success, or player Aborts growing process, all paths result in the same save data for Cloning Vat and Organ vat.
To Reproduce
Save the game with a pawn growing in a Clone Vat.
Edit the save file and find the vat by searching for text 'Building_PawnVatGrower'.
Remove the node <pawnBeingGrown> and everything it contains and replace it with <pawnBeingGrown />. This simulates the bug the users are having where crafting starts with no pawn growing.
Click Finish Growing gizmo on the Clone Vat, and let pawn extract contents.
Observe that error occurs.
Additional context
Thanks to 'dragonslayer' on Steam Workshop for reporting.
Describe the bug A user experienced a NullReferenceException message when extracting a pawn from the vat. The report from Steam Workshop gave this stacktrace:
Expected behavior All pawn extractions from the cloning vat should either work or fail giving the user an error message with info on why it failed. Here is the end-state of the changes I want to make for this:
If there is a Failure, Success, or player Aborts growing process, all paths result in the same save data for Cloning Vat and Organ vat.
To Reproduce
<pawnBeingGrown>
and everything it contains and replace it with<pawnBeingGrown />
. This simulates the bug the users are having where crafting starts with no pawn growing.Additional context Thanks to 'dragonslayer' on Steam Workshop for reporting.