[1.3.3087] JobDriver exception emptying eggbox if stockpile too full

Started by Ark, August 15, 2021, 04:52:41 PM

Previous topic - Next topic

Ark

1.3.3087 Linux SendOwl version Core + Ideology no mods or Royalty.
Jobdriver throws an exception emptying the eggbox if the target stockpile is already almost full and no alternative stockpiles exist.
Spawn a pawn, create an eggbox and a 1x1 egg stockpile. Spawn ~65 eggs in the stockpile. Edit the eggbox to contain 20 eggs.
I had to edit the save since I couldn't find a debug tool to place eggs into the eggbox.
Unpause, pawn empties the eggbox, hauls the eggs, reaches stockpile, drops 10 eggs into the stockpile and 10 to nearest free spot with a jobdriver exception.
Gameplay impact without devmode is an unexplained pause.
All the footwork is already done in the test save, just unpause.


JobDriver threw exception in initAction for pawn Py driver=JobDriver_EmptyThingContainer (toilIndex=6) driver.job=(EmptyThingContainer (Job_39) A=Thing_EggChickenUnfertilized521834 B=(100, 0, 102))
System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.AI.GenPath.ShouldNotEnterCell (Verse.Pawn pawn, Verse.Map map, Verse.IntVec3 dest) [0x00000] in <75c61223621244ebbaedb254dfd0a66b>:0
  at Verse.AI.GenPath.ResolveClosestTouchPathMode (Verse.Pawn pawn, Verse.Map map, Verse.IntVec3 target) [0x00000] in <75c61223621244ebbaedb254dfd0a66b>:0
  at Verse.AI.GenPath.ResolvePathMode (Verse.Pawn pawn, Verse.TargetInfo dest, Verse.AI.PathEndMode& peMode) [0x0007b] in <75c61223621244ebbaedb254dfd0a66b>:0
  at Verse.AI.Pawn_PathFollower.StartPath (Verse.LocalTargetInfo dest, Verse.AI.PathEndMode peMode) [0x00018] in <75c61223621244ebbaedb254dfd0a66b>:0
  at Verse.AI.Toils_Haul+<>c__DisplayClass4_0.<CarryHauledThingToCell>b__0 () [0x0003f] in <75c61223621244ebbaedb254dfd0a66b>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x001de] in <75c61223621244ebbaedb254dfd0a66b>:0 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)


Test save and log attached.

Pheanox

Thanks for the bug report and provided save, it demonstrated the bug exactly.  I will get the report in to the devs.