The path is already pooled

Hello, I am getting an exception randomly when I do ClearPath, what could be the cause? here the exception: ArgumentException: The path is already pooled. at Pathfinding.PathPool.Pool (Pathfinding.Path path) [0x0001e] in D:\Wof_Mst\Library\PackageCache\com.arongranberg.astar@4.3.54\Core\Misc\PathPool.cs:19 at Pathfinding.Path.Release (System.Object o, System.Boolean silent) [0x00068] in D:\Wof_Mst\Library\PackageCache\com.arongranberg.astar@4.3.54\Core\Path.cs:778 at Pathfinding.Seeker.CancelCurrentPathRequest (System.Boolean pool) [0x00038] in D:\Wof_Mst\Library\PackageCache\com.arongranberg.astar@4.3.54\Core\AI\Seeker.cs:200 at Pathfinding.CustomAILerp.ClearPath () [0x00011] in D:\Wof_Mst\Assets\CustomAILerp.cs:750

The exception is given by calling ClearPath which calls seeker.CancelCurrentPathRequest(), this calls Path.Release() and this calls PathPool.Pool(this);

It's important for me to fix this problem because when I get these exceptions, the AI stops working.

It’s important for me to fix this problem because when I get these exceptions, the AI stops working.


Do you have a way to reproduce this exception?

No, it gives me randomly and it is difficult to reproduce

Hmm. Despite me trying to add a bunch of tests, I haven’t been able to replicate it even once. :confused:

I can add information to the exception if it’s worth something to you, tell me what parameters you need to know and the additions for when you receive the exception again I can report it here

I’m not sure what information might help here, to be honest. This is most likely caused by some kind of pooling issue, but they have a tendency to be non-local bugs. I’d ideally need a way to reproduce it.

In the worst case, you can enable ASTAR_NO_POOLING in the Optimizations tab on the A* component. This will disable all pooling and will most likely work around this issue. However, it is a bit less efficient, memory-wise.