Is this a problem: "Could not find think node with key ...."

Started by dv-segfault, May 01, 2022, 05:33:26 PM

Previous topic - Next topic

dv-segfault


Hi,

I'm new to modding, and it seems to be going pretty well so far. I'm just making my own for personal use for fun. I have one issue I can't seem to figure out on my own.  I'm sure this has come up on the forum before, but I apologize that I couldn't find it.

When I save a game and then load that savefile, I get the warning, "Could not find think node with key 1955586894" (or some other #).  The # is the this.UniqueSaveKey of any one of a class derived from JobGiver that I have created.  It doesn't seem to cause any real issue, but I would like to understand why it is happening.  I am using RimWorld 1.3.3326.

As far as I can tell, this is completely normal behavior with the game for any thinknode I will try to add to the game's Think Tree using an insertion hook.  The exception is called from Verse.AI.Job:ExposeData because ThinkTreeDef.TryGetThinkNodeWithSaveKey() couldn't find a mod-created think node in the tree when recursively searching from thinkRoot.ChildrenRecursive.

Whereas, the only way I know to add my own think tree xml definitions into the game is through an insertion hook which uses the class ThinkNode_SubtreesByTag.  And that only searches its children when TryIssueJobPackage() is called -- not when a game is loaded.



Is there any reason to try to fix this in some way, or just live with the warning and not worry about it?

Thanks!





Could not find think node with key 1955586894
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
Verse.AI.Job:ExposeData ()
Verse.PostLoadIniter:DoAllPostLoadInits ()
Verse.ScribeLoader:FinalizeLoading ()
Verse.Game:LoadGame ()
Verse.SavedGameLoaderNow:LoadGameFromSaveFileNow (string)
Verse.Root_Play/<>c:<Start>b__1_1 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
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 ()