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

Porting iOS to Android - just stops on initial loading scene

Discussion in 'Android' started by bigdaddy, Oct 1, 2015.

  1. bigdaddy

    bigdaddy

    Joined:
    May 24, 2011
    Posts:
    153
    I'm porting a working iOS game to Android. I'm currently using Unity 4.6.8. After cleaning up some missing conditionals, the game works in the Editor. Pushing APK to Nexus 7, the initial scene loads then it just hangs. The initial scene shows a tip, a logo and initializes everything.

    I added an Update to the GameManager and call Debug.Log with the frame count. There are 2 frames and then nothing else from the Update.

    Nothing jumps out at me in the log but this is my first attempt on Android.

    Here's the logcat
    I don't know how to proceed in finding why its not working.
     
  2. bigdaddy

    bigdaddy

    Joined:
    May 24, 2011
    Posts:
    153
    No one has any tips on how to debug this? Its happening randomly now so I'd really like to figure out how to dump/track what is going on.

    At some point in the initialization I just get repeating
     
  3. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Does your app use a data connection? if it does, I have no idea. If not... are you using GLES3? I had issues with apps not starting on a supported device. (Solution was fallback to GLES2, which didn't matter for me anyway)
     
  4. bigdaddy

    bigdaddy

    Joined:
    May 24, 2011
    Posts:
    153
    Thanks for responding @FuzzyQuills. I set PlayerSettings to use GLES2.

    I've reworked some things to let me better step through the startup in Monodevelop. During the startup phase I make an http call to get any changed game variables. The call returns then at the end of that processing while I use "step into" I get a couple of UnityEnging.Canvas.SendWillRenderCanvas calls (in the Call stack), then 4 UnityEngine.Event.Internal_MakeMasterEventCurrent calls. After the 4th the game hangs.

    I have a Debug statement in my GameManager's Update method which is also a breakpoint. After that 4th Internal_MakeMasterEventCurrent call the Update method is never hit.
     
  5. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    That sounds a bit... convoluted. :D And the update method never being hit?! :eek: Yikes!

    Anyway... from the looks of things, it might be a unity bug, since you mentioned Update refusing to run like it's supposed to. Did the GLES2 thing work for you? o_O
     
  6. bigdaddy

    bigdaddy

    Joined:
    May 24, 2011
    Posts:
    153
    I don't think its a Unity bug; the Update not getting called is because the game has stopped/crashed/whatever before the 3rd Update loop. I just wish I had a crash log or something.

    I had it set to GLES2 from the beginning, so it had no effect.
     
  7. bigdaddy

    bigdaddy

    Joined:
    May 24, 2011
    Posts:
    153
    Wow. So after removing all of the things I could realistically remove and still having it fail, I powered off the device and went to eat & clear my mind/frustrations.

    Came back, powered on the device, made a cosmetic change, ran and it worked. Slowly added things back, running it after each feature set was added back. Kept working. Ended up adding everything back; kept working.

    Guess all it needed was the device to be rebooted. SMH
     
  8. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Wow... obviously that device was a bit clogged up! :D Good to hear you solved it. :)
     
  9. bigdaddy

    bigdaddy

    Joined:
    May 24, 2011
    Posts:
    153
    And its now back to just stopping.

    This is just not worth it.