ITraversal NullReferenceException (v4.3.84)


I have difficulties to implement the ITraversal function CanTraverse(Path path, GraphNode from, GraphNode to). Everytime the path is calculated, an error is thrown in the method CompletePartial l.444 (endNode is null) when I return false.

How can I get rid of this error ?
Thank you!

NullReferenceException: Object reference not set to an instance of an object
Pathfinding.ABPath.CompletePartial () (at ./Packages/com.arongranberg.astar@4.3.84/Pathfinders/ABPath.cs:444)
Pathfinding.ABPath.OnHeapExhausted () (at ./Packages/com.arongranberg.astar@4.3.84/Pathfinders/ABPath.cs:451)
Pathfinding.Path.CalculateStep (System.Int64 targetTick) (at ./Packages/com.arongranberg.astar@4.3.84/Core/Pathfinding/Path.cs:1007)
Pathfinding.Path.Pathfinding.IPathInternals.CalculateStep (System.Int64 targetTick) (at ./Packages/com.arongranberg.astar@4.3.84/Core/Pathfinding/Path.cs:1074)
Pathfinding.PathProcessor.CalculatePathsThreaded (Pathfinding.PathHandler pathHandler, Pathfinding.BlockableChannel`1+Receiver[T] receiver) (at ./Packages/com.arongranberg.astar@4.3.84/Core/Pathfinding/PathProcessor.cs:336)
Pathfinding.PathProcessor:CalculatePathsThreaded(PathHandler, Receiver) (at ./Packages/com.arongranberg.astar@4.3.84/Core/Pathfinding/PathProcessor.cs:386)
Pathfinding.<>c__DisplayClass27_0:b__0() (at ./Packages/com.arongranberg.astar@4.3.84/Core/Pathfinding/PathProcessor.cs:122)

@aron_granberg Any news on that error, is it a known issue with the beta?
We’d like to know as it’s blocking us from continuing with the plugin, and we might have to swap it out with another solution or roll our own as it’s blocking production right now


This indeed looks like a bug. I’ll make sure to fix it in the next beta update.
In the meantime, you should be able to disable calculatePartial to avoid it.
I don’t think it has anything to do with the CanTraverse method as such.