RimWorld

RimWorld

Hospitality
Halley Mar 6, 2020 @ 3:42pm
A Lords/ThinkNode related bug
Hi,
First of all, thank you for making this mod.

I have suddenly encountered a bug.
There was a series of events preceeding this bug:
- Randy Random decided that it was time for a scattered pods mech raid.
- A few seconds later a group of visitors decided that now was a great time to come visit.
- Nedless to say this inopportune timing resulted in a few visitor fatalities before any of them could even reach my base, which resulted in the visitors starting to flee (some had reached the base at that point but not the beds).
- The mechs were defeated, but the visitors had fled in two groups on opposite sides of the map.
- Ths visitors kept hanging at the edges of the map and not leaving (probably waiting for the other group to catch up, but neither group would take the initiative to do so).
- In the end, to prevent them from starving to death I used the dev tool 'Pass to World' to send them home again.

some days later visitors from the same faction return and this is where the error-log keeps spamming. This message in particular: {PAWN_NAME_HERE} doing ThinkNode_DutyConstant with no duty.

The affected pawns are the survivors of the previous calamity (Further experimentation revealed that that particular instance might not be directly related to this bug). Other visitors spawning in with them are unaffected. I was able to test this since I had a save not long before visitors arrive again.

Efforts to work around this didn't pan at first out either. debug-killing and then resurrecting the affected pawn didn't change anything and they were still broken when they rejoined the visitor group.
Using the JobGiver to make them Claim a Bed doesn't fix them after they've completed it.
I was after a while able to use a combination of the JobGiver's "claim Bed" and "Leave lord" in order to seemingly fix the pawns again.

This is from the log when visitors arrive:
- (Visitor pawns are spawned)
- Tried to add pawn Bennett to lord Verse.AI.Group.Lord but this pawn is already a member of lord Verse.AI.Group.Lord. Pawns can't be members of more than one lord at the same time.
- Tried to add pawn Per to lord Verse.AI.Group.Lord but this pawn is already a member of lord Verse.AI.Group.Lord. Pawns can't be members of more than one lord at the same time.
- Bennett doing ThinkNode_DutyConstant with no duty.
- Bennett doing ThinkNode_Duty with no duty.
- Per doing ThinkNode_DutyConstant with no duty.
- Per doing ThinkNode_Duty with no duty.
(The last four are constantly spammed)

If there is only one bugged visitor then I only get one instance of ThinkNode_DutyConstant and then an instance of ThinkNode_Duty with a constantly increasing error-count next to it.

I also found a 'Lords' button in the debug-log tools and it looks like this after the visitors arrive:
======= Lords =======
Count: 3

#1: LordJob_VisitColony
Current toil: LordToil_Travel
Members (count: 5):
Per (Republican Dominion of Dahininum)
Urist (Republican Dominion of Dahininum)
Jenson (Republican Dominion of Dahininum)
Bennett (Republican Dominion of Dahininum)
Riggs (Republican Dominion of Dahininum)

#2: LordJob_VisitColony
Current toil: LordToil_PanicFlee
Members (count: 2):
Bradley (Republican Dominion of Dahininum)
Paola (Republican Dominion of Dahininum)

#3: LordJob_VisitColony
Current toil: LordToil_CustomTravel
Members (count: 3):
Quartertooth (Republican Dominion of Dahininum)
Sasquatch (Republican Dominion of Dahininum)
Cuevas (Republican Dominion of Dahininum)



Prior to visitor arrival there is no #3 in 'Lords' and things are unchanged in #1 and #2.
#3 changes from CustomTravel to VisitPoint as normal? when the visitors arrive in the guest rooms.

Bradley, Paola and Riggs were the survivors of the scatteded mech incident. Per, Urist, Jenson and Bennet are also bugged when they appear. I suspect, but cannon say for certain anymore that they were around when Riggs passed out fue to his go-juice withdrawals, allowing them to finally leave the map and without him. (Addicts not consuming the drug of choice in their inventories might be also be a bug, or just a compatability issue?)

I Hope this gives you enough info to know where to look. I'm still on 1.0 (obviously), and while I have a lot of mods loaded, this thing hasn't happened in the previous 130+ hours of the current playthrough.
Last edited by Halley; Mar 6, 2020 @ 3:57pm
Showing 1-2 of 2 comments
Orion  [developer] Mar 6, 2020 @ 11:38pm 
Hey, thanks for the detailed report. I can tell you took a lot of time to investigate the issue. Usually it's also a good idea to include a link to your log (CTRL-F12).

If I understand correctly, when you pass pawns to world, they are not removed from any lords on the map. I suppose it should and I'm not sure why it doesn't.

I think I should add a check when spawning guests if they are already member of another lord. Obviously this is normally impossible, but would remedy this situation.

Unfortunately, I'm not making any fixes for 1.0 anymore. So I'll see if I can add the fix to the 1. 1 version.
TurtleShroom Aug 18, 2022 @ 4:55pm 
I am experiencing this same problem, but I solved it. In my case, it occured when Insects spawn during Infestations, which looks like this:

Spelopede43514 doing ThinkNode_DutyConstant with no duty. UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string) RimWorld.ThinkNode_DutyConstant:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams) Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams) Verse.AI.ThinkNode_Conditional:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams) Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams) Verse.AI.ThinkNode_Tagger:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams) Verse.AI.ThinkNode_Subtree:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams) Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams) Verse.AI.ThinkNode_Conditional:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams) Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams) Verse.AI.Pawn_JobTracker:DetermineNextConstantThinkTreeJob () (wrapper dynamic-method) Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.JobTrackerTick_Patch0 (Verse.AI.Pawn_JobTracker) (wrapper dynamic-method) Verse.Pawn:Verse.Pawn.Tick_Patch3 (Verse.Pawn) (wrapper dynamic-method) Verse.TickList:Verse.TickList.Tick_Patch2 (Verse.TickList) (wrapper dynamic-method) Verse.TickManager:Verse.TickManager.DoSingleTick_Patch9 (Verse.TickManager) (wrapper dynamic-method) Verse.TickManager:Verse.TickManager.TickManagerUpdate_Patch1 (Verse.TickManager) (wrapper dynamic-method) Verse.Game:Verse.Game.UpdatePlay_Patch3 (Verse.Game) Verse.Root_Play:Update ()

This happened thousands of times every millisecond. Taming them did not fix it. When I killed them all, it resolved the issue.

Funny enough, when the Insects spawned, they were not part of a Faction, and when they died, they remained not part of a Faction. They were totally docile.

That is when I realized the problem. I re-loaded the game to see if the Insect Faction was installed. To my surprise, it wasn't. When I added it back in, the insects worked and no errors were generated.
Showing 1-2 of 2 comments
Per page: 1530 50