I’ve had a long standing bug in the build of my game that I can’t seem to find a workaround for. This same issue occurred since the old github repo version of the navmesh components, all the way up to the latest package versions (which is mostly the same to be fair). For some unknown reason, the game will sometimes either freeze and stop responding (music continues to play), or crash all together while doing it’s multithreaded navigation jobs it looks like. I’m on unity 2021.3.21f1.
This does not seem to affect everyone, but affects enough people that it’s very annoying and definitely would like to fix it. Any idea what could be potentially causing the issue to help narrow it down more? I use standard navmesh agent api calls, but this issue does seem to happen more often in one particular zone in my game so I wonder if it’s something particular to that level layout (the navmesh surface bake looks fine and behaves fine otherwise). Since this is happening in engine code however and does not happen consistently, I have no idea what the actual root issue could be.
Freeze (had to get people to make a dump file of the process that is stuck)
Crash
Bump anyone have any clue what could be the cause? There’s so many different situations that can happen with nav mesh agents it’s hard to even guess where it could be getting hung up.
Bump. I guess unity doesn’t look at this forum anymore? Would be nice to narrow this down even a little. Is it the navmesh or the agents themselves? Got a slightly different callstack today but it still originates from CrowdUpdateMultithreaded. Would be nice to have some information on what this is exactly since google gives nothing. I’m not doing anything crazy from code side for agents, simply using the normal API calls navmesh agent has.
I tried using calculate path instead of set destination and attempted to clear any paths that are invalid (although that should be impossible since calculate path only returns a valid path). No dice though, still get this weird multi-threaded freeze. I didn’t have this issue on older versions of 2021, could it be something introduced with jobs / threading? I’d really appreciate any ideas here even just spitballing. At this point, i’m considering A* pathfinding as a total replacement but it feels silly to gut everything just for this one bug 
For any other poor soul who is having this issue, updating to 2021.3.23f1 seems to have fixed it. The issue in question is:
- Editor: Fixed the project from freezing due to a faulty Raycast operation in the navigation system. (UUM-28701)