RecasNavMeshModifier MemoryLeak ? (video)

Hey, I just download the asset (A*5.4.5, Unity 6000.3.3f1), tested with a simple configuration like your tutorial video :
RecastGraph, a few obstacles, 1 FollowerEntity, 1 target that the FollowerEntity follows with AIDestinationSetter. Works perfectly fine in a Scene (GameObjects), seems like there’s an issue with RecastNavMeshModifier in Subscene (Entities). There seems to be some sort of memory leak, or at least something that doesn’t seem to be reset between 2 play-modes. From what I understand, this thing is the List containing the NavMeshRecastModifiers.
I have a video showing the problem, but I can’t link it cause I’m a new member, and it’s > 10 MB so I can’t upload it on the topic either, let me know if you want me to post it on the discord. So let me explain : once I start adding a NavMeshRecastModifier to the obstacles, the first Playmode works fine, but the next one gets the error:
MissingReferenceException: The object of type ‘Pathfinding.RecastNavmeshModifier’ has been destroyed but you are still trying to access it.

In CollectRecastNavmeshModifiers() (in the RecastMeshGatherer file) if I modify the for-loop by cycling through the buffer from index 1 instead of 0 (int i = 1), it seems to reset the thing, and then the error reappears at the second playmode.
I also get a MemoryLeak notification upon compiling when modifying the starting index, let me know if you want the Callstack in discord (can’t link it either)

Try uploading to here now :+1: Changed your user level.

Thank you, here’s the video
And the callstack as a .txt

MemoryLeak_CallStack.txt (7.4 KB)

Is the entire map…disappearing something that’s only happening when you see the Astar issue? Like if you remove Astar from this scene, would you see the same disappearing? Basically I’m trying to figure out if Astar error is causing the disappearing or if the disappearing is causing the Astar error.

Oh yeah I’ve never seen the map disappearing like that, only happens with Astar and RecastNavMeshModifier

Ahhh I’m seeing it on my end as well. Yeah I’m fairly certain this is a bug- I’ll tag Aron on this.

My bad about the whole thing I said about CollectRecastNavmeshModifier, the index edit is of no importance lol, it’s just recompiling that allows you to play 1 more time

1 Like

Appreciate that update :slight_smile: