Vanilla-Expanded / VanillaExpandedFramework

Vanilla Expanded Framework for RimWorld
Other
66 stars 34 forks source link

Error on opening some pawn gizmos #102

Closed KoenLemmen closed 1 month ago

KoenLemmen commented 1 month ago

After the latest update on the workshop I get the following on some pawns, it's rare, but it happens.

Short error:

System.NullReferenceException: Object reference not set to an instance of an object
[Ref 17BB5B7B]
 at MVCF.Commands.Command_VerbTargetExtended.GroupsWith (Verse.Gizmo other) [0x00015] in :0 
 at Verse.GizmoGridDrawer.DrawGizmoGrid (System.Collections.Generic.IEnumerable`1[T] gizmos, System.Single startX, Verse.Gizmo& mouseoverGizmo, System.Func`2[T,TResult] customActivatorFunc, System.Func`2[T,TResult] highlightFunc, System.Func`2[T,TResult] lowlightFunc, System.Boolean multipleSelected) [0x0006f] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
 at RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor (System.Collections.Generic.IEnumerable`1[T] selectedObjects, Verse.Gizmo& mouseoverGizmo) [0x001f7] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
     - TRANSPILER UnlimitedHugs.AllowTool: IEnumerable`1 AllowTool.Patches.InspectGizmoGrid_DrawInspectGizmoGridFor_Patch:ClearReverseDesignators(IEnumerable`1 instructions)
     - TRANSPILER PerformanceOptimizer.Main: IEnumerable`1 PerformanceOptimizer.Optimization_InspectGizmoGrid_DrawInspectGizmoGridFor:InspectGizmoGrid_DrawInspectGizmoGridForTranspiler(IEnumerable`1 instructions)
     - TRANSPILER fluffy.blueprints: IEnumerable`1 Blueprints.Patch_InspectGizmoGrid_DrawInspectGizmoGridFor:Transpiler(IEnumerable`1 _instructions) currentSelectable: null
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch6 (string)
Verse.Log:ErrorOnce (string,int)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor_Patch0 (System.Collections.Generic.IEnumerable`1<object>,Verse.Gizmo&)
RimWorld.MainTabWindow_Inspect:DrawInspectGizmos ()
RimWorld.InspectPaneUtility:ExtraOnGUI (RimWorld.IInspectPane)
RimWorld.MainTabWindow_Inspect:ExtraOnGUI ()
Verse.WindowStack:WindowStackOnGUI ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.UIRoot_Play.UIRootOnGUI_Patch4 (RimWorld.UIRoot_Play)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root.OnGUI_Patch2 (Verse.Root)

In the error I see 3 transpilers, so I also ran the game in various configurations without AllowTool, PerformanceOptimizer, and Blueprints (forked, not the original one) but the error persisted.

Looking at the commits I think it might be because of the recent commit https://github.com/Vanilla-Expanded/VanillaExpandedFramework/commit/6ddbdf2030fc0a868583507fd253b5472d665a64 because I haven't seen this error before and the changed method is the one in the error.

The game is very modded, so it may very well be something in my game, however due to the recent emergence of this bug and the latest commit, I think they might be related. Here are the full logs: https://gist.github.com/HugsLibRecordKeeper/4ca1be65797de9181a9607afdc8891b1

Thanks.

KoenLemmen commented 1 month ago

I tested it with the previous MVCF.dll and the bug is not present one commit ago.

juanosarg commented 1 month ago

Thanks, will null check to avoid this

Sylonin commented 1 month ago

Is there a way to use an old version when using steam workshop?

KoenLemmen commented 1 month ago

Thanks, seems to be fixed