Built game crashes after 10+ Scene Loads
Hi there! This is an issue that I realized my game had shown after multiple times of assumed to be random crashes.
The game in editor works just fine, and never shows signs of freezing or the like when loading scenes (i.e., going from scene to scene or reloading current scene).
I did some testing to see exactly when and how the crashes were happening and I noticed that they happened exactly after 10+ scene loads. I would go in my game, walk into an area and enter it, when I enter it, the game loads that area's scene using the (SceneManager.LoadScene(string)) method. And I would then go back to the previous area the same exact way.
I repeat this over and over, going from that scene and back to the other 10 times, and then the game suddenly loads considerably slower than other times, after which the scene that loads the next time would just crash the game before it even loads.
I really tried to figure out what would cause this. Possibly heavy scripts? But I rely a lot on the profiler for that and my scripts are fine. Could it be the DontDestroyOnLoad objects? I'm not sure as most of those seem tame to me. (DOTween manager, Doozy UI graph controller and back button, Corgi Engine's Game Manager) None of them are my own scripts but nothing seems to make sense as to what would make them a possible culprit.
I provided the crash logs, both the player, error log, and also the memory dump (not sure if that last one is actually necessary, I don't understand what it's for)
Any help would be immensely appreciated!
Were you able to solve your issue? We're currently dealing with the exact same problem.
Yes, this was an engine side problem. Check replies. I posted the answer there.
Answer by AHAKuo · Oct 07, 2021 at 12:33 PM
Yes, I solved it.
Updated my unity to version 2020.3.1 LTS from 2020.1.6 and it was gone.
Your answer
Follow this Question
Related Questions
Computer freezes when opening a Unity Scene created on Mac 2 Answers
Main Menu scene crashes my build right after the Unity splash logo ends. 0 Answers
Unity crashes right after i open a project. 0 Answers
My game always crashes when building a standalone release, it fails at "OnPreprocessShaderVariants" 2 Answers