Server crashes when playing in underground base due to Wolves Pathfinding error

Fedello shared this bug 10 hours ago
Submitted

Hey there!


We've run a couple of times into a server crash these days. Each time we checked the logs and there's a NullPointerException. We think it's a problem with the wolf spawn and the pathfinding for the wolves to hunt us. We are building a base under the mountain and I think it crashes when the wolves spawn on top of the mountain and the pathfinding tries to find its way to us.

2026-05-23 23:32:30.037 - Thread:   1 ->  Exception occurred: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Game.AI.Pathfinding.RecastDetour.MyRDPath.CanReachTarget(Vector3D position, Single thresholdDistance)
   at Sandbox.Game.AI.Pathfinding.RecastDetour.MyRDPathfinding.ReachableUnderThreshold(Vector3D begin, IMyDestinationShape end, Single thresholdDistance)
   at SpaceEngineers.Game.AI.MyWolfActions.GetTargetWithPriority(Single radius, MyBBMemoryTarget& outTarget, MyBBMemoryInt& priority)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Sandbox.Game.AI.ActionCollection.<>c__DisplayClass21_0.<ExtractAction>b__1(IMyBot x, Object[] y)
   at Sandbox.Game.AI.ActionCollection.PerformAction(IMyBot bot, MyStringId actionId, Object[] args)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeActionNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeRoot.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeCollection.Update()
   at Sandbox.Game.AI.MyAIComponent.Simulate()
   at Sandbox.Game.World.MySession.UpdateComponents()
   at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime)
   at Sandbox.MySandboxGame.Update()
   at Sandbox.Engine.Platform.Game.UpdateInternal()
   at Sandbox.Engine.Platform.Game.RunSingleFrame()
   at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0()
   at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
   at Sandbox.Engine.Platform.Game.RunLoop()
   at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
   at VRage.Dedicated.DedicatedServer.RunInternal(String instanceName)
   at VRage.Dedicated.DedicatedServer.RunMain(String instanceName, String customPath, Boolean isService, Boolean showConsole, Boolean checkAlive)
   at VRage.Dedicated.DedicatedServer.ProcessArgs(String[] args)
   at VRage.Dedicated.DedicatedServer.Run(String[] args, Action`1 initializeServices)
   at SpaceEngineersDedicated.MyProgram.Main(String[] args)
2026-05-23 23:32:30.037 - Thread:   1 ->  InnerException: 
2026-05-23 23:32:30.037 - Thread:   1 ->  Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Game.AI.Pathfinding.RecastDetour.MyRDPath.CanReachTarget(Vector3D position, Single thresholdDistance)
   at Sandbox.Game.AI.Pathfinding.RecastDetour.MyRDPathfinding.ReachableUnderThreshold(Vector3D begin, IMyDestinationShape end, Single thresholdDistance)
   at SpaceEngineers.Game.AI.MyWolfActions.GetTargetWithPriority(Single radius, MyBBMemoryTarget& outTarget, MyBBMemoryInt& priority)
2026-05-23 23:32:30.038 - Thread:   1 ->  Showing message
2026-05-23 23:32:30.039 - Thread:   1 ->  MyInitializer.OnCrash
2026-05-23 23:32:30.039 - Thread:   1 ->  var exception = System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Game.AI.Pathfinding.RecastDetour.MyRDPath.CanReachTarget(Vector3D position, Single thresholdDistance)
   at Sandbox.Game.AI.Pathfinding.RecastDetour.MyRDPathfinding.ReachableUnderThreshold(Vector3D begin, IMyDestinationShape end, Single thresholdDistance)
   at SpaceEngineers.Game.AI.MyWolfActions.GetTargetWithPriority(Single radius, MyBBMemoryTarget& outTarget, MyBBMemoryInt& priority)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Sandbox.Game.AI.ActionCollection.<>c__DisplayClass21_0.<ExtractAction>b__1(IMyBot x, Object[] y)
   at Sandbox.Game.AI.ActionCollection.PerformAction(IMyBot bot, MyStringId actionId, Object[] args)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeActionNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeControlBaseNode.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeRoot.Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory)
   at Sandbox.Game.AI.BehaviorTree.MyBehaviorTreeCollection.Update()
   at Sandbox.Game.AI.MyAIComponent.Simulate()
   at Sandbox.Game.World.MySession.UpdateComponents()
   at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime)
   at Sandbox.MySandboxGame.Update()
   at Sandbox.Engine.Platform.Game.UpdateInternal()
   at Sandbox.Engine.Platform.Game.RunSingleFrame()
   at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0()
   at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
   at Sandbox.Engine.Platform.Game.RunLoop()
   at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
   at VRage.Dedicated.DedicatedServer.RunInternal(String instanceName)
   at VRage.Dedicated.DedicatedServer.RunMain(String instanceName, String customPath, Boolean isService, Boolean showConsole, Boolean checkAlive)
   at VRage.Dedicated.DedicatedServer.ProcessArgs(String[] args)
   at VRage.Dedicated.DedicatedServer.Run(String[] args, Action`1 initializeServices)
   at SpaceEngineersDedicated.MyProgram.Main(String[] args)
2026-05-23 23:32:30.892 - Thread:   1 ->  
================================== CRASH INFO ==================================
AppVersion: 01_209_024
GameName: Space Engineers
IsOutOfMemory: False
IsGPU: False
IsNative: False
IsTask: False
IsExperimental: False
ProcessRunTime: 117
PCUCount: 32280
IsHang: False
GCMemory: 663
GCMemoryAllocated: 663
HWAvailableMemory: 54062
ProcessPrivateMemory: 2837
AnalyticId: SEDS
================================== OFNI HSARC ==================================

2026-05-23 23:32:30.892 - Thread:   1 ->  Log Closed


I'm attaching the full error log file of the latest crash yesterday. We've since disabled wolfs and no further crashes happened. I've also found this ancient topic in the forum which seems the same issue: https://forum.keenswh.com/threads/multiplayer-build-feedback-thread-scissors.7389522/


I'm also attaching the latest backup from today if it helps debug the issue. It's possible that the wolfs are already disabled in the backup config because it was done after the change.


Feel free to reach me for any additional info you might need!

Leave a Comment
 
Attach a file