We are using recast graph in our game and everything was working fine, but today we found out that sometimes pathfindings brokes with 999+ errors in just random moments. On the same game level mostly everything works fine, but sometimes it’s just brokes.
There is the first exception (appears randomly):
ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary2[TKey,TValue].FindEntry (TKey key) [0x00008] in <47fc8c70fa834cbf8141d7c1a7589125>:0 at System.Collections.Generic.Dictionary
2[TKey,TValue].get_Item (TKey key) [0x00000] in <47fc8c70fa834cbf8141d7c1a7589125>:0
at Pathfinding.RichFunnel.ClampToNavmeshInternal (UnityEngine.Vector3& position) [0x00197] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\RichPath.cs:607
at Pathfinding.RichFunnel.ClampToNavmesh (UnityEngine.Vector3 position) [0x00020] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\RichPath.cs:462
at Pathfinding.RichAI.ClampToNavmesh (UnityEngine.Vector3 position, System.Boolean& positionChanged) [0x00022] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\RichAI.cs:476
at Pathfinding.AIBase.FinalizePosition (UnityEngine.Vector3 nextPosition) [0x000ad] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\AIBase.cs:666
at Pathfinding.AIBase.FinalizeMovement (UnityEngine.Vector3 nextPosition, UnityEngine.Quaternion nextRotation) [0x0000f] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\AIBase.cs:627
at Pathfinding.AIBase.FixedUpdate () [0x00033] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\AIBase.cs:452
After this we have infinite numbers of NullReference:
(Filename: Assets/AstarPathfindingProject/Core/AI/AIBase.cs Line: 452)
NullReferenceException: Object reference not set to an instance of an object
at Pathfinding.RichFunnel.ClampToNavmeshInternal (UnityEngine.Vector3& position) [0x00133] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\RichPath.cs:589
at Pathfinding.RichFunnel.ClampToNavmesh (UnityEngine.Vector3 position) [0x00020] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\RichPath.cs:462
at Pathfinding.RichAI.ClampToNavmesh (UnityEngine.Vector3 position, System.Boolean& positionChanged) [0x00022] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\RichAI.cs:476
at Pathfinding.AIBase.FinalizePosition (UnityEngine.Vector3 nextPosition) [0x000ad] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\AIBase.cs:666
at Pathfinding.AIBase.FinalizeMovement (UnityEngine.Vector3 nextPosition, UnityEngine.Quaternion nextRotation) [0x0000f] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\AIBase.cs:627
at Pathfinding.AIBase.FixedUpdate () [0x00033] in C:\Unity Projects\Hypercore-shooter\Assets\AstarPathfindingProject\Core\AI\AIBase.cs:452
What can be wrong? We are using version 4.2.18.