Crash with LoadAssetWithSubAssetsAsync on Android (Nexus 7 2012)

Hi,

I have a bug with asset bundles with Unity 5.0.0b18. When I try to use LoadAssetWithSubAssetsAsync() 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?

Well it is seems it has been fixed in unity 5.0.0b19 :slight_smile:

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)”

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…

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

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

So, did you manage to reproduce the bug (asset bundle not loading asset with sub assets correctly) with the sample project I sent you?

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

1 Like

Awesome! Thank you :wink:

Btw: did you still get the crash when calling LoadAssetWithSubAssetsAsync() or LoadAssetWithSubAssetsAsync()?

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)

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

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

1 Like

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