RimWorld

RimWorld

Hospitality
ZakTheFallen Dec 15, 2017 @ 8:39am
"Visitors are leaving" message spams the console infinitely
I ran into a particularly nasty bug, but I'm not sure if it's due to my own fault or not. What happened is that I had a visitor from a friendly faction, but he wouldn't leave even when the message appears saying that he was leaving.

He stayed there for days, wandering my base and not fulfilling his needs. Finally I had enough and used dev mode to "pass to world", which removes the pawn from the map without killing them. I used it in the past, and all was good for a day or two. Eventually though, the "Visitors from [insert faction name] are leaving" message showed up, but it started spamming in an infinite loop.

Nothing I did could stop it, even after restarting the game and reloading the save. It seems like the save file is bugged now. I assume it happened because the game is trying to find a pawn that no longer exists on the the map. The weird part is that I played the save for 12 hours so far, no visitors had this problem before. I saw no other warnings or errors in the log, just this one:

System.NullReferenceException: Object reference not set to an instance of an object
at Verse.CellFinder.RandomEdgeCell (Verse.Map) <0x0012c>
at Verse.CellFinder.TryFindRandomEdgeCellWith (System.Predicate`1<Verse.IntVec3>,Verse.Map,single,Verse.IntVec3&) <0x0016d>
at Verse.CellFinder.TryFindRandomPawnExitCell (Verse.Pawn,Verse.IntVec3&) <0x00088>
at (wrapper dynamic-method) Verse.AI.Group.TransitionAction_EnsureHaveExitDestination.DoAction_Patch1 (object,Verse.AI.Group.Transition) <0x000bf>
at Verse.AI.Group.Transition.Execute (Verse.AI.Group.Lord) <0x0004e>
at Verse.AI.Group.Transition.CheckSignal (Verse.AI.Group.Lord,Verse.AI.Group.TriggerSignal) <0x00280>
at Verse.AI.Group.Lord.CheckTransitionOnSignal (Verse.AI.Group.TriggerSignal) <0x000b4>
at Verse.AI.Group.Lord.LordTick () <0x0006a>
at Verse.AI.Group.LordManager.LordManagerTick () <0x00036>
at Verse.Map.MapPostTick () <0x001d6>

Verse.Log:Error(String)
Verse.Map:MapPostTick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
Last edited by ZakTheFallen; Dec 15, 2017 @ 10:10am
< >
Showing 1-15 of 17 comments
Orion  [developer] Dec 29, 2017 @ 1:03am 
Sorry for my late response. Somehow I must have missed writing a response.

It sounds like the visitor bugged out first, but when you removed him, the visitor group lord broke. What you could do is edit the save game (make a backup first!) and find and remove all lords that are active. You shouldn't have any groups / caravans or parties at that time, though.
AlFaraS'ulTane Jul 30, 2018 @ 3:25pm 
*bump*
still appearing. even if you weren't in dev mode at any point of your "campaign", still, it can appear. the message starts popping up, they won't leave and then you got the infinite loop again.
Last edited by AlFaraS'ulTane; Jul 30, 2018 @ 3:27pm
Orion  [developer] Jul 31, 2018 @ 1:13am 
The thing is, the group lord will only try and leave the map once. If something fails then, it will stay forever.
If you remove all pawns from a lord it effectively breaks it. So you can better edit your save file and remove the lord there first.
Or even better, when it fails to leave the first time, load the last save.
Silver Felyne Aug 13, 2019 @ 9:43pm 
A bit of a Necro, and you've probably moved saves, but I have a solution that will help anyone who stumbles here with this problem in the future.
The problem stems from "Pass to World"-ing a guest pawn, trapping them in an eternal loop of leaving a map they are not on. The solution is to bring them back.
  1. Go to Dev Console and go to "Spawn World Pawn".
  2. If you're lucky, you know the name of the offending pawn, the one you passed to world.
  3. Find the pawn on the list, click, and click anywhere on the map to bring them back.
  4. If you don't know the name of the pawn, you'll have to trial-and-error the (potentially long) list until you find the right one.
  5. The pawn will leave the map and you'll stop being spammed with messages. :steamhappy:
Orion  [developer] Aug 14, 2019 @ 12:56am 
Interesting angle! If they're off the map, why do they get updated, though?
Silver Felyne Aug 14, 2019 @ 8:24am 
Originally posted by Orion:
Interesting angle! If they're off the map, why do they get updated, though?
Oh, I meant "Map" as in the Local Map.
When they're off-map, (I assume) the game keeps ordering an object (the pawn that was passed-to-world) that doesn't exist because it's not in the local map.
So when you "spawn world pawn" you bring them back to the cell so the game finally has something to order. They simply walk to the edge, like the error messages wanted them to.
Orion  [developer] Aug 15, 2019 @ 12:16am 
Yeah, I get it... I wonder if that's possible, though. I don't think unspawned pawns get updated... They might store their last duty, though, which can be to leave the map.
Spyrot La Iguana Jul 13, 2021 @ 12:11pm 


Originally posted by Silver Felyne:
A bit of a Necro, and you've probably moved saves, but I have a solution that will help anyone who stumbles here with this problem in the future.
The problem stems from "Pass to World"-ing a guest pawn, trapping them in an eternal loop of leaving a map they are not on. The solution is to bring them back.
  1. Go to Dev Console and go to "Spawn World Pawn".
  2. If you're lucky, you know the name of the offending pawn, the one you passed to world.
  3. Find the pawn on the list, click, and click anywhere on the map to bring them back.
  4. If you don't know the name of the pawn, you'll have to trial-and-error the (potentially long) list until you find the right one.
  5. The pawn will leave the map and you'll stop being spammed with messages. :steamhappy:


2 years after, I have the same bug. And Silver Felyne's way of fixing it is pretty hard.
Orion  [developer] Jul 13, 2021 @ 12:15pm 
There's a dev action now, "Remove broken groups" or so. Try and see if that works for you.
Spyrot La Iguana Jul 13, 2021 @ 12:37pm 
Originally posted by Orion:
There's a dev action now, "Remove broken groups" or so. Try and see if that works for you.
Can't find that dev action, where should I search?
Orion  [developer] Jul 13, 2021 @ 12:40pm 
Oh, right -.-
My bad. It's only available in the new version that isn't released yet. You can download it here: https://github.com/OrionFive/Hospitality/archive/e1f31e9117d591a03f28d40b0e7680674046f6f1.zip
Spyrot La Iguana Jul 13, 2021 @ 12:51pm 
Originally posted by Orion:
Oh, right -.-
My bad. It's only available in the new version that isn't released yet. You can download it here: https://github.com/OrionFive/Hospitality/archive/e1f31e9117d591a03f28d40b0e7680674046f6f1.zip

Bug persists. That "Remove broken groups" debug tool doesn't work at all.
Orion  [developer] Jul 13, 2021 @ 2:01pm 
Then you'll have to solve it some other way.
Spyrot La Iguana Jul 14, 2021 @ 11:37am 
Originally posted by Orion:
Then you'll have to solve it some other way.

I tried removing the mod, entering my save. Saving, and then putting the mod again.

Now visitors get in the settlement, and just stay around anywhere, while dying from hunger and doing absolutely nothing. Not even eating the food they have in their inventory.

...Yeah, you should fix this bug.
Orion  [developer] Jul 14, 2021 @ 10:55pm 
The problem is, it's not a bug. Your savegame is borked.
< >
Showing 1-15 of 17 comments
Per page: 1530 50