- Home /
Crash on iOS after upgrading to Unity 4
Hi All,
I upgraded my project to Unity 4 recently.
with Unity 3.5 the application itself was running fine on both Android & iOS.
However, after upgrading I discovered a crash (iOS only on Android everything still in order) related to the way I am loading Assets from the Assetbundle (it didnt happen with the old build)
if I use LoadAsync to load an asset from assetbundle I get the EXC_BAD_ACCESS in a thread with stack calls ending with:
SubstanceSystem::WaitFinished(LoadProgress*)
PreloadLevelOperation::Perform()
if I use Load I dont get the issue
code:
//crashes
AssetBundleRequest assetBR = WWW.assetBundle.LoadAsync("avatarskeleton", typeof(GameObject));
if (!assetBR.isDone) return false;
//works
GameObject avatarSkeleton = WWW.assetBundle.Load("avatarskeleton", typeof(GameObject));
I am wondering if anyone else has noticed similar issues after upgrading to Unity 4
Thanks
==EDIT==
Thanks to nomago for pointing out the stripping level. I reported a bug to Unity hope it will be fixed
I have the same problem trying to upgrade our project to Unity 4. The only fix for this that I've found has been to disable Code Stripping. Are you using code stripping in your project as well?
Would love to find a fix for this issue as I can find no reason for this. I've even tried adding System.Runtime.CompilerServices (something included by Unity in the LoadASync) in my link.xml as a namespace that is preserved. But that doesn't fix it either.
actually I am using code stripping... I will disable it and see if that will stop the crash as well
Disabling stripping level stopped the crash, Thanks for sharing. I guess its a new/regression bug on Unity's side.
Answer by SolidSnake · Apr 28, 2013 at 08:03 PM
Thanks to nomago for pointing out the stripping level. I reported a bug to Unity hope it will be fixed