Search Unity

iOS 12 large memory usage

Discussion in 'iOS and tvOS' started by johnfrog, Sep 20, 2018.

Thread Status:
Not open for further replies.
  1. pixelsplit

    pixelsplit

    Joined:
    Sep 16, 2013
    Posts:
    124
    We tried that too and it made no difference (for us).
     
    udede likes this.
  2. GlennSnyder

    GlennSnyder

    Joined:
    Jan 24, 2018
    Posts:
    5
    No update for us either. We've been working directly with Unity in email and have not heard back from them since Thanksgiving. The bug is still persistent in the new versions of iOS and and Unity released over the holidays. Anything with less than a 2gb mem limit crashes the moment the assetbundle is loaded into memory.

    This is for a massive national configuration and sales campaign with a major OEM for their flagship vehicle. This has now caused a 2 month delay in the release of our update and our client is very unhappy with us.

    We are now looking for UE4 solutions as Unity seems to be unable and unwilling to assist.
     
    yanivng, udede, Xander-Davis and 3 others like this.
  3. code-kiwi

    code-kiwi

    Joined:
    Apr 29, 2017
    Posts:
    2
    We fixed the memory issue by using xcode 9.4.1 and building for iOS 11. When running the app, other processes release memory as the game needs more. On iOS 12, the game tries to use the same amount of memory, but other processes dont release it, and the game crashes.

    This will work until the end of march 2019, when apple requires all apps to be built for iOS 12.
     
  4. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,065
    I think the iOS 12 requirement might kick in at the start of March, not the end
     
    Xander-Davis likes this.
  5. jtate5

    jtate5

    Joined:
    Jan 13, 2014
    Posts:
    14
    Thank you for this! Using Xcode 9.4.1 did indeed fix our issue.
     
  6. Jaynesh

    Jaynesh

    Joined:
    Feb 28, 2015
    Posts:
    32
    Unfortunately, that isn't a solution. If you guys build with 9.4.1 and release it, you will then be dealing with a lot of angry users in March when the iOS12 requirement kicks in.
     
    Regone likes this.
  7. Regone

    Regone

    Joined:
    Aug 1, 2014
    Posts:
    26
    Yup.
    On top of it, we only have iOS 12 iPhones on our end - referring to the developers and the clients.
    We did try to downgrade iOS 12 to 11 but it is not downgrade-able without a jailbreak as far as I know.
    So... Xcode 9.4.1 is no go for us.
     
  8. jtate5

    jtate5

    Joined:
    Jan 13, 2014
    Posts:
    14
    Not a permanent solution, but at least a temporary one. Builds in 9.4.1 still work on iOS 12 devices.
     
  9. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    So will Apple just pull the plug on any games not using iOS 12?
     
  10. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    395
    I've managed to get my game running on all iOS / tvOS devices again, DESPITE this bug, by just crushing texture compression virtually all the way down across the entire game. Ridiculous, but it works as a temporary solution (PS: on the latest versions of everything). https://www.astrogun.com/2019/01/10/vast-update-1-0-7-live-patch-notes/

    Shiny new Unity and Xcode! My game ran and looked better A YEAR AGO on OLDER HARDWARE. Awesome.

    But at least this worked.
     
    Last edited: Jan 10, 2019
    Regone likes this.
  11. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,065
    @derkoi If you build your game now in Xcode 9 it will still work in March. Games built without the iOS 12 sdk still work on iOS 12.

    But any new games or updates from March on will need to use Xcode 10, and you will need MacOS 10.13 high Sierra at least to use Xcode 10. So all iOS developers will need to switch to MacOS high Sierra or Mojave in about 7 weeks If you want to keep releasing updates or new games after that date.
     
    Xander-Davis and derkoi like this.
  12. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    Cheers. I'm on High Sierra and released updates with Xcode 10.1 and suffer from this memory issue. Going to go back to Xcode 9.4.1 and see if it solves the issue until I can figure out the next step.
     
    protopop likes this.
  13. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    395
    Last edited: Jan 10, 2019
    yanivng likes this.
  14. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    Awesome.
     
  15. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    Well I rolled back xcode and rebuilt my project and it's working fine on iPhone 5s and iPhone 6 with 220mb memory usage instead of crashing out at 650mb with xcode 10.1
     
    Xander-Davis likes this.
  16. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    395
    Yay! Well... enjoy it till March! ::gulp::
     
  17. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    I don't plan on updating the game again until this issue is fixed so as long as it's working until a fix is found I'm happy. At the moment I have many players unable to play the game.
     
  18. deverolirc

    deverolirc

    Joined:
    Jan 19, 2014
    Posts:
    326
    Does this xCode 9 thing really work? Going to check it out myself and report back.
     
  19. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    Yep. Did for me. You get a few compliance warnings when uploading to Apple but otherwise it's working how it should for me.
     
  20. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    So I just fired up my old iPad mini 2 with iOS 11 installed. It ran my existing game that's released fine, however once I upgraded to iOS 12.1.1 my game crashed whilst loading. I updated the game to my new xcode 9 built test version and it works fine again.

    So I'm releasing my current test version and I'll not update again until this issue is resolved.
     
    protopop likes this.
  21. Jaynesh

    Jaynesh

    Joined:
    Feb 28, 2015
    Posts:
    32
    What makes you guys think this issue will ever be resolved?
     
    MoribitoMT likes this.
  22. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    Nothing. I just hope it will otherwise I can no longer use Unity.
     
    Regone likes this.
  23. Jaynesh

    Jaynesh

    Joined:
    Feb 28, 2015
    Posts:
    32
    They won't fix it. They are completely ignoring this issue. There has been no official reply in over a month. Your project is dead. If you can't fix this on your end, you only have 2 other options. Start something else or move to another engine.
     
  24. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    My game is released and has been for 4 years. I'm due to released on consoles later this year. If it's not fixed then I'll need to look at alternatives.
     
    Regone likes this.
  25. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,065
    Xcode 9 works better, which leads me to believe this is more of an issue with Apple and Xcode than unity.

    Yes using Xcode 9 solves the issue, for the moment.

    But it’s important to remember that in 6 weeks we will all have to use Xcode 10 to submit apps and app updates. There will be no other option because you have to use the iOS 12 sdk.

    And we will all need to be using at least MacOS 10.13 high Sierra, because Xcode 10 does not work on anything less.

    This is definitely a big issue for all iOS developers. And I think once the Xcode 9 app rejections start in 6 weeks there will be a lot more developers looking for a solution.
     
  26. deverolirc

    deverolirc

    Joined:
    Jan 19, 2014
    Posts:
    326
    Hopefully if everyone makes a bit more of a fuss, we can make something happen before that 6 weeks is up.
     
    Regone likes this.
  27. Regone

    Regone

    Joined:
    Aug 1, 2014
    Posts:
    26
    6 weeks? End of march you say?
    I bet its a very very bad April fools joke... HAHA UNITY!

    Anyway, How could we make more fuss?
     
  28. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    262
    Maybe a thread on the Apple developers forum? Threads with a lot of comments seem to attract mods there fairly well. If everyone watching this Unity thread posts on the Apple dev forum, we'd probably have quite a lot of comments.
     
    udede, Regone and derkoi like this.
  29. Regone

    Regone

    Joined:
    Aug 1, 2014
    Posts:
    26
    Sounds like an Awesome place to start with.
    Could anyone make a thread and link us?
     
    udede likes this.
  30. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    62
    Unity why not interested? This is a very important issue!
     
  31. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,065
    I am stil running MacOs 10.12 so i havent tested Xcode 10 yet.

    But earlier in this thread there are links to what appears to be a way to keep using Xcode 9 with IOS 12 support.

    https://stackoverflow.com/questions...ode-9-4-could-not-locate-device-support-files

    and

    https://github.com/sauravexodus/xcode-9-ios-12-support

    Has anyone tested this? If the problem is with Xcode 10 itself, then can use Xcode 9 to upload our games with this 'hack' and still be accepted legitimately into the store and maybe this will solve the memory issue?

    The only other solution i think is to figure out why exactly this problem is happening:
    • Is it a problem with Unity 5.6? 2017? 2018? all versions?
    • Is it a problem with MacOs high sierra? Mojave? All versions?
    • Is it a problem with Xcode 10 only?

    Then we would know if there needs to be a fix by Unity or Apple and can focus our energy in the right place.

    From what I have read in this post, its a problem with Xcode 10, because people on all versions of Unity and on multiple MacOS versions using xcode 9 do not have this problem.
     
  32. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    62


    Hi

    xcode 9.4 ios 12.1 done build but not publish! required xcode 10.1 or later :(
     
  33. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    I published my update with 9.4 on Saturday. Just ignore the warning as it says you may wish to change it,not you have to.

     
  34. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,065
    Maybe if we build it like this in Xcode 9.4 and then use Xcode 10 just to upload it the memory problem won’t be here?

    Did you build an archive in 9.4? Or just test it on a device?
     
  35. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    It might work. I built a project on PC from unity, copied it to my Mac mini,opened it in xcode 9.4 and built and uploaded from there.
     
  36. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    62

    yes build archive required xcode 10.1
     
  37. NatMonney

    NatMonney

    Joined:
    Dec 8, 2014
    Posts:
    3
    Worked 4 full days on trying to optimize our assets and then found this thread! :eek:

    Trying with 9.4.1 now.
     
  38. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,824
    Guys, if you want to force Unity to pay attention to this matter, you need to submit bug reports with repro projects.

    With that said : @PauliusP and @ScottF I think another post from you on this thread would be nice, even if it is to let us know that nothing has changed since last time.
     
  39. GlennSnyder

    GlennSnyder

    Joined:
    Jan 24, 2018
    Posts:
    5
    Great find. Sadly, this doesnt help me as part of the SOW was to update to iOS 12 and ARKit 2.0.

    Atleast now we can point to XCode as the culprit.
     
  40. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,065
    I just want to makes sure I understand. Is this correct? :

    You built your game in unity 2017

    You opened it in Xcode 9.4

    You added iOS 12 compatibility in Xcode 9.4 using the work around in the link above

    You built an archive in Xcode 9.4

    You then tried to upload that 9.4 archive using Xcode 10

    You were given a warning that the upload required an archive built in Xcode 10?

    ——-

    Are these the exact steps you took or were any of them different? And has anyone else tried this?
     
  41. Regone

    Regone

    Joined:
    Aug 1, 2014
    Posts:
    26
    Is it even possible to build to iOS 12 in xcode 9.4? even after spamming the Supported platforms folder with all the versions available the latest version it agreed to export is iOS 11.4 ...
     
  42. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    Do you even read the posts?

     
  43. Regone

    Regone

    Joined:
    Aug 1, 2014
    Posts:
    26
    Hey Derkoi, Thanks for the embracing reply.
    I've just asked if it is even Possible to build & not submit due to udede's posts saying:
    "xcode 9.4 ios 12.1 done build but not publish! required xcode 10.1 or later :("
    &
    "yes build archive required xcode 10.1"

    which is implying that the build does work but not submit.
    It would have helped me to know because I need to build at least for our team's iphones in order to test changes.
    Thanks for being such a polite and understanding community member.

     
  44. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    Sorry. Didn't realise you'd asked that. I think based on the fact that iOS 12 SDK is included in xcode 10.1 and above it wouldn't be possible but you might be able to manually download and set it all up.
     
  45. Regone

    Regone

    Joined:
    Aug 1, 2014
    Posts:
    26
    All cool now <3

    I did try to manually download and set it all up but had no luck...
     
  46. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,065
  47. Regone

    Regone

    Joined:
    Aug 1, 2014
    Posts:
    26
  48. martonekler

    martonekler

    Unity Technologies

    Joined:
    Feb 5, 2015
    Posts:
    30
    Hi All,

    a quick update on this. We are actively investigating this issue and apologies that it is taking so long to resolve.

    At the moment it seems that there are at least two issues:
    1) iOS 12 memory reporting tools has been updated, so you will see different numbers when running same app on iOS 11 or 12 devices. You will see similar pattern when using any Metal application, regardless of the engine being used.
    2) iOS 12 jetsam rules can be the cause for different maximum allowed memory pressure for your apps.

    These issues are slightly connected but still distinct, and the ultimate reason for unexpected termination is 2) and not 1).
    We are working closely with Apple to find a solution for this issue.

    Meanwhile, it would be extremely helpful to file bugreports with repro projects so we would have more projects to investigate.

    Marton
     
  49. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,065
    Thanks for the update:)I hope you can figure it out.
     
  50. unclebob301

    unclebob301

    Joined:
    Jan 29, 2014
    Posts:
    19
    Sorry for your pain guys but thanks for posting this.

    Just updating some legacy applications.

    Have sorted the upgrades to 2018.2 (always stay a little behind the release wave) and the apps are working fine across webgl and android.

    Have run into sudden crashes which look memory related with no change to code including in memory management that was otherwise stable in earlier versions of Xcode and Unity.

    Instead of looking at possible coding errors will be trying building out in Xcode 9.4.1 and see if that fixes the problem.

    Thanks for the heads up as if we don't have the crashing issue then its saved us a lot of time chasing down blind alleys.

    Cheers
    UB
     
Thread Status:
Not open for further replies.