Search Unity

macOS player causes out-of-memory

Discussion in 'macOS' started by Codalyn, May 10, 2017.

  1. Codalyn

    Codalyn

    Joined:
    Dec 30, 2014
    Posts:
    41
    Hi there!

    I'm seeing out-of-memory problems with my game on macOS. The OoM only occurs with the player; I can run the game in the editor without any problems and there are absolutely zero indications of any memory leaks. It's all managed code after all! ;)

    The full game needs about 2.5GB of RAM to run, but even a drastically paired down version that needs only ~600 MB suffers from OoM. Oddly, Activity Monitor reports memory pressure is only ~80% when this happens... sense it makes not!

    Anyone else experience something like this? Any thoughts on how to find the cause of this issue? It's driving me mad!

    I'm on Unity 5.5.0f3, btw.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I don't think I've ever seen an OoM error in OS X. I remember them in OS 9, but... wow!

    What exactly does that look like? Do you get a crash log, and if so, what's in that?
     
  3. Codalyn

    Codalyn

    Joined:
    Dec 30, 2014
    Posts:
    41
    No crash log - that would be helpful. Nothing in the Player.log either. Performance reporting is enabled in my game, but no reports on this issue.

    When it happens, the user is presented with this dialog:

    macOS will pause the applications that take up the most amount of memory; unpausing the game, sadly, doesn't work. Only way out of it is to quit. Some users report this happening after only 5-6 minutes, which sucks...
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Wow, yeah, I've never seen that one.

    Some googling turns up others who have run into this... with suggestions such as, it's actually low disk space that's the problem (as you might expect with VM). I was going to suggest you try it on other Macs, but if you're getting this report from users, then that must not be it.

    Grasping at straws here, you might try some of the performance tools to see if your app really is leaking memory.