RimWorld

RimWorld

Allow Tool
System.NullReferenceException: Object reference not set to an instance of an object
System.NullReferenceException: Object reference not set to an instance of an object
at Verse.GridsUtility.Fogged (Verse.IntVec3 c, Verse.Map map) [0x00000] in <c81fc4e5348f4e9480b5f4bc7b581f3d>:0
at AllowTool.Designator_HaulUrgently.ThingIsRelevant (Verse.Thing thing) [0x00015] in <d3e3fec3eced4dceb8190139680bcabd>:0
at AllowTool.Designator_HaulUrgently.CanDesignateThing (Verse.Thing t) [0x00001] in <d3e3fec3eced4dceb8190139680bcabd>:0
at (wrapper dynamic-method) Verse.Designator.Verse.Designator.CreateReverseDesignationGizmo_Patch3(Verse.Designator,Verse.Thing)
at (wrapper dynamic-method) RimWorld.InspectGizmoGrid.RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor_Patch0(System.Collections.Generic.IEnumerable`1<object>,Verse.Gizmo&) currentSelectable: null
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string)
Verse.Log:ErrorOnce (string,int)
(wrapper dynamic-method) RimWorld.InspectGizmoGrid: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) RimWorld.UIRoot_Play:RimWorld.UIRoot_Play.UIRootOnGUI_Patch1 (RimWorld.UIRoot_Play)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
< >
Showing 1-15 of 15 comments
Choosechee 3 Dec, 2022 @ 1:52pm 
I keep getting these errors too! Someone please help!
Dyantier 13 Dec, 2022 @ 6:47am 
Also getting this error. I'm gonna try disabling Haul Urgently or PUAH, because I heard those may cause issues with this mod.
anheye 18 Dec, 2022 @ 10:58pm 
same
Lightja 7 Jan, 2023 @ 1:41pm 
This error is thrown when determining if AllowTool will draw the "Haul Urgently" icon when a thing is selected.

private bool ThingIsRelevant(Thing thing) => thing.def != null && !thing.Position.Fogged(thing.Map) && (thing.def.alwaysHaulable || thing.def.EverHaulable) && !thing.IsInValidBestStorage();

!thing.Position.Fogged(thing.Map) being the specific function throwing the error. That function is part of the base game. I reported the bug to the developers but if UnlimitedHugs wants to temporarily resolve the issue, they could remove the Fogged check from this function and I think it would have minimal impact, but its not a perfect solution.
Xtrem532 21 Mar, 2023 @ 7:20am 
I get those when something designanted to be hauled urgently gets picked up by a pawn while I have the item still selected

Exception in RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor: System.NullReferenceException: Object reference not set to an instance of an object
at Verse.GridsUtility.Fogged (Verse.IntVec3 c, Verse.Map map) [0x00000] in <38562b1a2ab64eacb931fb5df05ca994>:0
at AllowTool.Designator_HaulUrgently.ThingIsRelevant (Verse.Thing thing) [0x00015] in <d3e3fec3eced4dceb8190139680bcabd>:0
at AllowTool.Designator_HaulUrgently.CanDesignateThing (Verse.Thing t) [0x00001] in <d3e3fec3eced4dceb8190139680bcabd>:0
at Verse.Designator.CreateReverseDesignationGizmo (Verse.Thing t) [0x00017] in <38562b1a2ab64eacb931fb5df05ca994>:0
- postfix UnlimitedHugs.AllowTool: Void AllowTool.Patches.Designator_CreateReverseDesignationGizmo_Patch:CreateReverseDesignationGizmo_Postfix(Designator __instance, Command_Action __result)
at RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor (System.Collections.Generic.IEnumerable`1[T] selectedObjects, Verse.Gizmo& mouseoverGizmo) [0x0015e] in <38562b1a2ab64eacb931fb5df05ca994>:0
- transpiler net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)
- transpiler UnlimitedHugs.AllowTool: IEnumerable`1 AllowTool.Patches.InspectGizmoGrid_DrawInspectGizmoGridFor_Patch:ClearReverseDesignators(IEnumerable`1 instructions)
Getting this error as well:
System.NullReferenceException: Object reference not set to an instance of an object
at Verse.GridsUtility.Fogged (Verse.IntVec3 c, Verse.Map map) [0x00000] in <3cca3e6203e64b109fd8ce21f7120d03>:0
at AllowTool.Designator_HaulUrgently.ThingIsRelevant (Verse.Thing thing) [0x00015] in <d3e3fec3eced4dceb8190139680bcabd>:0
at AllowTool.Designator_HaulUrgently.CanDesignateThing (Verse.Thing t) [0x00001] in <d3e3fec3eced4dceb8190139680bcabd>:0
at (wrapper dynamic-method) Verse.Designator.Verse.Designator.CreateReverseDesignationGizmo_Patch1(Verse.Designator,Verse.Thing)
at (wrapper dynamic-method) RimWorld.InspectGizmoGrid.RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor_Patch0(System.Collections.Generic.IEnumerable`1<object>,Verse.Gizmo&) currentSelectable: null
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.Log:ErrorOnce (string,int)
(wrapper dynamic-method) RimWorld.InspectGizmoGrid: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 ()
RimWorld.UIRoot_Play:UIRootOnGUI ()
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
bonesbro 13 Apr, 2023 @ 5:09pm 
You get a 100% repro with this when you click on a pawn being carried by another pawn, for example a baby being carried by a mother.
bonesbro 13 Apr, 2023 @ 5:13pm 
Based on decompilation, I think you can fix the crash by nullchecking thing.Map and returning false on it.
Angrysquirrel 2 May, 2023 @ 10:12am 
Checked my player.log and found this was a cause of my red errors. It sucks because I now have to choose between allow tool (with haul urgently) and pickup and haul. The biggest things after s raid for me. Allow everything and haul urgently.
Last edited by Angrysquirrel; 2 May, 2023 @ 2:00pm
Tsunderecracker 14 May, 2023 @ 10:32am 
Originally posted by bonesbro:
Based on decompilation, I think you can fix the crash by nullchecking thing.Map and returning false on it.

I think I can confirm this fixes that issue. I tried that change and recompiled the 1.4 dll,[www.dropbox.com] and I haven't gotten the error again in ~6 hours of play.
Nothing seems to have changed functionality-wise in regards to Haul Urgently so far as I've noticed. I linked it if anyone else wants to try it -- back up your original dll first, I can't guarantee this is a fix.
Last edited by Tsunderecracker; 14 May, 2023 @ 10:39am
Poindexter1985 1 Jun, 2023 @ 7:05am 
The DLL shared by tsunderecracker also seems to have stopped the errors for me.
Getting the same error. Just going to disable the Haul urgently option, I rarely use it anyway, hopefully it clears up the issue, though it appears to be more of a nuisance error rather than anything major
Stormtail 15 Oct, 2023 @ 5:47pm 
Seems just disabling the Haul Urgent option (Since you can) doesn't fix this, thought it might but just letting everyone else know beforehand. Going to try that dll now :)
gh0stashes 6 Nov, 2023 @ 11:03pm 
I just started having this error. The DLL did not work and it is preventing me from drafting pawns when I select them. Game is unplayable with this mod now but so painful without it. :(
note that this error happens on all Things that are being carried if the player has the Thing selected as it is being picked up, even if they weren't designated for Haul Urgently
< >
Showing 1-15 of 15 comments
Per page: 1530 50