Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Crash when loading prefab assets from asset bundles which contain an Animator component

Discussion in '5.5 Beta' started by infinitedev, Oct 26, 2016.

  1. infinitedev

    infinitedev

    Joined:
    Oct 24, 2013
    Posts:
    3
    I've submitted a bug report (845347) for this, but I thought I'd post here as well because I couldn't find info on this issue on Google, and it took me a really long time to figure out what was causing my crash.

    In Unity 5.5.0 Beta 9, loading any asset bundle asset which includes an Animator component causes an immediate crash. The crash does not occur on OS X editor or stand-alone builds.

    I believe I've seen this behavior in betas 7 and 8, but I haven't checked thoroughly.

    Steps to reproduce:

    1) Open attached project in Unity 5.5.0 Beta 9.
    2) (optional) Export asset bundles with the provided "Asset Bundle Exporter/Export Asset Bundles" menu item. The asset bundles are already exported to Assets/StreamingAssets, so this step is optional.
    3) (optional) Open "scene.unity" in the editor. Play. Click the mouse to load the prefab from the asset bundle and instantiate it. Observe animation plays correctly and does not crash.
    4) (optional) Build & run for OS X. Observe animation plays correctly and does not crash.
    5) Build an iOS Xcode project.
    6) Deploy to iOS device.
    7) Once running, tap the screen to load the prefab from the asset bundle and instantiate it.
    8) Observe immediate crash with C++ stack trace.

    Stack trace:
    Code (csharp):
    1. #0    0x0000000100521dcc in ::ProduceObjectInternal() at /Users/builduser/buildslave/unity/build/Runtime/Serialize/PersistentManager.cpp:1323
    2. #1    0x0000000100521bf0 in ::CreateThreadActivationQueueEntry() at /Users/builduser/buildslave/unity/build/Runtime/Serialize/PersistentManager.cpp:1245
    3. #2    0x00000001005221d8 in ::PreallocateObjectThreaded() at /Users/builduser/buildslave/unity/build/Runtime/Serialize/PersistentManager.cpp:1392
    4. #3    0x000000010035047c in AssignObjectFromInstanceID [inlined] at /Users/builduser/buildslave/unity/build/Runtime/BaseClasses/ImmediatePtr.h:46
    5. #4    0x0000000100350474 in ::Transfer<StreamedBinaryRead<false> >() at /Users/builduser/buildslave/unity/build/Runtime/BaseClasses/ImmediatePtr.h:81
    6. #5    0x0000000100350564 in Transfer<StreamedBinaryRead<false> > [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Serialize/SerializeTraitsBase.h:54
    7. #6    0x0000000100350560 in Transfer<ImmediatePtr<Unity::Component> > [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Serialize/TransferFunctions/StreamedBinaryRead.h:122
    8. #7    0x0000000100350560 in ::Transfer<StreamedBinaryRead<false> >() at /Users/builduser/buildslave/unity/build/Runtime/BaseClasses/GameObject.cpp:802
    9. #8    0x000000010035052c in Transfer<StreamedBinaryRead<false> > [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Serialize/SerializeTraitsBase.h:54
    10. #9    0x000000010035051c in Transfer<GameObject::ComponentPair> [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Serialize/TransferFunctions/StreamedBinaryRead.h:122
    11. #10    0x000000010035051c in ::TransferSTLStyleArray<dynamic_array<GameObject::ComponentPair, 8> >() at /Users/builduser/buildslave/unity/build/Runtime/Serialize/TransferFunctions/StreamedBinaryRead.h:87
    12. #11    0x000000010034cc1c in Transfer<StreamedBinaryRead<false> > [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Serialize/SerializeTraits.h:501
    13. #12    0x000000010034cc10 in Transfer<dynamic_array<GameObject::ComponentPair, 8> > [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Serialize/TransferFunctions/StreamedBinaryRead.h:122
    14. #13    0x000000010034cc10 in TransferComponents<StreamedBinaryRead<false> > [inlined] at /Users/builduser/buildslave/unity/build/Runtime/BaseClasses/GameObject.cpp:847
    15. #14    0x000000010034cc04 in ::Transfer<StreamedBinaryRead<false> >() at /Users/builduser/buildslave/unity/build/Runtime/BaseClasses/GameObject.cpp:855
    16. #15    0x00000001005b1278 in ::ReadObject() at /Users/builduser/buildslave/unity/build/Runtime/Serialize/SerializedFile.cpp:1990
    17. #16    0x0000000100521a4c in ::ReadObjectThreaded() at /Users/builduser/buildslave/unity/build/Runtime/Serialize/PersistentManager.cpp:1457
    18. #17    0x00000001005218d8 in ::ReadObject() at /Users/builduser/buildslave/unity/build/Runtime/Serialize/PersistentManager.cpp:1176
    19. #18    0x00000001003281c0 in ::ProcessAssetBundleEntries() at /Users/builduser/buildslave/unity/build/Runtime/AssetBundles/AssetBundleUtility.cpp:200
    20. #19    0x0000000100328114 in ::LoadNamedObjectFromAssetBundle() at /Users/builduser/buildslave/unity/build/Runtime/AssetBundles/AssetBundleUtility.cpp:223
    21. #20    0x000000010059b548 in ::AssetBundle_CUSTOM_LoadAsset_Internal() at /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/AssetBundleBindings.gen.cpp:244
    22. #21    0x00000001002f0348 in ::AssetBundle_LoadAsset_TisIl2CppObject_m1172462779_gshared(AssetBundle_t2054978754 *, String_t *, const MethodInfo *) at /Users/joshr/Desktop/ios/Classes/Native/GenericMethods0.cpp:28641
    23. #22    0x00000001000aa970 in ::AssetBundleLoader_Update_m2956664479(AssetBundleLoader_t386902015 *, const MethodInfo *) at /Users/joshr/Desktop/ios/Classes/Native/Bulk_Assembly-CSharp_0.cpp:199
    24. #23    0x00000001002ff654 in RuntimeInvoker_Void_t1841601450(MethodInfo const*, void*, void**) at /Users/joshr/Desktop/ios/Classes/Native/Il2CppInvokerTable.cpp:259
    25. #24    0x000000010082c6ac in il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) ()
    26. #25    0x0000000100516b6c in ::Invoke() at /Users/builduser/buildslave/unity/build/Runtime/Scripting/Backend/ScriptingInvocation.cpp:271
    27. #26    0x00000001005adc50 in Invoke [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Scripting/Backend/ScriptingInvocation.h:80
    28. #27    0x00000001005adc3c in CallMethodIfAvailable [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Mono/MonoBehaviour.cpp:462
    29. #28    0x00000001005adbfc in ::CallUpdateMethod() at /Users/builduser/buildslave/unity/build/Runtime/Mono/MonoBehaviour.cpp:560
    30. #29    0x00000001003e84f4 in UpdateBehaviour [inlined] at /Users/builduser/buildslave/unity/build/Runtime/GameCode/Behaviour.cpp:175
    31. #30    0x00000001003e84e8 in ::CommonUpdate<BehaviourManager>() at /Users/builduser/buildslave/unity/build/Runtime/GameCode/Behaviour.cpp:153
    32. #31    0x00000001004c027c in ::PlayerLoop() at /Users/builduser/buildslave/unity/build/Runtime/Misc/PlayerLoop.cpp:174
    33. #32    0x00000001005fc82c in ::UnityPlayerLoopImpl() at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/LibEntryPoint.mm:197
    34. #33    0x0000000100097df4 in ::UnityRepaint() at /Users/joshr/Desktop/ios/Classes/UnityAppController+Rendering.mm:238
    35. #34    0x0000000100097cf0 in ::-[UnityAppController(Rendering) repaintDisplayLink]() at /Users/joshr/Desktop/ios/Classes/UnityAppController+Rendering.mm:53
    36. #35    0x0000000101c87b1c in -[DYDisplayLinkInterposer forwardDisplayLinkCallback:] ()
    37. #36    0x0000000187c03640 in CA::Display::DisplayLinkItem::dispatch(unsigned long long) ()
    38. #37    0x0000000187c034ec in CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) ()
    39. #38    0x0000000184c6c570 in IODispatchCalloutFromCFMessage ()
    40. #39    0x000000018499656c in __CFMachPortPerform ()
    41. #40    0x00000001849ae934 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
    42. #41    0x00000001849ae0e8 in __CFRunLoopDoSource1 ()
    43. #42    0x00000001849abbcc in __CFRunLoopRun ()
    44. #43    0x00000001848da048 in CFRunLoopRunSpecific ()
    45. #44    0x000000018635d198 in GSEventRunModal ()
    46. #45    0x000000018a8b4628 in -[UIApplication _run] ()
    47. #46    0x000000018a8af360 in UIApplicationMain ()
    48. #47    0x0000000100091c6c in main at /Users/joshr/Desktop/ios/Classes/main.mm:32
    49. #48    0x00000001838bc5b8 in start ()
     

    Attached Files:

    GregHanes and Cain974 like this.
unityunity