Game works, Build crashes instantly

Unity 2020.3 / URP 10.4

Hi,
I’m a (little advanced) beginner and searched Youtube tutorials and forums but couldn’t find a solution.

When I play the scene, everything works fine. I got >200 fps and no error messages.

But when I build the game, the scene starts, is there for half a second and it crashes.

I tried removing scene objects one by one and found out, it only happens when I have decent amounts of grass on the terrain. It doesn’t even matter how I place it (Unity tool, Vegetation Studio, Advanced Terrain Grass / Prefabs or Texture2D).

When I build without grass, even with lots of other graphics (trees, buildings, whatever) it works fine.

I tried to make development builds as well but don’t really know how to read something out, couldn’t find good tutorials on that either.

Is this something known?
I don’t even know how to apporach this and I’m thankful for any ideas.

Hey, will you please report a bug for this crash?

To help you we’ll need some more information, specifically the log files and (more importantly) the crash dump. Refer to this Unity Manual doc page for help locating these files (depends on your OS). Based on your description, it sounds like a graphics issue but need more information.

If you post the crash dump and logs to the thread, we might be able to identify the problem.

If you want to debug the crash, refer to “Debugging in the Player” section [of this doc page](http://Debugging in the Player) for help on debugging Unity apps.

Regardless, please file a bug, this could be an issue we don’t know about.
Thanks!

Now I made a build just to get some fresh log files, and, guess what happens, it works absolutely fine. Tried it again with absurd amounts of grass, it works.
You wouldn’t believe how much time I spend trying to build / go back / build again.

Nevertheless, it gives me a lot of confidence to move on, knowing one is not alone. Can’t thank you enough.

What do you mean with Crash dump? I would have send you Player, Package Manager, and Editor logs.

Glad to hear it’s working, although be nice to know why it was crashing in the first place.

What do you mean with Crash dump?

Crash dumps are generated by the Operating Systems which “dumps” the state of a running process to a file of some kind. A crash dump generally includes the native callstack, CPU registers, and some memory. See this site for a general overview of Windows crash dumps. There’s also this doc page for more advanced Windows debugging.

Linux and macOS have different crash dump files, but the concept is the same, and you can find similar info for these platforms.

Unity creates crash dumps automatically via the UnityCrashHandler tool, which I believe is saved to your %TEMP% path. When the Editor or Player crashes, you should see a pop-up dialogue appear to report a crash/bug. This dialogue should show you the location of all the log files and crash dump.

1 Like