kd8lvt / RimWorld-Math

A RimWorld mod
Other
4 stars 3 forks source link

Changing bill drop off stockpile setting causes UI render exceptions #9

Open SumNutz opened 3 months ago

SumNutz commented 3 months ago

What went wrong?

Steps to reproduce:

  1. Build butcher table
  2. Create make kibble bill
  3. Change deliver to setting from "Take to best stockpile" to any other stockpile
  4. Exception occurs

Mods?

mod list.txt

Stack trace from the debug console:

Exception filling window for CrunchyDuck.Math.Dialog_MathBillConfig: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 39F60683]
at CrunchyDuck.Math.Dialog_MathBillConfig.RenderStockpileSettings (Verse.Listing_Standard listing_standard) [0x00051] in <5b04615dba554069af6d7037d2172bbe>:0
at CrunchyDuck.Math.Dialog_MathBillConfig.RenderMiddlePanel (UnityEngine.Rect rect) [0x00017] in <5b04615dba554069af6d7037d2172bbe>:0
at CrunchyDuck.Math.Dialog_MathBillConfig.DoWindowContents (UnityEngine.Rect inRect) [0x00139] in <5b04615dba554069af6d7037d2172bbe>:0
at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x001d3] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
- TRANSPILER Uuugggg.rimworld.TDS_Bug_Fixes.main: IEnumerable`1 TDS_Bug_Fixes.FixWindowDragInsteadOfReorderable:Transpiler(IEnumerable`1 instructions)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch4 (string)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Window.InnerWindowOnGUI_Patch0 (Verse.Window,int)
UnityEngine.GUI:CallWindowDelegate
UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle
SumNutz commented 3 months ago

I'm gonna fire up two quick tests with only Math! and TDS bug fixes and then only Math! see if it still spits out errors

SumNutz commented 3 months ago

confirming that TDS bug fixes is not the issue, Math! itself is throwing errors on UI window rendering

Stack trace

Exception filling window for CrunchyDuck.Math.Dialog_MathBillConfig: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 5060DD9D]
 at CrunchyDuck.Math.Dialog_MathBillConfig.RenderStockpileSettings (Verse.Listing_Standard listing_standard) [0x00051] in <5b04615dba554069af6d7037d2172bbe>:0 
 at CrunchyDuck.Math.Dialog_MathBillConfig.RenderMiddlePanel (UnityEngine.Rect rect) [0x00017] in <5b04615dba554069af6d7037d2172bbe>:0 
 at CrunchyDuck.Math.Dialog_MathBillConfig.DoWindowContents (UnityEngine.Rect inRect) [0x00139] in <5b04615dba554069af6d7037d2172bbe>:0 
 at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x001a6] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)