Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 5.2 Crash with Level Load

Discussion in 'iOS and tvOS' started by AwDogsGo2Heaven, Sep 29, 2015.

  1. AwDogsGo2Heaven

    AwDogsGo2Heaven

    Joined:
    Jan 17, 2014
    Posts:
    102
    After updating my project to 5.2, my level loads no longer work with iPhone. In editor things work fine, but once I try it on the iPhone the screen just freezes and the level never loads and an exception is never thrown.
    I just load new scenes on click using Unity UI button. Also, if I package the said scenes that fail to load on their own and deploy they load just fine, so I'm doubting their is an issue with the scenes.

    Has anyone else experienced this issue?
     
  2. Sickwitit

    Sickwitit

    Joined:
    Dec 22, 2014
    Posts:
    123
    I'm experiencing this issue, but my game doesn't freeze. Splash works fine, then it hits the main game scene. Crash and states lost connection to iphone. No errors/exceptions. This is regarding iPhone 4S. I ran a build on iPhone 6s and it worked fine.

    Can you build on on a higher version of iPhone?
     
  3. AwDogsGo2Heaven

    AwDogsGo2Heaven

    Joined:
    Jan 17, 2014
    Posts:
    102
    I'm using iPhone 5s, don't have a 6 currently. :(
     
  4. AwDogsGo2Heaven

    AwDogsGo2Heaven

    Joined:
    Jan 17, 2014
    Posts:
    102
    System memory in use before: 18.4 MB.

    System memory in use after: 18.5 MB.


    Unloading 180 unused Assets to reduce memory usage. Loaded Objects now: 921.

    Total: 21.551085 ms (FindLiveObjects: 0.092166 ms CreateObjectMapping: 0.048916 ms MarkObjects: 12.511541 ms DeleteObjects: 8.875999 ms)

    This is all that prints out when I attempt to load level.

    EDIT: I can't reload current scene either, it appears the start of the new scene is called, but there is no visual change, screen just freezes.

    Edit 2: Attempted to load empty scene, with simple script to print 'hi' on update. It only prints once, so it gets as far as calling update once before doing nothing (no exceptions).
     
    Last edited: Sep 30, 2015
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @AwDogsGo2Heaven

    You may be able to debug the issue in Xcode. You'll be looking at generated C++ code, but it might help to track down the cause of the issue. You can see some general information about debugging the generated C++ code in Xcode here:

    http://blogs.unity3d.com/2015/05/20/il2cpp-internals-debugging-tips-for-generated-code/
     
  6. AwDogsGo2Heaven

    AwDogsGo2Heaven

    Joined:
    Jan 17, 2014
    Posts:
    102
    Thanks for the tip, I'll try it tonight
     
  7. AwDogsGo2Heaven

    AwDogsGo2Heaven

    Joined:
    Jan 17, 2014
    Posts:
    102
    No exceptions found...but I did notice once its 'freeze' state, it appears to be trapped in 'WillRenderCanvases' and never appears to leave it.
     
  8. -chris

    -chris

    Joined:
    Mar 1, 2012
    Posts:
    99
    Have you tried 5.2.1p1? I remember trying 5.2 the other week and it would freeze when loading my second scene, but seems to be fixed with the latest patch.
     
  9. Sickwitit

    Sickwitit

    Joined:
    Dec 22, 2014
    Posts:
    123
    I'm using 5.1.2p1 and I'm getting the crash/freeze with no errors also. It can't handle my loaded sprites anymore. Currently trying to use @JoshPeterson advice.
     
  10. AwDogsGo2Heaven

    AwDogsGo2Heaven

    Joined:
    Jan 17, 2014
    Posts:
    102
    I figured it out guys. @JoshPeterson. The issue for me was TextMeshPro and an Outline script on the same Gameobject. I previously moved from Text to TextMeshPro and forgot to remove some outlines. After a long trial and error, I found after I remove these Outline scripts the issue went away completely. Oddly though, it didn't have any problems if you added an outline script again to them after removing them. I don't know if this is a serialization issue, or maybe something to do with the ordering of the scripts or whatever. All I know is some how the Outline script combined with TextMeshPro put you in some sort of infinite loop with willrendercanvases.