RimWorld

RimWorld

Simple sidearms
Bug with automatic-tool-switching and CombatShields
I'm seeing a bug when a pawn attempts to switch from their weapon to a tool to complete a construction task; the log also mentions CombatShields, though I'm not sure which mod contains the bug:

JobDriver threw exception in preInitActions[0] for pawn Sammy driver=JobDriver_ConstructFinishFrame (toilIndex=1) driver.job=(FinishFrame (Job_9204956) A=Thing_Frame_SynthyleneRefiner2177498) System.NullReferenceException: Object reference not set to an instance of an object at CombatShields.Harmonypatches.PawnHasShieldInInventory (Verse.Pawn pawn) [0x00021] in <23030b47298e42978745ac78b99c12e2>:0 at CombatShields.Harmonypatches.ShieldPatchAddEquipment (Verse.Pawn_EquipmentTracker __instance, Verse.ThingWithComps newEq) [0x00010] in <23030b47298e42978745ac78b99c12e2>:0 at (wrapper dynamic-method) Verse.Pawn_EquipmentTracker.Verse.Pawn_EquipmentTracker.AddEquipment_Patch3(Verse.Pawn_EquipmentTracker,Verse.ThingWithComps) at (wrapper dynamic-method) SimpleSidearms.utilities.WeaponAssingment.SimpleSidearms.utilities.WeaponAssingment.equipSpecificWeapon_Patch1(Verse.Pawn,Verse.ThingWithComps,bool,bool) at SimpleSidearms.utilities.WeaponAssingment.equipSpecificWeaponFromInventory (Verse.Pawn pawn, Verse.ThingWithComps weapon, System.Boolean dropCurrent, System.Boolean intentionalDrop) [0x00001] in <dc8a5df38a4349aeaabc68a715d779e0>:0 at SimpleSidearms.utilities.WeaponAssingment.equipBestWeaponFromInventoryByStatModifiers (Verse.Pawn pawn, System.Collections.Generic.List`1[T] stats) [0x000a6] in <dc8a5df38a4349aeaabc68a715d779e0>:0 at SimpleSidearms.intercepts.Toil_ctor_Postfix+<>c__DisplayClass0_0.<_ctor>b__0 () [0x00112] in <dc8a5df38a4349aeaabc68a715d779e0>:0 at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00157] in <b9022531d79047b2b6baad3f7d519f01>:0 Verse.Log:Warning(String, Boolean) Verse.AI.JobUtility:Verse.AI.JobUtility.TryStartErrorRecoverJob_Patch0(Pawn, String, Exception, JobDriver) Verse.AI.JobDriver:TryActuallyStartNextToil() Verse.AI.JobDriver:ReadyForNextToil() Verse.AI.JobDriver:Notify_PatherArrived() Verse.AI.Pawn_PathFollower:PatherArrived() Verse.AI.Pawn_PathFollower:TryEnterNextPathCell() Verse.AI.Pawn_PathFollower:PatherTick() Verse.Pawn:Verse.Pawn.Tick_Patch1(Pawn) Verse.TickList:Verse.TickList.Tick_Patch0(TickList) Verse.TickManager:Verse.TickManager.DoSingleTick_Patch0(TickManager) Verse.TickManager:TickManagerUpdate() Verse.Game:UpdatePlay() Verse.Root_Play:Verse.Root_Play.Update_Patch1(Root_Play)
< >
Showing 1-1 of 1 comments
SURA Mar 15, 2021 @ 6:44am 
I have same problem with auto-switch. Some pawns just stand still and pushed following error logs. Tried to switch mod orders but nothing helped.
If auto-switch is disabled in mod option, everything was fine.

Exception in RimWorld.ThinkNode_ConditionalColonist TryIssueJobPackage: System.NullReferenceException: Object reference not set to an instance of an object at CombatShields.Harmonypatches.PawnHasShieldInInventory (Verse.Pawn pawn) [0x00021] in <23030b47298e42978745ac78b99c12e2>:0 at CombatShields.Harmonypatches.ShieldPatchAddEquipment (Verse.Pawn_EquipmentTracker __instance, Verse.ThingWithComps newEq) [0x00010] in <23030b47298e42978745ac78b99c12e2>:0 at (wrapper dynamic-method) Verse.Pawn_EquipmentTracker.Verse.Pawn_EquipmentTracker.AddEquipment_Patch2(Verse.Pawn_EquipmentTracker,Verse.ThingWithComps) at SimpleSidearms.utilities.WeaponAssingment.equipSpecificWeapon (Verse.Pawn pawn, Verse.ThingWithComps weapon, System.Boolean dropCurrent, System.Boolean intentionalDrop) [0x002bd] in <131cbe718ce549358c7074e40983b850>:0 at SimpleSidearms.utilities.WeaponAssingment.equipSpecificWeaponFromInventory (Verse.Pawn pawn, Verse.ThingWithComps weapon, System.Boolean dropCurrent, System.Boolean intentionalDrop) [0x00001] in <131cbe718ce549358c7074e40983b850>:0 at SimpleSidearms.utilities.WeaponAssingment.equipSpecificWeaponTypeFromInventory (Verse.Pawn pawn, SimpleSidearms.rimworld.ThingDefStuffDefPair weapon, System.Boolean dropCurrent, System.Boolean intentionalDrop) [0x00061] in <131cbe718ce549358c7074e40983b850>:0 at SimpleSidearms.utilities.WeaponAssingment.equipBestWeaponFromInventoryByPreference (Verse.Pawn pawn, SimpleSidearms.Globals+DroppingModeEnum drop, System.Nullable`1[T] modeOverride, Verse.Pawn target) [0x0047a] in <131cbe718ce549358c7074e40983b850>:0 at SimpleSidearms.rimworld.JobGiver_QuicklySwitchWeapons.TryGiveJobStatic (Verse.Pawn pawn, System.Boolean inCombat) [0x0005a] in <131cbe718ce549358c7074e40983b850>:0 at SimpleSidearms.rimworld.JobGiver_QuicklySwitchWeapons.TryGiveJob (Verse.Pawn pawn) [0x00001] in <131cbe718ce549358c7074e40983b850>:0 at Verse.AI.ThinkNode_JobGiver.TryIssueJobPackage (Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x00000] in <c36f9493c9844ddaa7fb5c788416098f>:0 at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x00022] in <c36f9493c9844ddaa7fb5c788416098f>:0 Verse.Log:Verse.Log.Error_Patch2(String, Boolean) Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams) Verse.AI.ThinkNode_Conditional:TryIssueJobPackage(Pawn, JobIssueParams) Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams) Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.DetermineNextJob_Patch1(Pawn_JobTracker, ThinkTreeDef&) Verse.AI.Pawn_JobTracker:TryFindAndStartJob() Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.EndCurrentJob_Patch2(Pawn_JobTracker, JobCondition, Boolean, Boolean) RimWorld.Pawn_DraftController:RimWorld.Pawn_DraftController.set_Drafted_Patch7(Pawn_DraftController, Boolean) RimWorld.Pawn_DraftController:<GetGizmos>b__13_1() Verse.Command_Toggle:ProcessInput(Event) Verse.GizmoGridDrawer:DrawGizmoGrid(IEnumerable`1, Single, Gizmo&) RimWorld.InspectGizmoGrid:RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor_Patch0(IEnumerable`1, Gizmo&) RimWorld.MainTabWindow_Inspect:DrawInspectGizmos() RimWorld.InspectPaneUtility:ExtraOnGUI(IInspectPane) RimWorld.MainTabWindow_Inspect:ExtraOnGUI() Verse.WindowStack:WindowStackOnGUI() RimWorld.UIRoot_Play:RimWorld.UIRoot_Play.UIRootOnGUI_Patch1(UIRoot_Play) Verse.Root:Verse.Root.OnGUI_Patch1(Root)
< >
Showing 1-1 of 1 comments
Per page: 1530 50