Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Native crash loading asset bundles on iOS (Unity 2017.2)

Discussion in 'Asset Bundles' started by CDF, Dec 16, 2017.

  1. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    673
    So I finally managed to convert my project over to asset bundles.
    However, now my app is crashing on iOS whenever I attempt to load a second scene from an asset bundle. And of course unity performance reporting is no help. Just a huge list of "missing symbols"
    On Android it's fine.

    Anyone know of any current quirks with asset bundles on iOS using Unity 2017.2?
     
  2. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    673
    Well I managed to get some logs out and I'm getting this:

    Thread 0 (crashed)
    0 myproject GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&)
    1 myproject GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&)
    2 myproject GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&)
    3 myproject GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&)
    4 myproject GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&)
    5 myproject GameObject::ActivateAwakeRecursively(DeactivateOperation)
    6 myproject GameObject::Activate()
    7 myproject GameObject_CUSTOM_SetActive(Il2CppObject*, unsigned char)

    Again, only on iOS. I've read some things about code stripping with asset bundles. But wouldn't Android crash as well if that were the case?
     
  3. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    673
    Nevermind, it was a strip engine code issue. Setting to false fixes the problem.
     
    masood-t likes this.
  4. masood-t

    masood-t

    Joined:
    Nov 25, 2012
    Posts:
    13
    This is very important .I had a crash on asset downloading On ios but this fix my problem.
    thank you #CDF
     
  5. Yozaro

    Yozaro

    Joined:
    Jun 28, 2015
    Posts:
    42
    Remember to force rebuild your assetbundles when you update Unity. We updated our Unity version and started getting seemingly random native crashes when loading assets.

    This was not the cause for your crash, but it's good to remember that. I wasted one full day on debugging and investigating the issue.
     
  6. FedericoBozzoMiniclip

    FedericoBozzoMiniclip

    Joined:
    Feb 27, 2018
    Posts:
    2
    Hi Yozaro, I would really like to know if simply rebuilding all bundles solved those crashes for you.

    I just migrated one of our company projects from Unity 5.6 to 2018.2 and (after some struggling) I managed to make it work on Android and iOs, but I'm still experiencing random native crashes on the latter platform when loading a bundle even if I rebuilt them all. The crash appears as a "EXC_BAD_ACCESS" on the Unity Preload thread and I was wondering if this was your case!

    Thanks!
     
    Last edited: Jan 30, 2019