Open
Description
Issue details
It seems that once the path is found or not found, subsequent calls to PathFinderRequest.search will throw an exception. I was receiving the exception in my game and it took some time to figure out. I would expect that calling search after the path is found or not found would just immediately return true.
Version of gdx-ai and/or relevant dependencies
1.9.6
Stacktrace
Found path
Exception in thread "LWJGL Application" java.lang.ArrayIndexOutOfBoundsException: -1
at com.badlogic.gdx.utils.BinaryHeap.remove(BinaryHeap.java:70)
at com.badlogic.gdx.utils.BinaryHeap.pop(BinaryHeap.java:60)
at com.badlogic.gdx.ai.pfa.indexed.IndexedAStarPathFinder.search(IndexedAStarPathFinder.java:144)
at com.badlogic.gdx.ai.pfa.PathFinderRequest.search(PathFinderRequest.java:88)
at com.mygdx.game.BugExample.render(BugExample.java:26)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)