View Issue Details
|ID||Project||Category||Date Submitted||Last Update|
|0025530||AI War 2||Crash/Exception||Aug 26, 2021 5:49 am||Aug 26, 2021 9:08 am|
|Product Version||Beta 3.603 Last of the Recent Known Regressions|
|Summary||0025530: Crashing upon startup.|
|Description||Sometimes the game would freeze and hang during startup. If you were to select the game during the hang it would crash with no errors.|
|Tags||No tags attached.|
I have gone ahead and sent a new note to unity, the meat of which is:
I'm looking for any open bugs that would affect 2020.3.15f1. The short version is a intermittent freeze on game startup (affecting almost every user, occurs on Win, OSX, and Linux, and only 1 in some dozen cases per user), which dies with no errors if you force kill it, or for some users will crash with no errors when clicked.
This seems like a very clear case of a deadlock in unity jobs. During this particular time, my code is doing the following:
1. Calling coroutines and doing parsing on the main thread in increments.
2. Loading synchronously from asset bundles (previously with async asset bundle loads this problem was even more frequent).
3. Running various Parallel.ForEach() or Parallel.For() methods inside coroutines.
Concurrently, because I use some assets from the unity asset store (Camera.Play, TMPro, post processing, amplify bloom, etc), Resources.Load() is potentially being called in the background from some of those. I don't know the timings on those for sure, but I did adjust the code on a couple of them (mainly Camera.Play) to have fewer Resource calls. There is probably still at least one Shader.Find() call, and there are a few that are calls to Shader.PropertyToID().
This code had been working perfectly in the latest 2019.4 branches, and for the last 4 years on the 2019.x branches and previously 2017.x and 2018.x. I upgraded from 2019.4 to 2020.3 in July, and this problem was observed immediately after. I started reducing async calls, but it has just made the problem more rare, rather than eliminating it.