[1.0] Bug: Animals Tab and workaround

Started by uphill_ninja, June 23, 2018, 01:47:06 PM

Previous topic - Next topic

uphill_ninja

Hey all,

Keep having the bug with the animal's tab where you lose control of scrolling and animals get out of order / start not showing up in the tab. Seems to be related with a new animal being added in a weird state or something the game doesn't like (Maybe taming the glitched animal while the animal is eating). For instance, I recently tamed a boomrat and the bug started occuring. Best workaround I found is to kill / sell the animal that broke the tab then it seems to go back to normal.

Here's some of the copy paste from the debug log (it basically repeats this message):

QuoteMouse position stack is not empty. There were more calls to BeginScrollView than EndScrollView. Fixing.
Verse.Log:Error(String, Boolean) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:78)
Verse.Widgets:EnsureMousePositionStackEmpty() (at C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Utility\Widgets.cs:2169)
Verse.Root:Update() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root.cs:114)
Verse.Root_Play:Update() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Play.cs:83)

Exception filling window for RimWorld.MainTabWindow_Animals: System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Single].get_Item (Int32 index) [0x00024] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:635
  at RimWorld.PawnTable.PawnTableOnGUI (Vector2 position) [0x00172] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\PawnTable\PawnTable.cs:138
  at RimWorld.MainTabWindow_PawnTable.DoWindowContents (Rect rect) [0x00028] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\MainButtons\MainTabWindows\MainTabWindow_PawnTable.cs:52
  at Verse.Window+<WindowOnGUI>c__AnonStorey0.<>m__0 (Int32 x) [0x00223] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:202
Verse.Log:Error(String, Boolean) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:78)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32) (at C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:206)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1817)

Mouse position stack is not empty. There were more calls to BeginScrollView than EndScrollView. Fixing.
Verse.Log:Error(String, Boolean) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:78)
Verse.Widgets:EnsureMousePositionStackEmpty() (at C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Utility\Widgets.cs:2169)
Verse.Root:Update() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root.cs:114)
Verse.Root_Play:Update() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Play.cs:83)

Exception filling window for RimWorld.MainTabWindow_Animals: System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Single].get_Item (Int32 index) [0x00024] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:635
  at RimWorld.PawnTable.PawnTableOnGUI (Vector2 position) [0x00172] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\PawnTable\PawnTable.cs:138
  at RimWorld.MainTabWindow_PawnTable.DoWindowContents (Rect rect) [0x00028] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\MainButtons\MainTabWindows\MainTabWindow_PawnTable.cs:52
  at Verse.Window+<WindowOnGUI>c__AnonStorey0.<>m__0 (Int32 x) [0x00223] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:202
Verse.Log:Error(String, Boolean) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:78)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32) (at C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:206)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1817)

uphill_ninja

I managed to get the bug to reappear. Seemed to happen with a bugged self tamed event with a gazelle. For some weird reason, the event did not give me a notification letter. Here is a save file with the game window focused on the gazelle in question. If you kill the gazelle, the bug goes away and the animals tabs returns to normal behavior.

https://drive.google.com/open?id=1sTuUX9nTY-HJ14EtYi5agX0wPrNwNFzX

If you try to open the animal tab, all the game's menus freeze unless you click some other menus a couple of times (the mysterious box in the bottom left appears). Before I saved and reopened the game, the animal tab had the same behavior as earlier, animals lose standard order (dogs / pigs / alpacas / etc).

Seems to be linked to this log would be my guess:

QuoteException filling window for RimWorld.MainTabWindow_Animals: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.PawnTable_Animals.<LabelSortFunction>m__0 (Verse.Pawn p) [0x00006] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\PawnTable\PawnTable_Animals.cs:15
  at System.Linq.SortSequenceContext`2[Verse.Pawn,System.Boolean].Initialize (Verse.Pawn[] elements) [0x00000] in <filename unknown>:0
  at System.Linq.QuickSort`1[Verse.Pawn].PerformSort () [0x00000] in <filename unknown>:0
  at System.Linq.QuickSort`1+<Sort>c__Iterator21[Verse.Pawn].MoveNext () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.Pawn].AddEnumerable (IEnumerable`1 enumerable) [0x0001a] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128
  at System.Collections.Generic.List`1[Verse.Pawn]..ctor (IEnumerable`1 collection) [0x00025] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65
  at System.Linq.Enumerable.ToList[Pawn] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at RimWorld.PawnTable.RecachePawns () [0x0002a] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\PawnTable\PawnTable.cs:243
  at RimWorld.PawnTable.RecacheIfDirty () [0x00019] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\PawnTable\PawnTable.cs:229
  at RimWorld.PawnTable.get_Size () [0x00002] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\PawnTable\PawnTable.cs:50
  at RimWorld.MainTabWindow_PawnTable.get_RequestedTabSize () [0x0001d] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\MainButtons\MainTabWindows\MainTabWindow_PawnTable.cs:29
  at RimWorld.MainTabWindow.get_InitialSize () [0x00002] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Defs\DefTypes\MainButton\MainTabWindow.cs:18
  at Verse.Window.SetInitialSizeAndPosition () [0x00009] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:261
  at RimWorld.MainTabWindow.SetInitialSizeAndPosition () [0x00002] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Defs\DefTypes\MainButton\MainTabWindow.cs:48
  at RimWorld.MainTabWindow.DoWindowContents (Rect inRect) [0x00002] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Defs\DefTypes\MainButton\MainTabWindow.cs:43
  at RimWorld.MainTabWindow_PawnTable.DoWindowContents (Rect rect) [0x00000] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\UI\MainButtons\MainTabWindows\MainTabWindow_PawnTable.cs:49
  at Verse.Window+<WindowOnGUI>c__AnonStorey0.<>m__0 (Int32 x) [0x00223] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:202
Verse.Log:Error(String, Boolean) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:78)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32) (at C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:206)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1817)

Mophs

I had the same issue with a boar self taming. The animal tab became a tiny box in the bottom left corner.

Other self tamed animals weren't showing up in the animals tab before the pig made the list vanish.
It might be worth nothing the boar wasn't auto named with a number, i already had 2 and instead of it being wild board 3 it was just called wild boar.

I slaughtered all the self tamed animals and I've got my animal list back, thanks for the workaround uphill_ninja!

GamgeeSC

Is there an easy way to identify which animals might have self-tamed and broken things? I only noticed this when some wild animals I had set to tame showed up around my base; to my knowledge nothing self-tamed recently but it may have been bugged and didn't tell me.

uphill_ninja

Quote from: GamgeeSC on June 24, 2018, 11:04:20 AM
Is there an easy way to identify which animals might have self-tamed and broken things? I only noticed this when some wild animals I had set to tame showed up around my base; to my knowledge nothing self-tamed recently but it may have been bugged and didn't tell me.

Yeah, it seems to self tame without a letter appearing (the blue notification). It's a standard self tamed animal, so it will be set to the unrestricted zone (helpful if you have all your animals set to area 1, the glitched one will be unrestricted). If its something you don't usually tame, jump to the world map and check your animal list when forming a caravan (that's how I found out I had a glitched gazelle).

Grimelord82

I'll just chime in here as well:
Trainer tamed muffalos seem to have caused this error or something near identical for me. It only started on 6/23 or maybe yesterday's latest unstable build.
The Animal tab also re-organized, possibly due to one of my Dromedaries dropping out of full trained status... I'm not completely sure about that, since I can't open the tab anymore, but he did move.