Bug: 3.3.6 - Stack Overflow in RichFunnel

Hi Aron,

I did a search and can’t find this one having been reported, so here it is:
Setup the same same as here: This Post

On the unit, set the funnel as recursive binary and you’ll get the below stack overflow:

(Filename: Assets/AstarPathfindingProject/Core/AstarPath.cs Line: 629)
StackOverflowException: The requested operation caused a stack overflow.
StackOverflowException: The requested operation caused a stack overflow.
RichFunnel.SimplifyPath2 (IRaycastableGraph rcg, System.Collections.Generic.List1 nodes, Int32 start, Int32 end, System.Collections.Generic.List1 result, Vector3 startPoint, Vector3 endPoint) (at Assets/AstarPathfindingProject/Core/AI/RichPath.cs:290)
RichFunnel.SimplifyPath2 (IRaycastableGraph rcg, System.Collections.Generic.List1 nodes, Int32 start, Int32 end, System.Collections.Generic.List1 result, Vector3 startPoint, Vector3 endPoint) (at Assets/AstarPathfindingProject/Core/AI/RichPath.cs:290)
…etc till overflow.

Also semi-related: the funnel isn’t rendering the path it is taking; it leaves the unmodified path as the rendered path on the mesh.

El

Fixed!
Uploaded beta 3.3.7.

Yes, that is because it doesn’t actually calculate the whole path at once. It only calculates the first two corners of it.

In beta 3.3.7 I added a toggle to RichAI -> Show Gizmos which when enabled will draw the path it is following.

Cheers Aron, that’s fast :slight_smile:
I downloaded 3.3.7 but version is still 3.3.6.
Is it still uploading from your side and i’m over eager, or did you choose the wrong file when uploading?

El.

just refreshed. 3.3.8, you are busy today ! :slight_smile:

Confirmed all fixed, and the draw path is looking good too. Cheers Aron.

The 3.3.7 version export was corrupted. I forgot to close the Unity application before running my export script. Unity does not like to have two instances open (one normal and one in batch mode).

3.3.8 should work.

Hi Again Aron, Not sure if to post this bug again but I managed to cause it again.

Same setup as before but to reproduce it, just relocate the target whilst the units are moving.

StackOverflowException: The requested operation caused a stack overflow.
RichFunnel.SimplifyPath3 (IRaycastableGraph rcg, System.Collections.Generic.List1 nodes, Int32 start, Int32 end, System.Collections.Generic.List1 result, Vector3 startPoint, Vector3 endPoint, Int32 depth) (at Assets/AstarPathfindingProject/Core/AI/RichPath.cs:261)

Note this isn’t really causing me any problems, I found I had free time tonight so I thought i’d help debug this release and mess around by creating a small tower defense game at the same time. So if there are others in need of help; help them first.

El

Ah, that is another simplification mode (I note SimplifyPath3, before it was SimplifyPath2). So it seems I need to debug that simplification mode as well… I will get back to you.