[1.1.2589 rev1331] NPC pawn deep-save errors causing mod/tool errors on later

Started by hechicera, March 31, 2020, 10:18:21 PM

Previous topic - Next topic

hechicera

There seem to be at least three variants of the deepsave/pawn structure not happy errors. Two are warnings, one is error. All three if the game is reloaded can cause issues with mods.

Also, if a mod touches a NPC pawn, or PC pawn with NPC social relationships to an NPC pawn after one of these messages, and before a full manual save and reload it will give more errors and those errors may cause the mod to misbehave. How depends on mod.

Manually saving and reloading, TWICE, fixes things up.

Here are three examples of the error messages, file is a copy of the inspection of error/message in the in-game console when you click on it, so you can see structures involved:
https://drive.google.com/open?id=1ZZ1yuL3dwjcbCps8NKFHdmKaP9OAYdeF
https://drive.google.com/open?id=1FnGn5t3DG34_SJHL04xcfls7yLZRA2ng
https://drive.google.com/open?id=14Uo3ATyu4bROmpc1YlqGSRznWDMz6bcS
(all small)

Here is a full player log where I recreated two using a brand new game * running just Harmony, Core, Royalty, HugsLib. Could get errors (so mod wasn't causing), but no bad behavior as no mod also tried to use NPC pawn structures in unstable state. Log starts at game creation. You can see a couple of manual save & reloads.

https://drive.google.com/open?id=1AKuwKSfhn23Q_FBaJnxZ3N0UQh3IMmUJ

This is a short video of how I created that game. PC pawns having relationships to NPC pawns greatly increases seeing this issue. "Left-Behind" pawns get used, so ...

https://youtu.be/yH20wmMHY4k

Triggers (several):
NPC pawn on map (visitor, raid, traders)
State change of NPC pawn (recuited)
State change of PC pawn with NPC relationships (death, error after reload with this 2x)

Gameplay Error Fires Delayed:
The trigger sets up the initial error/warning. But the fail ones happen after a reload, esp. if only autosave (aka running commitment which I do). Those errors look like this:
QuoteCould not resolve reference to object with loadID Thing_Human19758 of type Verse.Pawn. Was it compressed away, destroyed, had no ID number, or not saved/loaded right? curParent=WorkTab.PriorityManager curPathRelToParent=/Priorities/keys

Not to pick on WorkTab, that is just the first mod I saw it with. It became a ghost error, recreating on any mod that uses PC or NPC pawn structures based on if it tried to use one after a trigger but before a manual save and reload patched it up.

Also helpful in forcing it: Increase autosave interval!

trigger event -> error gen for data deepsave/pawn structure -> autosave -> game touches that item

You want that chain to happen.

Games continue to run, some mods may hiccup. As I said before manual save & reload 2x, forces cleanup and all is happy after that.

* This test game was run after unsubbing to all mods, and uninstalling RimWorld via Steam. Then going to Steam and AppData folders and deleting all Ludeon, RimWorld and workshop files. Then restarting PC, and reinstalling just RimWorld, Harmony and HugsLib. Should be zero change of artifacts near as I can control.

Update 1:
Running a new game with only Core and Royalty, I was able to get this error to show:
Reserving with maxPawns > 1 and stackCount = All; this will not have a useful effect (suppressing future warnings)

I have not seen the other two yet. If I run it longer through some deaths and more raids, and don't see them by later today this is maybe a combo base & mods bug. Where 1 of the 3 pops in base and the other two when Harmony/Hugslib are loaded.

Update 2: The no tools (Core Royalty only) eventually (hours) later gave me another deep save warn about load, warn at load combo. The array index one didn't fire, so that may be tool or tools after these. Here is full log, pretty boring for several hours. But you'll see the two errors like the ones I saw before.

https://drive.google.com/open?id=10IJFaWghAHzoP4VVMWiQSt9_XxOAgCZ3

The two food item errors are, I think boring, or amusing. Someone went and ate the food another pawn wanted to feed a prisoner. Twice!

ison

Thanks for the great report! It's a known issue we're trying to fix. We've received some other reports and savefiles as well.