GetTraversalCost error after 5.0.3 upgrade

Hi, i’ve upgraded from 5.0.2 to 5.0.3 and now i’ve this error.
Probably a bug from “* Fixed FollowerEntity not taking penalties into account when simplifying its path on grid graphs.”

NullReferenceException: Object reference not set to an instance of an object
Pathfinding.DefaultITraversalProvider.GetTraversalCost (Pathfinding.Path path, Pathfinding.GraphNode node) (at ./Library/PackageCache/com.arongranberg.astar@5.0.3/Core/Pathfinding/ITraversalProvider.cs:102)
Pathfinding.PathTracer.SimplifyGridInnerVertex (Pathfinding.Util.CircularBuffer1[Pathfinding.GraphNode]& nodes, Pathfinding.Util.UnsafeSpan1[T] cornerIndices, Pathfinding.Funnel+PathPart part, Pathfinding.Util.CircularBuffer1[System.Byte]& portalIsNotInnerCorner, System.Collections.Generic.List1[T] alternativePath, System.Int32& alternativeStartIndex, System.Int32& alternativeEndIndex, Pathfinding.NNConstraint nnConstraint, Pathfinding.ITraversalProvider traversalProvider, Pathfinding.Path path, System.Boolean lastCorner) (at ./Library/PackageCache/com.arongranberg.astar@5.0.3/Utilities/PathTracer.cs:1850)
Pathfinding.PathTracer.GetNextCornerIndices (Unity.Collections.NativeArray1[System.Int32]& buffer, System.Int32 maxCorners, Unity.Collections.Allocator allocator, System.Boolean& lastCorner, Pathfinding.ITraversalProvider traversalProvider, Pathfinding.Path path) (at ./Library/PackageCache/com.arongranberg.astar@5.0.3/Utilities/PathTracer.cs:1416) Pathfinding.ECS.RepairPathJob.Execute (Unity.Transforms.LocalTransform& transform, Pathfinding.ECS.MovementState& state, Pathfinding.ECS.AgentCylinderShape& shape, Pathfinding.ECS.AgentMovementPlane& movementPlane, Pathfinding.ECS.DestinationPoint& destination, Pathfinding.ECS.ManagedState managedState, Pathfinding.ECS.MovementSettings& settings, Unity.Collections.NativeList1[T] nextCornersScratch, Unity.Collections.NativeArray`1[System.Int32]& indicesScratch, Unity.Collections.Allocator allocator, System.Boolean onlyApplyPendingPaths) (at ./Library/PackageCache/com.arongranberg.astar@5.0.3/Core/ECS/Jobs/RepairPathJob.cs:119)
Pathfinding.FollowerEntity.SetDestination (Unity.Mathematics.float3 destination, Unity.Mathematics.float3 facingDirection) (at ./Library/PackageCache/com.arongranberg.astar@5.0.3/Core/AI/FollowerEntity.cs:952)
Pathfinding.FollowerEntity.set_destination (UnityEngine.Vector3 value) (at ./Library/PackageCache/com.arongranberg.astar@5.0.3/Core/AI/FollowerEntity.cs:871)
BehaviorDesigner.Runtime.Tasks.Movement.AstarPathfindingProject.IAstarAIMovement.SetDestination (UnityEngine.Vector3 target) (at Assets/Plugins/Behavior Designer Movement/Integrations/Astar Pathfinding Project/Tasks/IAstarAIMovement.cs:34)
BehaviorDesigner.Runtime.Tasks.Movement.AstarPathfindingProject.Wander.TrySetTarget () (at Assets/Plugins/Behavior Designer Movement/Integrations/Astar Pathfinding Project/Tasks/Wander.cs:66)
BehaviorDesigner.Runtime.Tasks.Movement.AstarPathfindingProject.Wander.OnUpdate () (at Assets/Plugins/Behavior Designer Movement/Integrations/Astar Pathfinding Project/Tasks/Wander.cs:48)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <4a24131e73ec49f7805f3dfb6a69fa78>:0)
BehaviorDesigner.Runtime.BehaviorManager.Tick (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree) (at <4a24131e73ec49f7805f3dfb6a69fa78>:0)
BehaviorDesigner.Runtime.BehaviorManager.Tick () (at <4a24131e73ec49f7805f3dfb6a69fa78>:0)
BehaviorDesigner.Runtime.BehaviorManager.Update () (at <4a24131e73ec49f7805f3dfb6a69fa78>:0)

Thanks. That’s indeed a bug due to 5.0.3. I’ll fix it in the next update.

1 Like