Closed hyper1on closed 3 months ago
Fairly sure this is fixed now. I've gotten similar reports on Steam. It was the dictionary PrimaryFilter in MainTabWindow_Numbers which did a direct check on pawn.RaceProps.IsAnimal. That's now a null-safe extension method
Sometimes Numbers works fine. Sometimes when I click Numbers this is spammed continuously until I click Numbers again. When it errors, the numbers window doesn't appear at all.
When I got this error log, the Wildlife tab worked fine. Sometimes it's the other way around, sometimes both work and sometimes neither work.
I don't know enough about deciphering logs to see of this is a bug in Numbers, or an issue caused by another mod that is manifesting itself when Numbers is called.
Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object at Numbers.WorldComponent_Numbers+<>c.<.cctor>b8_0 (Verse.Pawn pawn) [0x00000] in <9ff61b29a7ab468ba28486fbf1f24cff>:0 at Numbers.MainTabWindow_Numbers+<>cDisplayClass24_0.b0 (System.Funcd 24.MoveNext () [0x0006a] in <9ff61b29a7ab468ba28486fbf1f24cff>:0
at System.Collections.Generic.List:0
at System.Collections.Generic.List:0
at RimWorld.PawnTable.RecachePawns () [0x0001c] in <95de19971c5d40878d8742747904cdcd>:0
at RimWorld.PawnTable.RecacheIfDirty () [0x00010] in <95de19971c5d40878d8742747904cdcd>:0
at RimWorld.PawnTable.get_Size () [0x00000] in <95de19971c5d40878d8742747904cdcd>:0
at RimWorld.MainTabWindow_PawnTable.get_RequestedTabSize () [0x0000e] in <95de19971c5d40878d8742747904cdcd>:0
at (wrapper dynamic-method) RimWorld.MainTabWindow.RimWorld.MainTabWindow.get_InitialSize_Patch2(RimWorld.MainTabWindow)
at Verse.Window.SetInitialSizeAndPosition () [0x00000] in <95de19971c5d40878d8742747904cdcd>:0
at RimWorld.MainTabWindow.SetInitialSizeAndPosition () [0x00000] in <95de19971c5d40878d8742747904cdcd>:0
at RimWorld.MainTabWindow_PawnTable.SetDirty () [0x0000b] in <95de19971c5d40878d8742747904cdcd>:0
at (wrapper dynamic-method) RimWorld.MainTabWindow_PawnTable.RimWorld.MainTabWindow_PawnTable.PostOpen_Patch1(RimWorld.MainTabWindow_PawnTable)
at Numbers.MainTabWindow_Numbers.PostOpen () [0x00006] in <9ff61b29a7ab468ba28486fbf1f24cff>:0
at Verse.WindowStack.Add (Verse.Window window) [0x0003a] in <95de19971c5d40878d8742747904cdcd>:0
at (wrapper dynamic-method) RimWorld.MainTabsRoot.RimWorld.MainTabsRoot.ToggleTab_Patch1(RimWorld.MainTabsRoot,RimWorld.MainButtonDef,bool)
at RimWorld.MainButtonWorker_ToggleTab.Activate () [0x00005] in <95de19971c5d40878d8742747904cdcd>:0
at RimWorld.MainButtonWorker.InterfaceTryActivate () [0x0008d] in <95de19971c5d40878d8742747904cdcd>:0
at RimWorld.MainButtonWorker.DoButton (UnityEngine.Rect rect) [0x000ee] in <95de19971c5d40878d8742747904cdcd>:0
at RimWorld.MainButtonsRoot.DoButtons () [0x00119] in <95de19971c5d40878d8742747904cdcd>:0
at (wrapper dynamic-method) RimWorld.MainButtonsRoot.RimWorld.MainButtonsRoot.MainButtonsOnGUI_Patch1(RimWorld.MainButtonsRoot)
at (wrapper dynamic-method) RimWorld.UIRoot_Play.RimWorld.UIRoot_Play.UIRootOnGUI_Patch3(RimWorld.UIRoot_Play)
at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch2(Verse.Root)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch2 (Verse.Root)
2[T,TResult] validator) [0x0000c] in <9ff61b29a7ab468ba28486fbf1f24cff>:0 at System.Linq.Enumerable.All[TSource] (System.Collections.Generic.IEnumerable
1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at Numbers.MainTabWindow_Numbers+1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable
1[T] collection) [0x000db] in1[T].AddRange (System.Collections.Generic.IEnumerable
1[T] collection) [0x00000] inException filling window for Numbers.MainTabWindow_Numbers: System.NullReferenceException: Object reference not set to an instance of an object at Numbers.WorldComponent_Numbers+<>c.<.cctor>b8_0 (Verse.Pawn pawn) [0x00000] in <9ff61b29a7ab468ba28486fbf1f24cff>:0 at Numbers.MainTabWindow_Numbers+<>cDisplayClass24_0.b0 (System.Funcd 24.MoveNext () [0x0006a] in <9ff61b29a7ab468ba28486fbf1f24cff>:0
at System.Linq.Enumerable.Count[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00052] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Numbers.MainTabWindow_Numbers.DoWindowContents (UnityEngine.Rect rect) [0x00044] in <9ff61b29a7ab468ba28486fbf1f24cff>:0
at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x001d3] in <95de19971c5d40878d8742747904cdcd>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
2[T,TResult] validator) [0x0000c] in <9ff61b29a7ab468ba28486fbf1f24cff>:0 at System.Linq.Enumerable.All[TSource] (System.Collections.Generic.IEnumerable
1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at Numbers.MainTabWindow_Numbers+