Search Unity

Giant spikes in profiler are causing the game to crash on Xbox and PS4

Discussion in 'Editor & General Support' started by Blackshamrocker, Aug 17, 2018.

  1. Blackshamrocker

    Blackshamrocker

    Joined:
    Nov 2, 2016
    Posts:
    8
    Hey!

    So we have our game split into a number of scenes - a master scene, a logic scene, map scenes, and a UI scene. On game start we load each scene asynchronously in that order.

    In Editor, and on PC builds (normal and UWP app), it works fine. However, when deployed to PS4 or Xbox One, we've recently started having an issue where the game crashes during loading. The culprit seems to be a huge single frame (approximately) spike in the profiler while loading the last scene, the UI scene. (The following profiler is from the editor. My issue getting the profiler to attach to the Xbox one build is a whole different story)



    When the game hits this frame on Xbox it just crashes back to the dev menu.

    Replacing the UI scene with an empty scene lets us load in, so it seems very likely it's because of something in the UI scene. However the weird part is it doesn't seem very divisible - removing part of the UI scene does not reduce the size of this spike.

    We've tried a few UI optimization techniques to no avail. We're shrinking textures, we broke up canvases a bunch. We've tried adding our UI prefabs to the preloaded assets list.

    The strange thing is that this just started happening at one point. We think we must have hit some tipping point in terms of the amount of assets we're loading in a single frame, but at this point we're at a loss for our next step. The issue started around the time we first added animations to our UI, but removing every animator from the scene also doesn't change anything!

    Is there any more information I can provide? Is anything in the profiler screenshot above indicative of some obvious problem? Thanks.