Hello, I am currently trying to make an ai path with various floors of a building. However, I keep receiving this error upon pressing scan when using a layered grid graph.
IndexOutOfRangeException: Array index is out of range. Pathfinding.LevelGridNode.ClearConnections (Boolean alsoReverse) (at Assets/AstarPathfindingProject/Generators/LayerGridGraphGenerator.cs:1717) Pathfinding.GraphNode.Destroy () (at Assets/AstarPathfindingProject/Core/Nodes/GraphNode.cs:73) AstarPath.<ScanLoop>m__4 (Pathfinding.GraphNode node) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:1792)
Is this a common error? I can’t seem to figure out what is happening, it seems whenever I make the width or depth longer this error will occur, however changing those in necessary.
Hm… that’s odd.
Do you have some instructions for how I can replicate it?
@aron_granberg
I will place the a* game object, add the pathfinder to it, than whenever I change the Width (nodes) or the Depth (nodes) I instantly receive this error. I have tried replicating this in a scene with only 10 objects and I will not receive this error, however when I try to add this to my main scene, or any scenes with a lot of objects I will constantly get this error. Here’s a quick video of what happens, youtube link
Does anyone else happen to recognize/had this problem before?
bump
bump
Hi
Sorry for the late answer.
I did not manage to replicate it, but I still think I have found both bugs.
Not sure if you can read diffs, but here is it: http://pastebin.com/mRVWkJFz
I could also send you the updated file using a PM if you want.
Cheers and again, sorry for not answering earlier,
Aron
@aron_granberg If you could send me the updated files via pm it would be great thank you :). I’ve actually been busy with some other things recently and hadn’t been focused on getting the AI working for my game. I came back to it and saw this post from almost a month ago :P.
Sorry, didn’t see your comment until now.
I have sent you a PM.
Fantastic!!!
I purchased A* Pathfinding Pro about 18 months ago. Hadn’t used it until tonight. First test, crash. Got this index error.
Grabbed latest version, 3.5.2.
Still crashed
Was about to post to forums. But did the right thing and search first.
Found this thread. Applied the code fix you posted in November.
Hit the scan button and the scan works :-))
Very Happy!!!
Thanks Aron!!!
ps: When do you expect this will be included in your Pro download from this site?
Hi
I think this should be in the latest beta that you can get from http://arongranberg.com/astar/download
(If it is not, it must be lost on some dev branch, which should be corrected as soon as possible).