Search Unity

Crash in Unity 5.5 WebGL when destroying GameObject on scene load

Discussion in 'Web' started by Jarrodsh, Aug 31, 2017.

  1. Jarrodsh

    Jarrodsh

    Joined:
    Aug 18, 2017
    Posts:
    7
    Running a project with Unity 5.5.0f3, we encounter this error occasionally (10% of the time?) in our WebGL build.

    Behavior - Game runs through the browser for some time, then returning to our Main Menu scene sometimes causes a crash. Browser pops up a prompt with part of the stack trace, and the game cannot be played without refreshing the page.

    Here's are several callstacks of the issue that are similar to each other but occur at slightly different times. I'm working to get a development build callstack as well.

    This first one occurred when we set a Canvas inactive shortly after loading our main menu:
    Code (csharp):
    1.  
    2. [LIST=1]
    3. [*]Invoking error handler due to
    4. [*]uncaught exception: abort() at jsStackTrace (AutoPlayTesting.js:1:19540)
    5. [*]stackTrace (AutoPlayTesting.js:1:19711)
    6. [*]abort (AutoPlayTesting.js:3:31245)
    7. [*]_abort (AutoPlayTesting.js:1:196409)
    8. [*]_free [H3s] (blob:31:1)
    9. [*]MemoryManager::Deallocate(void*, MemLabelIdentifier) [E_] (blob:9:1)
    10. [*]free_alloc_internal(void*, MemLabelIdentifier) [C_] (blob:9:1)
    11. [*]VertexData::~VertexData() [RFb] (blob:12:1)
    12. [*]SharedMeshData::~SharedMeshData() [wGb] (blob:12:1)
    13. [*]UI::DestroyCanvasData(JobFence&, UI::CanvasData&) [e8e] (blob:18:1)
    14. [*]UI::Canvas::RemoveFromManager() [a8e] (blob:18:1)
    15. [*]Behaviour::Deactivate(DeactivateOperation) [Ykb] (blob:13:1)
    16. [*]GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) [Taa] (blob:9:1)
    17. [*]GameObject::SetSelfActive(bool) [Ghc] (blob:17:1)
    18. [*]GameObject_CUSTOM_SetActive(Il2CppObject*, unsigned char) [cwc] (blob:15:1)
    19. [*]_GameObject_SetActive_m2887581199 [Gto] (blob:8:1)
    20. [*]_MainMenu_HideAllPages_m1689355816 [Rmn] (blob:4:1)
    21. [*]_MainMenu_ShowPage_m1980521116 [Mmn] (blob:4:1)
    22. [*]_MainMenu_ButtonPressPicksInSpaceBack_m1662059176 [Omn] (blob:4:1)
    23. [*]_MainMenu_Update_m3400556664 [Umn] (blob:4:1)
    24. [*]RuntimeInvoker_Void_t1841601450(MethodInfo const*, void*, void**) [Ugm] (blob:4:1)
    25. [*]dynCall_iiii [_ht] (blob:31:1)
    26. [*]invoke_iiii (AutoPlayTesting.js:1:349074)
    27. [*]il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) [Mos] (blob:22:1)
    28. [*]_il2cpp_runtime_invoke [Mss] (blob:22:1)
    29. [*]scripting_method_invoke(ScriptingMethodIl2Cpp, Il2CppObject*, ScriptingArguments&, Il2CppException**, bool) [W5] (blob:9:1)
    30. [*]V5 (blob:9:1)
    31. [*]MonoBehaviour::CallUpdateMethod(int) [dSb] (blob:12:1)
    32. [*]MonoBehaviour::Update() [SRb] (blob:12:1)
    33. [*]void BaseBehaviourManager::CommonUpdate<BehaviourManager>() [qhc] (blob:17:1)
    34. [*]phc (blob:17:1)
    35. [*]InitPlayerLoopCallbacks()::UpdateScriptRunBehaviourUpdatestruct::Forward() [PRa] (blob:16:1)
    36. [*]PlayerLoop() [gfa] (blob:9:1)
    37. [*]MainLoop() [Vea] (blob:9:1)
    38. [*]dynCall_v [Bht] (blob:31:1)
    39. [*]dynCall [Runtime.dynCall] (AutoPlayTesting.js:1:7469)
    40. [*]_emscripten_set_main_loop [_emscripten_set_main_loop/browserIterationFunc] (AutoPlayTesting.js:1:38956)
    41. [*]runIter [Browser.mainLoop.runIter] (AutoPlayTesting.js:1:42048)
    42. [*]Browser_mainLoop_runner (AutoPlayTesting.js:1:40493)
    43. [/LIST]
    44.  
    This second one occurred when returning to our Main Menu scene:
    Code (csharp):
    1.  
    2. Invoking error handler due to
    3. Uncaught abort(104) at Error
    4.     at jsStackTrace (FullUncompressedBugHunt.js:1:19540)
    5.     at stackTrace (FullUncompressedBugHunt.js:1:19711)
    6.     at abort (FullUncompressedBugHunt.js:3:31761)
    7.     at b104 [Array.yFt] (FullUncompressedBugHunt.asm.js:46:704994)
    8.     at GameObject::WillDestroyGameObject() [gba] (FullUncompressedBugHunt.asm.js:7:881065)
    9.     at PreDestroyRecursive(GameObject&, unsigned int*) [Waa] (FullUncompressedBugHunt.asm.js:7:873205)
    10.     at PreDestroyRecursive(GameObject&, unsigned int*) [Waa] (FullUncompressedBugHunt.asm.js:7:873334)
    11.     at DestroyGameObjectHierarchy(GameObject&) [Uaa] (FullUncompressedBugHunt.asm.js:7:872661)
    12.     at DestroyObjectHighLevel(Object*, bool) [a7] (FullUncompressedBugHunt.asm.js:7:710582)
    13.     at DelayedDestroyCallback(Object*, void*) [Array.gFb] (FullUncompressedBugHunt.asm.js:8:200806)
    14.     at DelayedCallManager::Update(int) [Array.Vrb] (FullUncompressedBugHunt.asm.js:9:707933)
    15.     at eSa [Array.eSa] (FullUncompressedBugHunt.asm.js:12:124292)
    16.     at PlayerLoop() [wfa] (FullUncompressedBugHunt.asm.js:7:1065993)
    17.     at MainLoop() [Array.jfa] (FullUncompressedBugHunt.asm.js:7:1054959)
    18.     at dynCall_v [Fzt] (FullUncompressedBugHunt.asm.js:46:680587)
    19.     at dynCall [Object.dynCall] (FullUncompressedBugHunt.js:1:7492)
    20.     at browserIterationFunc (FullUncompressedBugHunt.js:1:38964)
    21.     at runIter [Object.runIter] (FullUncompressedBugHunt.js:1:42048)
    22.     at Browser_mainLoop_runner (FullUncompressedBugHunt.js:1:40510)
    23.  
    This third one occurred when returning to the MainMenu scene as well:
    Code (csharp):
    1.  
    2. An error occurred running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
    3. uncaught exception: abort(123) at jsStackTrace (FullUncompressedBugHunt.js:1:19540)
    4. stackTrace (FullUncompressedBugHunt.js:1:19711)
    5. abort (FullUncompressedBugHunt.js:3:31761)
    6. b123 [_Gt] (FullUncompressedBugHunt.asm.js:46:709637)
    7. MemoryManager::Deallocate(void*, MemLabelIdentifier) [U_] (FullUncompressedBugHunt.asm.js:7:520841)
    8. free_alloc_internal(void*, MemLabelIdentifier) [S_] (FullUncompressedBugHunt.asm.js:7:519838)
    9. ConstantString::~ConstantString() [uea] (FullUncompressedBugHunt.asm.js:7:1021377)
    10. GameObject::~GameObject() [_6a] (FullUncompressedBugHunt.asm.js:9:51674)
    11. delete_object_internal_step2(Object*) [_aa] (FullUncompressedBugHunt.asm.js:7:876968)
    12. DestroyGameObjectHierarchy(GameObject&) [Uaa] (FullUncompressedBugHunt.asm.js:7:872846)
    13. DestroyObjectHighLevel(Object*, bool) [a7] (FullUncompressedBugHunt.asm.js:7:710582)
    14. DelayedDestroyCallback(Object*, void*) [gFb] (FullUncompressedBugHunt.asm.js:8:200806)
    15. DelayedCallManager::Update(int) [Vrb] (FullUncompressedBugHunt.asm.js:9:707922)
    16. eSa (FullUncompressedBugHunt.asm.js:12:124262)
    17. PlayerLoop() [wfa] (FullUncompressedBugHunt.asm.js:7:1065555)
    18. MainLoop() [jfa] (FullUncompressedBugHunt.asm.js:7:1054959)
    19. dynCall_v [Fzt] (FullUncompressedBugHunt.asm.js:46:680578)
    20. dynCall [Runtime.dynCall] (FullUncompressedBugHunt.js:1:7469)
    21. _emscripten_set_main_loop [_emscripten_set_main_loop/browserIterationFunc] (FullUncompressedBugHunt.js:1:38956)
    22. runIter [Browser.mainLoop.runIter] (FullUncompressedBugHunt.js:1:42048)
    23. Browser_mainLoop_runner (FullUncompressedBugHunt.js:1:40493)
    24.  
    Any idea what the underlying issue may be and how we might fix it? As far as I'm aware, we aren't using asset bundles (which I've seen from other posts to sometimes cause crashes). I don't see anything in our code that should be causing these issues.
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    This is not a known issue. Could you with the latest 5.5 patch?
     
  3. Jarrodsh

    Jarrodsh

    Joined:
    Aug 18, 2017
    Posts:
    7
    Thanks for the response. I downloaded the 5.5 patch you linked above and was able to reproduce this issue.

    What additional information can I provide that will be helpful here?
    • Observed in Unity 5.5.0p3, Unity 5.5.4p4 on Mac Firefox 38, Chrome, and Linux Firefox 38
    • Typically occurs on a scene transition.
    • I haven't managed to reproduce this in a development build as of yet.
     
  4. Jarrodsh

    Jarrodsh

    Joined:
    Aug 18, 2017
    Posts:
    7
    Here is an example from a Development build:

    An error occurred running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
    uncaught exception: abort() at jsStackTrace (TestHealthCheckRefreshTimers5.5.4Dev.js:859:12)
    stackTrace (TestHealthCheckRefreshTimers5.5.4Dev.js:873:11)
    abort (TestHealthCheckRefreshTimers5.5.4Dev.js:19284:43)
    _abort (TestHealthCheckRefreshTimers5.5.4Dev.js:8449:2)
    _free (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:570089:17)
    operator delete(void*) [__ZdlPv] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2606647:2)
    TextGenerator_CUSTOM_Dispose_cpp(Il2CppObject*) [__Z32TextGenerator_CUSTOM_Dispose_cppP12Il2CppObject] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2195217:2)
    _TextGenerator_Dispose_cpp_m1755131202 (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2459594:2)
    _TextGenerator_System_IDisposable_Dispose_m1042601388 (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2540974:2)
    InterfaceActionInvoker0::Invoke(unsigned int, Il2CppClass*, void*) [__ZN23InterfaceActionInvoker06InvokeEjP11Il2CppClassPv] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2334126:2)
    dynCall_viii (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2545037:2)
    invoke_viii (TestHealthCheckRefreshTimers5.5.4Dev.js:16293:3)
    _TextGenerator_Finalize_m4242493229 (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2130562:2)
    RuntimeInvoker_Void_t1841601450(MethodInfo const*, void*, void**) [__Z31RuntimeInvoker_Void_t1841601450PK10MethodInfoPvPS2_] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2515018:2)
    dynCall_iiii (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2534761:9)
    invoke_iiii (TestHealthCheckRefreshTimers5.5.4Dev.js:16509:10)
    il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) [__ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2093747:8)
    il2cpp::gc::GarbageCollector::RunFinalizer(void*, void*) [__ZN6il2cpp2gc16GarbageCollector12RunFinalizerEPvS2_] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2254298:2)
    _GC_invoke_finalizers (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2213295:3)
    _GC_notify_or_invoke_finalizers (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2387595:3)
    _GC_generic_malloc (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2045130:2)
    _GC_malloc (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2277276:9)
    il2cpp::vm::Object::Allocate(unsigned int, Il2CppClass*) [__ZN6il2cpp2vm6Object8AllocateEjP11Il2CppClass] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2306036:8)
    il2cpp::vm::Array::NewSpecific(Il2CppClass*, int) [__ZN6il2cpp2vm5Array11NewSpecificEP11Il2CppClassi] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:1865423:8)
    SZArrayNew(Il2CppClass*, unsigned int) [__Z10SZArrayNewP11Il2CppClassj] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2505742:9)
    _GameSystem_UpdateAutoPlay_m2758301960 (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:1047703:8)
    _GameSystem_Update_m802897145 (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2019519:2)
    RuntimeInvoker_Void_t1841601450(MethodInfo const*, void*, void**) [__Z31RuntimeInvoker_Void_t1841601450PK10MethodInfoPvPS2_] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2515018:2)
    dynCall_iiii (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2534761:9)
    invoke_iiii (TestHealthCheckRefreshTimers5.5.4Dev.js:16509:10)
    il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) [__ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2093747:8)
    _il2cpp_runtime_invoke (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2399719:9)
    scripting_method_invoke(ScriptingMethodIl2Cpp, Il2CppObject*, ScriptingArguments&, Il2CppException**, bool) [__Z23scripting_method_invoke21ScriptingMethodIl2CppP12Il2CppObjectR18ScriptingArgumentsPP15Il2CppExceptionb] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2239396:8)
    ScriptingInvocation::Invoke(Il2CppException**, bool) [__ZN19ScriptingInvocation6InvokeEPP15Il2CppExceptionb] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:1645007:7)
    MonoBehaviour::CallUpdateMethod(int) [__ZN13MonoBehaviour16CallUpdateMethodEi] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:1534622:4)
    MonoBehaviour::Update() [__ZN13MonoBehaviour6UpdateEv] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2586581:2)
    void BaseBehaviourManager::CommonUpdate<BehaviourManager>() [__ZN20BaseBehaviourManager12CommonUpdateI16BehaviourManagerEEvv] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:1219531:5)
    BehaviourManager::Update() [__ZN16BehaviourManager6UpdateEv] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2209655:2)
    InitPlayerLoopCallbacks()::UpdateScriptRunBehaviourUpdatestruct::Forward() [__ZZ23InitPlayerLoopCallbacksvEN36UpdateScriptRunBehaviourUpdatestruct7ForwardEv] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2483715:2)
    PlayerLoop() [__Z10PlayerLoopv] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:707829:14)
    MainLoop() [__ZL8MainLoopv] (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:1688475:3)
    dynCall_v (TestHealthCheckRefreshTimers5.5.4Dev.asm.js:2605608:2)
    dynCall [Runtime.dynCall] (TestHealthCheckRefreshTimers5.5.4Dev.js:299:11)
    _emscripten_set_main_loop [_emscripten_set_main_loop/browserIterationFunc] (TestHealthCheckRefreshTimers5.5.4Dev.js:1983:4)
    runIter [Browser.mainLoop.runIter] (TestHealthCheckRefreshTimers5.5.4Dev.js:2085:5)
    Browser_mainLoop_runner (TestHealthCheckRefreshTimers5.5.4Dev.js:2021:3)
     
  5. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    could you please submit a bug report and post the bug number here?
     
  6. Jarrodsh

    Jarrodsh

    Joined:
    Aug 18, 2017
    Posts:
    7
    I have submitted a bug report. The number is 948807.
     
  7. changjie_qiu

    changjie_qiu

    Joined:
    Jul 5, 2015
    Posts:
    1
    Did you solve this problem??
     
  8. jvalenciag

    jvalenciag

    Joined:
    Dec 2, 2018
    Posts:
    2
    I am having the same problem. Did you solved? I cannot find the the bug report.
     
    Last edited: Feb 2, 2019