- A* version: 5.4.6
- Unity version: 6000.3.15f1
Hi, we’re currently having an issue where, on extremely rare occasions, we get an error that results in a hard crash. We’ve only seen it in builds (Has occurred twice that I know of) and I have not found any to find any way replicating the error.
First we get:
[Exception] System.InvalidOperationException: A node in a RecastGraph contained a connection to a destroyed TriangleMeshNode.
at Pathfinding.HierarchicalGraph+JobRecalculateComponents+<>c.<FindHierarchicalNodeChildren>b__13_0 (Pathfinding.GraphNode neighbour, Pathfinding.HierarchicalGraph+JobRecalculateComponents+Context& context) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Pathfinding/HierarchicalGraph.cs:410
at UnityEngine.InputSystem.Utilities.NamedValue.set_value (UnityEngine.InputSystem.Utilities.PrimitiveValue value) [0x00000] in ./Library/PackageCache/com.unity.inputsystem@21a28c3a6c83/InputSystem/Utilities/NamedValue.cs:22
at Pathfinding.HierarchicalGraph+JobRecalculateComponents.FindHierarchicalNodeChildren (Pathfinding.HierarchicalGraph hGraph, System.Int32 hierarchicalNode, Pathfinding.GraphNode startNode) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Pathfinding/HierarchicalGraph.cs:427
at Pathfinding.HierarchicalGraph+JobRecalculateComponents.Execute () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Pathfinding/HierarchicalGraph.cs:524
at Pathfinding.HierarchicalGraph.RecalculateIfNecessary () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Pathfinding/HierarchicalGraph.cs:554
at Pathfinding.WorkItemProcessor.EnsureValidFloodFill () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Misc/WorkItemProcessor.cs:315
at Pathfinding.WorkItemProcessor.ProcessWorkItems (System.Boolean force, System.Boolean sendEvents) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Misc/WorkItemProcessor.cs:411
at AstarPath.PerformBlockingActions (System.Boolean force) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/AstarPath.cs:932
at AstarPath.Update () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/AstarPath.cs:910
at UnityEngine.Logger.LogException (System.Exception exception, UnityEngine.Object context)
at UnityEngine.Debug.CallOverridenDebugHandler (System.Exception exception, UnityEngine.Object obj)
at Pathfinding.HierarchicalGraph.RecalculateIfNecessary () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Pathfinding/HierarchicalGraph.cs:554
at Pathfinding.WorkItemProcessor.EnsureValidFloodFill () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Misc/WorkItemProcessor.cs:315
at Pathfinding.WorkItemProcessor.ProcessWorkItems (System.Boolean force, System.Boolean sendEvents) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Misc/WorkItemProcessor.cs:411
at AstarPath.PerformBlockingActions (System.Boolean force) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/AstarPath.cs:932
at AstarPath.Update () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/AstarPath.cs:910
Which is then followed by
[Exception] System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Pathfinding.HierarchicalGraph+JobRecalculateComponents.RemoveHierarchicalNode (Pathfinding.HierarchicalGraph hGraph, System.Int32 hierarchicalNode, System.Boolean removeAdjacentSmallNodes) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Pathfinding/HierarchicalGraph.cs:322
at Pathfinding.HierarchicalGraph+JobRecalculateComponents.Execute () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Pathfinding/HierarchicalGraph.cs:492
at Pathfinding.HierarchicalGraph.RecalculateIfNecessary () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Pathfinding/HierarchicalGraph.cs:554
at Pathfinding.WorkItemProcessor.EnsureValidFloodFill () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Misc/WorkItemProcessor.cs:315
at Pathfinding.WorkItemProcessor.ProcessWorkItems (System.Boolean force, System.Boolean sendEvents) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Misc/WorkItemProcessor.cs:411
at AstarPath.PerformBlockingActions (System.Boolean force) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/AstarPath.cs:932
at AstarPath.Update () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/AstarPath.cs:910
at UnityEngine.Logger.LogException (System.Exception exception, UnityEngine.Object context)
at UnityEngine.Debug.CallOverridenDebugHandler (System.Exception exception, UnityEngine.Object obj)
at Pathfinding.HierarchicalGraph.RecalculateIfNecessary () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Pathfinding/HierarchicalGraph.cs:554
at Pathfinding.WorkItemProcessor.EnsureValidFloodFill () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Misc/WorkItemProcessor.cs:315
at Pathfinding.WorkItemProcessor.ProcessWorkItems (System.Boolean force, System.Boolean sendEvents) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/Misc/WorkItemProcessor.cs:411
at AstarPath.PerformBlockingActions (System.Boolean force) [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/AstarPath.cs:932
at AstarPath.Update () [0x00000] in ./Library/PackageCache/com.arongranberg.astar@85d89969624b/Core/AstarPath.cs:910
I’ve looked through our code and can’t see anything obvious that would lead to a destroyed TriangleMeshNode, we don’t create or destroy any connections manually, but we do recalculate the graph occasionally using AStarPath.UpdateGraphs. We also have a large number of NavCuts in our scene, though we use our own NavCut scripts that overrides RequiresUpdate for performance reasons.
Any thoughts or help on this would be appreciated. I’ve seen similar errors in other posts, but can’t find any confirmed cause for this issue.