Updating from 3.8.1 to 3.8.6: random IndexOutOfRange errors using GridGraphs

Hello there!

In our game, we arbitrarily generate and destroy GridGraphs, up to as many as nine at a time. Back in version 3.8.1, there weren’t any problems with it, but when we updated to 3.8.6, we started getting these issues:

IndexOutOfRangeException: Array index is out of range.
Pathfinding.PathHandler.GetPathNode (Pathfinding.GraphNode node) (at Assets/Plugins/AstarPathfindingProject/Core/PathHandler.cs:272)
Pathfinding.ABPath.Initialize () (at Assets/Plugins/AstarPathfindingProject/Pathfinders/ABPath.cs:270)
AstarPath+<CalculatePaths>c__Iterator2.MoveNext () (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:2707)
AstarPath.Update () (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:906)
UnityEngine.Debug:LogException(Exception)
AstarPath:Update() (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:913)

Consequently, the there will be an exception at:

Unhandled exception during pathfinding. Terminating.
UnityEngine.Debug:LogError(Object)
AstarPath:Update() (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:914)

The error manifests randomly. Sometimes creating/destroying GridGraphs would work fine, and RVOControllers can use them almost immediately.But you can usually get it after three or four tries.

This also breaks the OnDrawGizmos() method of AstarPath, which I have promptly commented out.

What seems to be the problem and how can this be fixed? Thank you!

Hi

Try to upgrade to 3.8.10. It might already have been fixed https://www.arongranberg.com/astar/download.

Hey, @aron_granberg! I’d love to, but unfortunately my license only gets me as far as version 3.8.6, and I’d rather not purchase the upgrade. Does that mean the fix for this issue is unavailable to me?

Hi

3.8.10 is definitely included in your license.
If you bought it in the Asset Store, just enter your license number in the input field on that page.

Just installed version 3.8.10 and the error no longer occurs! Thanks!

1 Like