Bug. Pawn loads and unloads food items infinite loop

Started by daNNux, May 19, 2018, 02:40:39 AM

Previous topic - Next topic

daNNux

My paws started to load and unload food items in an infinitive loop a couple of days ago.

https://git.io/vppDw

Anyone got any idea what mod/conflict that causes the issue?


Raccoon started 10 jobs in 10 ticks. List: (TakeInventory (Job_1420320) A=Thing_RawBarley343602) (WaitMaintainPosture (Job_1420321)) , (TakeInventory (Job_1420324) A=Thing_RawBarley343602) (WaitMaintainPosture (Job_1420325)) , (TakeInventory (Job_1420328) A=Thing_RawBarley343602) (WaitMaintainPosture (Job_1420329)) , (TakeInventory (Job_1420332) A=Thing_RawBarley343602) (WaitMaintainPosture (Job_1420333)) , and (TakeInventory (Job_1420336) A=Thing_RawBarley343602) (WaitMaintainPosture (Job_1420337))  lastJobGiver=null, curJob.def=WaitMaintainPosture, curDriver=Verse.AI.JobDriver_WaitMaintainPosture
Verse.Log:Error(String)
Verse.AI.Pawn_JobTracker:StartErrorRecoverJob(String)
Verse.AI.Pawn_JobTracker:FinalizeTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick_Patch1(Object)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

Canute

Hi,
let me guess that barley is the last stack stack anyway.
I think it belong to Pick up and haul since "TakeInventory (Job_1420320) A=Thing_RawBarley343602) "
Since it is the last stack anyway, you just should forbid this stack to stop that loop.
I encounter similar loops sometimes too.

q_mi

I have similar problem. Not sure which mod is causing the bug.

https://gist.github.com/HugsLibRecordKeeper/4834ed9632535684594abed8af41b911

Doofer started 10 jobs in 10 ticks. List: (WaitMaintainPosture (Job_1908249)) , (TakeInventory (Job_1908254) A=Thing_RawCorn625191) (WaitMaintainPosture (Job_1908255)) , (TakeInventory (Job_1908260) A=Thing_RawCorn625191) (WaitMaintainPosture (Job_1908261)) , (TakeInventory (Job_1908264) A=Thing_RawCorn625191) (WaitMaintainPosture (Job_1908265)) , (TakeInventory (Job_1908269) A=Thing_RawCorn625191) (WaitMaintainPosture (Job_1908270)) , and (TakeInventory (Job_1908275) A=Thing_RawCorn625191) (WaitMaintainPosture (Job_1908276))  lastJobGiver=null, curJob.def=WaitMaintainPosture, curDriver=Verse.AI.JobDriver_WaitMaintainPosture
Verse.Log:Error(String)
Verse.AI.Pawn_JobTracker:StartErrorRecoverJob(String)
Verse.AI.Pawn_JobTracker:FinalizeTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick_Patch1(Object)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

Canute

q_mi,
did a cook cause these loop with the Corn ?
Then you should update Infinity storage, i think that can fix it.

q_mi

It looks like a handler trying to tame an animal causing these loop. I'm not sure why - once I turn off Handle job it won't have the issue anymore.

BlackSmokeDMax

Quote from: q_mi on June 07, 2018, 11:16:01 AM
It looks like a handler trying to tame an animal causing these loop. I'm not sure why - once I turn off Handle job it won't have the issue anymore.

Are you using Combat Extended (or some other mod that has loadouts involving pawn inventory)? If so, try adding some food that the pawn would use for taming/training to their loadout. My guess is they are in the loop of picking up food to go tame/train, but then their loadout doesn't include that food so they drop it. Now they pick it up to their inventory to train/tame, now they drop it because it is not in their loadout. Repeat, forever.

q_mi

Quote from: BlackSmokeDMax on June 08, 2018, 12:17:05 AM
Quote from: q_mi on June 07, 2018, 11:16:01 AM
It looks like a handler trying to tame an animal causing these loop. I'm not sure why - once I turn off Handle job it won't have the issue anymore.

Are you using Combat Extended (or some other mod that has loadouts involving pawn inventory)? If so, try adding some food that the pawn would use for taming/training to their loadout. My guess is they are in the loop of picking up food to go tame/train, but then their loadout doesn't include that food so they drop it. Now they pick it up to their inventory to train/tame, now they drop it because it is not in their loadout. Repeat, forever.

OMG you save my handler! It does caused by loadout. Thanks a lot mate

BlackSmokeDMax

Quote from: q_mi on June 08, 2018, 05:03:10 AM
OMG you save my handler! It does caused by loadout. Thanks a lot mate

Very welcome, and glad you got it sorted!

Razuhl

This is not a mod bug its the way vanilla is coded. When putting something into the inventory the Toils_Haul.TakeToInventory ignores the result from the pawns inventory. Thats why you see the pawn doing "WaitMaintainPosture" and "TakeInventory" every tick(game turn). TakeInventory returns success which switches to WaitMaintainPosture so that next tick the pawn looks for a new job which is again the taming work giver. The work giver does not give a taming job since the pawn needs the correct food and starts instead a "TakeInventory" job and the circle is complete.

The same behaviour can be achieved by loading a pawns inventory full with 9999 stacks of items or declaring an animal that, in general, needs food but goes through a lifestage where it doesn't need food. An animal handler will then try to take 0 amount of valid food to his inventory in order to tame the animal, which starts the loop again.

But even if the job reported an error, pawns will simply idle for 250 turn and then repeat the error causing job. Turning the pawn useless without feedback to the player. Which in turn means the loop and its associated message is actually better than the error behaviour of just idling the pawn.