Recursive Error - Stack Overflow


#1

I’ve been getting an error in A* and I’m not really sure what’s causing it. It seems to happen fairly frequently in our play testing, it always spits out the same 4 errors in-order. Version 4.1.16 Pro, recast graph. Each NPC is using the following components:

RichAI
RVO Controller
Seeker
Funnel Modifier
Simple Smooth Modifier
Radius Modifier
Raycast Modifier
AI Destination Setter

NullReferenceException: Object reference not set to an instance of an object
Pathfinding.TriangleMeshNode.SharedEdge (Pathfinding.GraphNode other) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:304)
Pathfinding.TriangleMeshNode.GetPortal (Pathfinding.GraphNode toNode, System.Collections.Generic.List`1 left, System.Collections.Generic.List`1 right, Boolean backwards, System.Int32& aIndex, System.Int32& bIndex) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:326)
Pathfinding.TriangleMeshNode.GetPortal (Pathfinding.GraphNode toNode, System.Collections.Generic.List`1 left, System.Collections.Generic.List`1 right, Boolean backwards) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:313)
Pathfinding.RichFunnel.UpdateFunnelCorridor (Int32 splitIndex, System.Collections.Generic.List`1 prefix) (at Assets/AstarPathfindingProject/Core/AI/RichPath.cs:366)
Pathfinding.RichFunnel.ClampToNavmeshInternal (UnityEngine.Vector3& position) (at Assets/AstarPathfindingProject/Core/AI/RichPath.cs:554)
Pathfinding.RichFunnel.ClampToNavmesh (Vector3 position) (at Assets/AstarPathfindingProject/Core/AI/RichPath.cs:403)
Pathfinding.RichAI.ClampToNavmesh (Vector3 position, System.Boolean& positionChanged) (at Assets/AstarPathfindingProject/Core/AI/RichAI.cs:393)
Pathfinding.AIBase.FinalizePosition (Vector3 nextPosition) (at Assets/AstarPathfindingProject/Core/AI/AIBase.cs:548)
Pathfinding.AIBase.FinalizeMovement (Vector3 nextPosition, Quaternion nextRotation) (at Assets/AstarPathfindingProject/Core/AI/AIBase.cs:509)
Pathfinding.AIBase.FixedUpdate () (at Assets/AstarPathfindingProject/Core/AI/AIBase.cs:338)

StackOverflowException: The requested operation caused a stack overflow.
Pathfinding.TriangleMeshNode.UpdateRecursiveG (Pathfinding.Path path, Pathfinding.PathNode pathNode, Pathfinding.PathHandler handler) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:223)
Pathfinding.TriangleMeshNode.UpdateRecursiveG (Pathfinding.Path path, Pathfinding.PathNode pathNode, Pathfinding.PathHandler handler) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:223)
Pathfinding.TriangleMeshNode.UpdateRecursiveG (Pathfinding.Path path, Pathfinding.PathNode pathNode, Pathfinding.PathHandler handler) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:223)
Pathfinding.TriangleMeshNode.UpdateRecursiveG (Pathfinding.Path path, Pathfinding.PathNode pathNode, Pathfinding.PathHandler handler) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:223)
Pathfinding.TriangleMeshNode.UpdateRecursiveG (Pathfinding.Path path, Pathfinding.PathNode pathNode, Pathfinding.PathHandler handler) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:223)
Pathfinding.TriangleMeshNode.UpdateRecursiveG (Pathfinding.Path path, Pathfinding.PathNode pathNode, Pathfinding.PathHandler handler) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:223)
Pathfinding.TriangleMeshNode.UpdateRecursiveG (Pathfinding.Path path, Pathfinding.PathNode pathNode, Pathfinding.PathHandler handler) (at Assets/AstarPathfindingProject/Generators/NodeClasses/TriangleMeshNode.cs:223)
Pathfinding.TriangleMeshNode.UpdateRecursiveG (Pathfinding.Path path, Pathfinding.PathNode pathNode, Pathfinding.PathHandler handler) (at Assets/AstarPathfindingProject/<message truncated>
Unhandled exception during pathfinding. Terminating.
UnityEngine.Debug:LogError(Object)
Pathfinding.PathProcessor:CalculatePathsThreaded(PathHandler) (at Assets/AstarPathfindingProject/Core/Misc/PathProcessor.cs:384)
Pathfinding.<PathProcessor>c__AnonStorey1:<>m__0() (at Assets/AstarPathfindingProject/Core/Misc/PathProcessor.cs:95)

Error : This part should never be reached.
UnityEngine.Debug:LogError(Object)
Pathfinding.PathProcessor:CalculatePathsThreaded(PathHandler) (at Assets/AstarPathfindingProject/Core/Misc/PathProcessor.cs:390)
Pathfinding.<PathProcessor>c__AnonStorey1:<>m__0() (at Assets/AstarPathfindingProject/Core/Misc/PathProcessor.cs:95)