Hi,
I have a very strange issue with the builds of my game, and after hours of debugging and profiling I still have no clue what it could be or what to focus on trying next. Here is what I figured out, maybe it could ring a bell for some of you:
- It crashes only in builds.
- It always crashes fast computers (tried on 3 different ones, AMD/NVIDIA doesn’t seem to matter). Slow computers seem to do just fine and don’t seem to crash at all (also tried on 3 different ones)
- It crashes kind of randomly (after loading), usually after a few seconds but could take at least a few minutes (which makes debugging really annoying, since I can’t know if it’s not gonna crash ever or it haven’t crashed yet).
- Nothing in logs other than the normal unity init stuff. It’s not being picked up by the crash handler either.
- The crash does not close the game, it only freezes the frame and stop responding.
- Turning on VSync seems to mostly prevent the crashes (may have still happened once).
- I started the project on 2021.3, upgraded to Unity 6.0 at some point. I didn’t build on 2021, but the crashes happened on multiple versions of Unity 6.0.
- I tried disabling the new Render Graph thing, doesn’t change anything.
- Couldn’t find anything in profiler (even linked to the build on a computer that crash). There are some spikes sometimes but it may be normal at 1000 fps (see below).
- I tried building on another computer, same.
- Nothing out of ordinary in this project, just some custom toon shaders and some render pass (full screen and render objects).
- I work on another, heavier project on the same computers, same versions. This one never crashed.
About the scene:
- I couldn’t really find a meaningful relation between the crashes and the number of objects in scene.
- I tried removing all scripts in scene and all async (so no custom code running at all). Still happens. Just a few models are enough to crash (seems like skinned mesh renderer are the worst offenders).
- I tried building with only with certain models, only skinned mesh renderer, only mesh renderers, only particle system, UI, light/no light. Each time I think I figured which thing might be the issue, it either stops crashing or something else make it crashes when I sanity check…Thus I don’t think it’s a particular shader or mesh but I don’t even know for sure as I’m highly confused.
- Empty scene doesn’t seem to crash (or don’t crash quickly at least).
- Doesn’t seem to matter if another scene load in single or additive mode.
Profiling Spikes just in case:
The only way I found to try stuff is to make changes, build, wait for it to crash or not (except I can never know if it would crash eventually) but it’s quite time consuming. Also, of course it never crashes on my computer, I can only try a few hours at work from time to time. So if you have any idea or tips to help me debug this that would save me so much trouble.

