Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

iOS 7.1 iPhone 4 Incredibly Slow Startup - AFFECTS GAMES IN STORE AND DEVELOPMENT

Discussion in 'iOS and tvOS' started by thedackattack, Mar 7, 2014.

  1. thedackattack

    thedackattack

    Joined:
    Jun 4, 2013
    Posts:
    7
    Has anyone else tried out iOS 7.1 on an iPhone 4? I noticed it took a long time for my game to start (30+ seconds). I tried downloading Unity games from the app store and I found that the average loading time was GREATER than 20 seconds, where games not made with Unity seem to take the same amount of time to start.

    This seems like an INCREDIBLY serious issue, since it affects ALL Unity games ever released in the app store. Does anyone know if this is being addressed?
     
  2. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Ask the QA - I think this be a point release after 7.1 is out
     
  3. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    Did you try non-unity but bigger games like real racing, nfs most wanted, etc ?
     
  4. thedackattack

    thedackattack

    Joined:
    Jun 4, 2013
    Posts:
    7
    I did try out different games made with and without Unity. Games not made with Unity actually seemed to load faster, while Unity games took around 3-5x longer to load.

    I am not sure if everyone is in the same boat, but the iPhone 4 is still a very active device for the apps I've put out. This will likely affect a lot more people than just me, unless the games you have put out are not available for the iPhone 4.
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    I can confirm this. Our Unity game on an iPhone 4 running 7.1 takes ages to load now (3x longer load time to what I'm used to. Makes a "bearable" 5 second load to a "is my device frozen" 15+ seconds load).

    Are we sure it is specific to iPhone 4? I can't test on anything other than a 4 now, but I'm guessing it could affect other devices as well.
     
  6. thedackattack

    thedackattack

    Joined:
    Jun 4, 2013
    Posts:
    7
    I don't have many other devices to test with, but I don't see the issue on an iPad 2 or an iPhone 5. With iOS 7.1 live, I was hoping to get some attention from people at Unity to fix this problem.
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Have you made a bug report?

    Edit: I tested on an iPad 4. I timed the load time before updating to 7.1 and after. They were identical, so I think we can conclude it's specific to the iPhone 4. Although testing on a 4S would be interesting.
     
    Last edited: Mar 11, 2014
  8. escic

    escic

    Joined:
    Aug 6, 2013
    Posts:
    42
    Same problem here. 25seconds load time before 7.1 and now can't load the same level...
     
    Last edited: Mar 12, 2014
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    I submitted a bug report, it's Case 596208.
     
  10. Engidia_EduardBosch

    Engidia_EduardBosch

    Joined:
    Nov 14, 2013
    Posts:
    25
    Same problema here with iPhone 4.

    Hope they fix it soon.

    Thanks
     
  11. Rikland

    Rikland

    Joined:
    Mar 7, 2014
    Posts:
    5
    I can't find that bug report in the issue tracker. Do you have a link?
     
  12. Engidia_EduardBosch

    Engidia_EduardBosch

    Joined:
    Nov 14, 2013
    Posts:
    25
    I didn't find that too. I would like to vote also.

    Thanks
     
  13. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    We are looking into it on our side. And we also submitted bug report to Apple, because it also affects pre-existing App Store apps.
     
  14. sparrow

    sparrow

    Joined:
    May 6, 2012
    Posts:
    17
    I can confirm this for iPhone 4. Loading time before 7.1 was 30 seconds and after 90 seconds
     
  15. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    The bug report is not on the issue tracker because it has to be manually put there from someone from Unity first. The original bug tracker is not open to voting.

    Did anyone check if the slow loading happens on 3.5 projects? I'll check that soon.

    It's probably an Apple bug, but I'm guessing it has to do with the way Unity does things specifically since it seems to only affect Unity games and other games from other engines seem unaffected.
     
  16. James Luang

    James Luang

    Joined:
    Mar 18, 2014
    Posts:
    1
    Same problem, and it fatal crash/hang when loading into the scene in our game.
     
  17. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Hi Everyone,

    I believe we have proof of concept workaround for this issue. There are basic instructions how to try it on you project:
    1. Open main.mm file in your Xcode project.
    2. Locate there very first line
    3. Right after it insert these two new lines of code:
    4. Locate following line below in the file
    5. Insert following code right ABOVE it:
    6. Save file and hit build in Xcode.

    Note: this is proof of concept code, something might go wrong (TM) :) It intercepts creation of new threads and sets their scheduling policy to FIFO.
    Please keep posted if it helped you.
    Thanks!
     
  18. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    I tried the code. It definitely loads faster now, although I am under the impression it's still not as fast as it was prior to iOS 7.1. Although that's just a "feeling". I'll try to roll back to iOS 7 and actually time the load times so I have some actual numbers to back it up.

    In any case, the load times seem reasonable now, so the proof of concept workaround seems like a success to me.
     
  19. hutch_jl

    hutch_jl

    Joined:
    Jan 8, 2013
    Posts:
    40
    I am getting this also, and similarly to James Luang we have the significantly worse issue that calling Application.LoadLevel hangs the game. It never comes back from:

    #12 0x00d3133c in PreloadManager::WaitForAllAsyncOperationsToComplete() at /Applications/buildAgent/work/ea95e74f6e5f192d/Runtime/Misc/PreloadManager.cpp:523

    This is iPhone 4 iOS 7.1 only. This hang still occurs with the workaround code posted above.
     
  20. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Please submit your project as bug report.
    Thanks!
     
  21. hutch_jl

    hutch_jl

    Joined:
    Jan 8, 2013
    Posts:
    40
    Hi Mantas,

    I'll try to get a minimal repro for you. In the meantime if anyone else is having the same issue I've found that calling Application.LoadLevel() after calling any of the async versions causes the hang (we use LoadLevelAdditiveAsync a lot). If I replace our use of LoadLevel with LoadLevelAsync then the hang doesn't occur.
     
  22. Rikland

    Rikland

    Joined:
    Mar 7, 2014
    Posts:
    5
    After trying this code in my project, I am under the impression that the app loads as fast as before I upgraded my iPhone 4 to iOS 7.1. Thank you!
     
  23. kakapro

    kakapro

    Joined:
    Nov 6, 2013
    Posts:
    2
    Hi,
    I have same problem with d00fus and James Luang. Game is hang when loading new level.

    Pls check it!
     
  24. eriihine2

    eriihine2

    Joined:
    Mar 16, 2013
    Posts:
    8
    I ran in to this problem when I started receiving bad reviews for my published game from the users (claiming that my game takes several minutes to start on iPhone4/7.1.).

    Good thing is that the workaround proposed in this thread seemed to solve the problem and bring the startup time back to 30+ seconds.

    Thanks for the person who posted the workaround !
     
  25. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    So far got only one repro project that demonstrates hang-up problem. We are looking into it, but few more repro cases would be also very useful. If you have published games on the App Store that exhibit hang-up (not just slow loading) issue, please also share itunes link. Thanks!
     
  26. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    Does this bug affects builds with Unity 4.2.2? I have tried my game on iPhone4, 7.1 and it seems like normal. (built with 4.2.2)
     
  27. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    I was able to reproduce slow loading problem as early as with Unity 3.5.x. Severity of the issue seems to be game content specific.
     
  28. Holymars

    Holymars

    Joined:
    Mar 4, 2013
    Posts:
    4
    I can confirm with d00fus and kakapro's problem in our published game.
    App Store link: https://itunes.apple.com/tw/app/cytus/id485246824

    Just like d00fus says, calling Application.LoadLevel() after calling Application.LoadLevelAsync() causes the hang.
    The problem only occurs on iphone4 with ios7.1.

    If we replace all LoadLevel with LoadLevelAsync then the problem doesn't occur.
     
  29. hutch_jl

    hutch_jl

    Joined:
    Jan 8, 2013
    Posts:
    40
    Sorry I am a bit busy with a release but I will try to get this repro for you Mantas, as Heromars says it seems to require that you mix use of LoadLevel and LoadLevelAsync. I can hopefully get something this week for you.
     
  30. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Will the bug fix be released with 4.5 version of Unity?
     
  31. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Yes