RimWorld

RimWorld

WeaponStats
SineSwiper 28 Apr, 2021 @ 6:37am
WeaponsTab_EquipLoadout.thinkRoot can be null
I keep getting this red error here:

Exception in Verse.AI.ThinkNode_Priority TryIssueJobPackage: System.NullReferenceException: Object reference not set to an instance of an object at (wrapper dynamic-method) Verse.AI.ThinkNode_SubtreesByTag.Verse.AI.ThinkNode_SubtreesByTag.TryIssueJobPackage_Patch1(Verse.AI.ThinkNode_SubtreesByTag,Verse.Pawn,Verse.AI.JobIssueParams) at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x00022] in <c36f9493c9844ddaa7fb5c788416098f>:0 Verse.Log:Verse.Log.Error_Patch2(String, Boolean) Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams) Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.DetermineNextJob_Patch4(Pawn_JobTracker, ThinkTreeDef&) Verse.AI.Pawn_JobTracker:TryFindAndStartJob() Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.EndCurrentJob_Patch2(Pawn_JobTracker, JobCondition, Boolean, Boolean) Verse.AI.Pawn_JobTracker:JobTrackerTick() Verse.Pawn:Verse.Pawn.Tick_Patch4(Pawn) Verse.TickList:Tick() Verse.TickManager:Verse.TickManager.DoSingleTick_Patch2(TickManager) Verse.TickManager:TickManagerUpdate() Verse.Game:UpdatePlay() Verse.Root_Play:Verse.Root_Play.Update_Patch1(Root_Play)

I was able to track down the crash because of a null thinkRoot here, which Verse.AI.ThinkNode_SubtreesByTag does not like. It assumes thinkRoot always exists. Here's my debug info:

ThinkNode_SubtreesByTag - found null thinkRoot: this=Verse.AI.ThinkNode_SubtreesByTag, pawn=Manabu, ThinkTreeDef=WeaponsTab_EquipLoadout
< >
Showing 1-3 of 3 comments
SineSwiper 28 Apr, 2021 @ 6:39am 
I also get the same GUI error that somebody else reported:

Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object at Verse.WindowStack.Add (Verse.Window window) [0x00000] in <c36f9493c9844ddaa7fb5c788416098f>:0 at (wrapper dynamic-method) RimWorld.MainTabsRoot.RimWorld.MainTabsRoot.ToggleTab_Patch1(RimWorld.MainTabsRoot,RimWorld.MainButtonDef,bool) at RimWorld.MainButtonWorker_ToggleTab.Activate () [0x00005] in <c36f9493c9844ddaa7fb5c788416098f>:0 at RimWorld.MainButtonWorker.InterfaceTryActivate () [0x0004d] in <c36f9493c9844ddaa7fb5c788416098f>:0 at (wrapper dynamic-method) RimWorld.MainButtonWorker.RimWorld.MainButtonWorker.DoButton_Patch0(RimWorld.MainButtonWorker,UnityEngine.Rect) at RimWorld.MainButtonsRoot.DoButtons () [0x0010c] in <c36f9493c9844ddaa7fb5c788416098f>:0 at (wrapper dynamic-method) RimWorld.MainButtonsRoot.RimWorld.MainButtonsRoot.MainButtonsOnGUI_Patch1(RimWorld.MainButtonsRoot) at (wrapper dynamic-method) RimWorld.UIRoot_Play.RimWorld.UIRoot_Play.UIRootOnGUI_Patch1(RimWorld.UIRoot_Play) at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root) Verse.Log:Verse.Log.Error_Patch2(String, Boolean) Verse.Root:Verse.Root.OnGUI_Patch1(Root)
bodlosh  [developer] 19 Jul, 2021 @ 9:14pm 
bagelhe 27 Sep, 2024 @ 11:51pm 
Exception in Verse.Window.InnerWindowOnGUI: System.ArgumentNullException: Value cannot be null.
Parameter name: Activator.CreateInstance(type) called with a null type, possible context=SWL_Lightsaber_Single
[Ref 4603C278]
at VisualExceptions.ExceptionsAndActivatorHandler+PatchedActivator.CreateInstance (System.Type type, System.Object obj) [0x00032] in <fb3158c4e5e7402d9acc1033026918c0>:0
at Verse.ThingMaker.MakeThing (Verse.ThingDef def, Verse.ThingDef stuff) [0x000cf] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)
at WeaponStats.MainTabWindow_WeaponStats.UpdateList () [0x00df8] in <a2ae383857a44ea892ebbecf8dfa5ab6>:0
at WeaponStats.MainTabWindow_WeaponStats.DoWindowContents (UnityEngine.Rect rect) [0x00044] in <a2ae383857a44ea892ebbecf8dfa5ab6>:0
at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x001d3] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)
< >
Showing 1-3 of 3 comments
Per page: 1530 50