5.4.4 RVO unity crash

I am truly sorry to insist, but I sent you the project with the crash scenario via email; it’s an entirely new project completely empty in HDRP. The only thing running in the project is the A* pathfinding, along with the grid graph and the RVO.

I tested it on four different PCs, and I experienced the crash on all four.

I can’t see how the crash could originate from anywhere other than the package.

This log alone doesn’t explain the crash it merely shows that a path completed successfully, then the editor abruptly stops.

“Shut down. Error reading command from socket.”

This is typically what you see when the Unity process dies (crash, out of memory, killed by the OS, etc.) and the tool communicating with it (Hub, Rider, VS…) loses the connection. The stack trace A* you see is simply the last thing logged before the demise.

A small clarification after an additional test.

I just tried with exactly the same empty project to spawn 15 follower entities at exactly the same place at the same time in a build.

The project doesn’t crash, but I experience a significant drop in performance, and all the follower entities remain exactly in the same spot.

However, if I spawn them with a radius (so not in the same spot), there are no performance issues.

Hi there. Thanks for the patience. I just got a chance to check the project myself and it did indeed crash when I did your steps as described. This is on a RTX 3080, Ryzen 7 3700x. I also, just for my own sanity, did try and spawn the prefabs with RVO disabled on them (and only them, through the Local Avoidance option checkmark) and it didn’t crash.

Alright, I see, so it’s a problem that comes from the RVO of the follower entity? Is it possible that there will be an update soon to fix this problem?

We have a demo in mid-January, and I would like to be able to use the grid graph if possible, although I could always switch to the recast graph, even though in my case there are many advantages to staying with the grid.

Hi

I couldn’t replicate any crash on my computer, but I did see extremely bad performance. After some investigation, I found that some values were getting out of hand because the density of the agents was so high.

Try this in your version of the package:

Open the RVOSystem.cs script and change this line:

var density = area / (MaximumCirclePackingDensity * math.PI * r * r);

to

var density = math.min(1.0f, area / (MaximumCirclePackingDensity * math.PI * r * r));

See if that helps.

Still not sure why it would be crashing, but maybe it ran out of memory or something? I’m not sure.

I’ll include this change in the next update.

I just tried it right now, and everything is working perfectly! I just spawned 500 enemies in the same spot, and there were no crashes at all!

Thank you very much!

2 Likes