RimThreaded icon indicating copy to clipboard operation
RimThreaded copied to clipboard

Rescuing Pawns Dumps Them on Top of Bed Instead of in Bed

Open MiningInMySleep opened this issue 3 years ago • 3 comments

Developer To Do Notes:

  • [ ]
  • [ ]
  • [ ]

Vanilla Bug Report

Describe the bug

Rescuing pawns dumps them on top of the bed instead of placing them actually in the bed to begin recovery. This might be only for stranger pawns. The one in the screenshot/save was a stranger pawn.

Steps to reproduce the behavior (VERY IMPORTANT)

  1. Rescue Pawn

Error Logs ?

ReservationManager.Reserve cannot reserve. This is likely because reservation is no longer valid after CanReserve was called due to time delay with multiple threads.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
RimThreaded.ReservationManager_Patch:Reserve (Verse.AI.ReservationManager,bool&,Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
(wrapper dynamic-method) Verse.AI.ReservationManager:Verse.AI.ReservationManager.Reserve_Patch1 (Verse.AI.ReservationManager,Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
RimWorld.JobDriver_LayDown:TryMakePreToilReservations (bool)
RimThreaded.Pawn_JobTracker_Patch:StartJob (Verse.AI.Pawn_JobTracker,Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool)
(wrapper dynamic-method) Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.StartJob_Patch1 (Verse.AI.Pawn_JobTracker,Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool)
Verse.AI.Pawn_JobTracker:Notify_TuckedIntoBed (RimWorld.Building_Bed)
RimWorld.Toils_Bed/<>c__DisplayClass4_0:<TuckIntoBed>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
RimThreaded.TickList_Patch:NormalThingTick ()
RimThreaded.RimThreaded:ExecuteTicks ()
RimThreaded.RimThreaded:ProcessTicks (RimThreaded.RimThreaded/ThreadInfo)
RimThreaded.RimThreaded:InitializeThread (object)
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart (object)


TryMakePreToilReservations() returned false for a non-queued job right after StartJob(). This should have been checked before. curJob=LayDown (Job_92155) A=Thing_SleepingSpot37483
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
RimThreaded.Pawn_JobTracker_Patch:StartJob (Verse.AI.Pawn_JobTracker,Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool)
(wrapper dynamic-method) Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.StartJob_Patch1 (Verse.AI.Pawn_JobTracker,Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool)
Verse.AI.Pawn_JobTracker:Notify_TuckedIntoBed (RimWorld.Building_Bed)
RimWorld.Toils_Bed/<>c__DisplayClass4_0:<TuckIntoBed>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
RimThreaded.TickList_Patch:NormalThingTick ()
RimThreaded.RimThreaded:ExecuteTicks ()
RimThreaded.RimThreaded:ProcessTicks (RimThreaded.RimThreaded/ThreadInfo)
RimThreaded.RimThreaded:InitializeThread (object)
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart (object)

HugsLib log

❗❗❗ Link to HugsLib log. (MUST BE LINK) ❗❗❗

Player.log (Optional)

Player.log

Save file ?

Quaunler.zip

Screenshots (Optional) ?

image

Mod list (For vanilla report, it has to be same as below list.) ?

[Mod list length: 6]
Harmony [https://steamcommunity.com/sharedfiles/filedetails/?id=2009463077]
Core [https:// no link (local mod)]
Royalty [Official DLC] [https:// no link (local mod)]
Ideology [Official DLC] [https:// no link (local mod)]
RimThreaded [https://steamcommunity.com/sharedfiles/filedetails/?id=2222907981]
  • Harmony
  • Core
  • Royalty (Optional)
  • Ideology (Optional)
  • RimThreaded

MiningInMySleep avatar Jan 27 '22 09:01 MiningInMySleep

As an aside, this save also has the job reservation idling bug if that helps diagnosing the other issue.

MiningInMySleep avatar Jan 27 '22 10:01 MiningInMySleep

Thank you for the submission. I am loading the save, but the rescue seems to work now. I will dig in further. I have witnessed this bug myself as well, so I curious about this as well.

cseelhoff avatar Jan 27 '22 18:01 cseelhoff

It's somewhat inconsistent. When bringing in the pawn from outside they would just dump them on top of the bed. If they are already on top of the bed the next time they are rescued there is a good chance that the downed pawn will actually be put inside the bed. However this is also not always the case. Sometimes I have to rescue them 2-3 times.

MiningInMySleep avatar Jan 27 '22 21:01 MiningInMySleep