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. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Crash with LoadAssetWithSubAssetsAsync on Android (Nexus 7 2012)

Discussion in 'Unity 5 Pre-order Beta' started by DaMitch, Jan 9, 2015.

  1. DaMitch

    DaMitch

    Joined:
    Feb 6, 2013
    Posts:
    29
    Hi,

    I have a bug with asset bundles with Unity 5.0.0b18. When I try to use LoadAssetWithSubAssetsAsync<T>() or LoadAssetWithSubAssetsAsync(), the game just crashes on Nexus 7 2012 (it runs fine on Nexus 4 however). Right now I am using LoadAssetWithSubAssets instead, which runs fine.

    Is there a workaround for this ? Or is this bug known and might be fixed in a next beta?
     
  2. DaMitch

    DaMitch

    Joined:
    Feb 6, 2013
    Posts:
    29
    Well it is seems it has been fixed in unity 5.0.0b19 :)
     
  3. DaMitch

    DaMitch

    Joined:
    Feb 6, 2013
    Posts:
    29
    My mistake... it is still not working and crashes sometimes even on Nexus 4 (and everytime on Nexus 7)

    Apparently the error is : "fatal signal 11 (sigsegv), code 1, fault addr 0x99 in tid 8458 (UnityPreload)"
     
    Last edited: Jan 26, 2015
  4. DaMitch

    DaMitch

    Joined:
    Feb 6, 2013
    Posts:
    29
    Actually since I updated to Unity 5 b21, I can't load asset with subassets from Asset Bundles.... For example, when I load a texture containing 4 sprites using LoadAssetWithSubAssets, it returns a Object[5] containing 5 times the Texture...

    Edit : actually even after reverting to Unity 5 b19, the same problem happens when i rebuild asset bundles. It may be related to the fact that all folders' meta change somehow : the line " assetBundleName: " is added, even though the folders are not related to asset bundles...
    This is quite strange because I reverted to the same version of Unity I used before, and whenever I launch Unity after cleaning my repository, it reimports "small assets" and all those meta files are modified...
     
    Last edited: Jan 27, 2015
  5. Deleted User

    Deleted User

    Guest

    I don't think this part of code changed between b18 and b21, could you please file a bug for it?
     
  6. DaMitch

    DaMitch

    Joined:
    Feb 6, 2013
    Posts:
    29
    I just sent a bug report: Case 667578.

    Actually the problem with the crash on android devices when I use LoadAssetWithSubAssetsAsync and the bug where I can't load any subasset contained in assetbundles at all are not related, I think. Because I had crashes on Android devices since Unity 5 b18 but the fact that I can't load subassets appeared when I updated to Unity 5 b21 and stayed even if I reverted to Unity 5 b19

    Edit : I tested with a project created directly with Unity 5 b21, the bug also occurs
     
    Last edited: Jan 28, 2015
  7. DaMitch

    DaMitch

    Joined:
    Feb 6, 2013
    Posts:
    29
    So, did you manage to reproduce the bug (asset bundle not loading asset with sub assets correctly) with the sample project I sent you?
     
  8. Deleted User

    Deleted User

    Guest

    Yes, it has been fixed and will be in the next release. Thanks for reporting it.
     
    DaMitch likes this.
  9. DaMitch

    DaMitch

    Joined:
    Feb 6, 2013
    Posts:
    29
    Awesome! Thank you ;)
     
  10. Deleted User

    Deleted User

    Guest

    Btw: did you still get the crash when calling LoadAssetWithSubAssetsAsync<T>() or LoadAssetWithSubAssetsAsync()?
     
  11. DaMitch

    DaMitch

    Joined:
    Feb 6, 2013
    Posts:
    29
    Where you talking about Unity 5 b22? Because I just downloaded it and the bug is still here (I cant' load subassets in assetbundles).

    I coudn't reproduce this bug on my Nexus 4, but it was happening just occasionnally on this device so I can't be sure. However I can't even launch a game (even an empty project) on my Nexus 7 2012 anymore if it was built with unity 5 b 22. I crashes just after the splash screen. The same project built with Unity 5 b 19 doesn't crash
    The crash error is :
    A/libc(9574): invalid address or address of corrupt block 0x6a230b50 passed to dlfree
    A/libc(9574): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 9589 (UnityMain)
     
    Last edited: Feb 5, 2015
  12. DaMitch

    DaMitch

    Joined:
    Feb 6, 2013
    Posts:
    29
    I still can't use AssetBundle.LoadAssetWithSubAssets (or the async version) with Unity 5.0.0f1... Still the same bug as in the sample project I sent : I can't load child meshes of a fbx. It only find the parent Gameobject that we get when we drag and drop the fbx in a scene.
    And the returned array contains 4 times this Gameobject or nothing if I use AssetBundle.LoadAssetWithSubAssets<Mesh>
     
  13. Deleted User

    Deleted User

    Guest

    Sorry, should have mentioned that earlier. The fix just missed the RC1 window and will be in RC2. Sorry for the inconvenience.
     
    maxthecat likes this.
  14. maxthecat

    maxthecat

    Joined:
    May 26, 2014
    Posts:
    29
    I have the same issue with AssetBundle.LoadAllAssets, multiples of the same gameobject instead of the subasset.

    Look forward to the RC2 release for a fix. Thanks