Null reference exception when new NPCs performing pathfinding.

rar61 shared this bug 16 hours ago
Investigating

Null pointer to a list can be dereferenced when executing Sandbox.Game.AI.Pathfinding.RecastDetour.MyRDPath.CanReachTarget(Vector3D position, Single thresholdDistance)


Stack trace:

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.MyAstronautActions.IsTargetReachable(MyEntity entity, Vector3D targetPosition)

at SpaceEngineers.Game.AI.MyAstronautActions.FindPlayerWithinDistance(Single radius)

Replies (2)

photo
1

Hello Engineer,

Thank you for reaching out to us, and we’re sorry to hear that you’re experiencing this issue.

To help us investigate and better understand the current situation, could you please share some additional details with us?

Did this issue occur in a Single Player world, a Lobby, or on a multiplayer server? Also, was the world/server modded (with active MODs)?

Are there any reliable steps that cause the game/server to crash every time? If so, and if the issue occurred in a modded world/server, could you please check whether the same issue can be reproduced in a new vanilla (unmodded) world/server by following the same steps?

If the issue can still be reproduced, please share the exact reproduction steps along with the log file from the time the issue occurred in the vanilla/unmodded world/server.

  • You can find and access your log files by typing %appdata% into your Windows search bar and you will be redirected to the hidden Roaming folder. After that just follow: \Roaming\SpaceEngineers.
  • In case you're running your own dedicated server, server log files can be found in the AppData\Roaming\SpaceEngineersDedicated folder.

Kind Regards,

Keen Software House: QA Department

photo
1

Game is vanilla, singleplayer. I cannot reproduce same exact error. Error occurs when you get one of the station NPCs into your ship, fly out of station safezone with an NPC onboard and make the ship static, wait until NPC seats into a seat, make ship dynamic again. When the ship goes dynamic with a seated npc, game can crash. I managed to catch an exception with a debugger, MyRDPathfinding.GetPath() method returns null in some cases. Null is not properly handled in MyRDPath.GetNextTarget() and repeated call will after GetPath() has returned null will cause an exception. And MyRDPath.CanReachTarget() not handles null at all.

Leave a Comment
 
Attach a file