Hi Aron, I’ve been running into serious stability issues with additively loaded recastgraphs. Interestingly things seemed to slowly be getting worst with recent versions of Unity, until 2020 where I’m getting crashes almost instantly.
I’m not doing any scanning/updating of graphs at runtime. I’m doing all my scanning in the editor, and saving to a byte file. My graphs are fairly large, about 4kx4k dimensions, and can be several megabytes in size.
I’m getting crashes in both my project and a completely empty one with nothing but the pathfinding asset while attempting to additively load a graph. I’ve attempted creating the graph several different ways, but always keeping it fairly large in size. I don’t believe it matters if there are any other AI updates going on (seekers and such).
Also, and I’m not sure if this is relevant, but in previous versions of Unity I noticed that I was more likely to crash if I spun the camera to view any potential graphs on the screen, almost like it was attempting to render the graph and encountering an error. I almost wonder if the graphs are still being updated somehow, based on what’s in the scene?
FYI, this is ONLY with standalone builds… in editor it’s always rock-solid. Very hard to try and debug, though disabling any threads seems to help narrow things down.
Edit: This might not be isolated to DeserializeGraphsAdditive, though that seems to cause more issues than DeserializeGraphs.
I have tried the project you sent me. I can replicate the instant crashes in Unity 2020 with various build parameters but I cannot replicate it in 2019.3. The crashes seem to happen in 2020 inside the memory allocator. From what I can tell this is a Unity bug and not a bug in this package. I see no obvious way to fix it or work around it.
I would suggest that you send the same package that you sent me to Unity so that they can fix the bug.
Hmm, ok I’m glad to know it’s not just me. Would you mind sending it to Unity? You would know better what specific issues they should look for. My instructions are so vague I’d worry they wouldn’t know what to look for.
As for pre-2020, it was a pretty uncommon crash, but I could almost always replicate it in my own project by spinning the camera around, generally in the area where the graph would exist if it were being rendered. Definitely not 2020-levels of instant crashing though.
Hi Aron, minor update. I recently upgraded to 2020.1.0f1 and it seemed to resolve the crashing issues we were running into. So far so good, again thank you for staying on top of this and bugging Unity about it!