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. Dismiss Notice

Unity 5.5 WebGL crash when UnityEngine.Object.Destroy (GameObject)

Discussion in 'WebGL' started by Dinacode, Dec 7, 2016.

  1. Dinacode

    Dinacode

    Joined:
    Nov 25, 2014
    Posts:
    5
    Hi

    Unity 5.5 WebGL now crashes when I try to Destroy a GameObject. This worked perfectly on Unity <= 4.4 but after update to 5.5 now crashes. It only happens on WebGL, Android ILL2CPP and IOS ILL2CPP still woks fine. I have tried all build combinations (Strip Engine Code (on/off) , Api Compatibility Level (.NET 2.0/.NET 2.0subset )) but is crash on all combinations. The only way It doesn´t crash is when I Enable Exceptions to FULL but, of course, I can use it on production because of performance and memory issues.

    That´s so annoying.
    Any Idea?
    Thanks.

    Here there is the Exception trace:

    Not implemented: Class::FromIl2CppType
    VM114:1 Invoking error handler due to
    Uncaught Assertion failed: klass, at: /Applications/Unity/Unity.app/Contents/il2cpp/libil2cpp/vm/Class.cpp,1403,Init at Error
    at jsStackTrace (ba8.js?06a154816730bc5:1:19540)
    at stackTrace (ba8.js?06a154816730bc5:1:19711)
    at ___assert_fail (ba8.js?06a154816730bc5:1:228756)
    at i5B (ba8.asm.js?06a154816730bc5:28:358901)
    at irC [Array.irC] (ba8.asm.js?06a154816730bc5:28:678046)
    at $8C [Object.$8C] (ba8.asm.js?06a154816730bc5:40:531470)
    at invoke_viiii (ba8.js?06a154816730bc5:1:350557)
    at mrC [Array.mrC] (ba8.asm.js?06a154816730bc5:28:680615)
    at caD [Object.caD] (ba8.asm.js?06a154816730bc5:40:538415)
    at invoke_viii (ba8.js?06a154816730bc5:1:361646)
    at jAl (ba8.asm.js?06a154816730bc5:6:333543)
    at iAl (ba8.asm.js?06a154816730bc5:6:332592)
    at hAl (ba8.asm.js?06a154816730bc5:6:332189)
    at Ljt [Array.Ljt] (ba8.asm.js?06a154816730bc5:4:246875)
    at q9C [Object.q9C] (ba8.asm.js?06a154816730bc5:40:533074)
    at invoke_viiiii (ba8.js?06a154816730bc5:1:353537)
    at Ykw [Array.Ykw] (ba8.asm.js?06a154816730bc5:11:880586)
    at oCl (ba8.asm.js?06a154816730bc5:6:365171)
    at Aaw [Array.Aaw] (ba8.asm.js?06a154816730bc5:11:745935)
    at OVA (ba8.asm.js?06a154816730bc5:7:459467)
    at xaw [Array.xaw] (ba8.asm.js?06a154816730bc5:11:743509)
    at Ljt (ba8.asm.js?06a154816730bc5:4:246904)
    at O6v [Array.O6v] (ba8.asm.js?06a154816730bc5:11:696745)
    at wct (ba8.asm.js?06a154816730bc5:4:201359)
    at Vaw [Array.Vaw] (ba8.asm.js?06a154816730bc5:11:746884)
    at tBl (ba8.asm.js?06a154816730bc5:6:355647)
    at Uaw [Array.Uaw] (ba8.asm.js?06a154816730bc5:11:746302)
    at hks [Array.hks] (ba8.asm.js?06a154816730bc5:16:794254)
    at CaD [Object.CaD] (ba8.asm.js?06a154816730bc5:40:541197)
    at invoke_iiii (ba8.js?06a154816730bc5:1:366420)
    at heC (ba8.asm.js?06a154816730bc5:28:530345)
    at jiC (ba8.asm.js?06a154816730bc5:28:570232)
    at _Fa (ba8.asm.js?06a154816730bc5:10:850531)
    at l$a (ba8.asm.js?06a154816730bc5:19:477544)
    at XAc [Array.XAc] (ba8.asm.js?06a154816730bc5:13:234789)
    at WKa (ba8.asm.js?06a154816730bc5:10:1046911)
    at KKa (ba8.asm.js?06a154816730bc5:10:1039026)
    at KKa (ba8.asm.js?06a154816730bc5:10:1039156)
    at KKa (ba8.asm.js?06a154816730bc5:10:1039156)
    at KKa (ba8.asm.js?06a154816730bc5:10:1039156)
    at KKa (ba8.asm.js?06a154816730bc5:10:1039156)
    at KKa (ba8.asm.js?06a154816730bc5:10:1039156)
    at KKa (ba8.asm.js?06a154816730bc5:10:1039156)
    at KKa (ba8.asm.js?06a154816730bc5:10:1039156)
    at IKa (ba8.asm.js?06a154816730bc5:10:1038479)
    at QGa (ba8.asm.js?06a154816730bc5:10:875585)
    at sjc [Array.sjc] (ba8.asm.js?06a154816730bc5:20:509653)
    at j5b [Array.j5b] (ba8.asm.js?06a154816730bc5:14:1009979)
    at Upb [Array.Upb] (ba8.asm.js?06a154816730bc5:21:273701)
    at kPa (ba8.asm.js?06a154816730bc5:19:77332)
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    could you post a Development build callstack?
     
  3. Dinacode

    Dinacode

    Joined:
    Nov 25, 2014
    Posts:
    5
    Here there is the Development stacktrace:

    Not implemented: Class::FromIl2CppType
    VM417:3136 Invoking error handler due to
    Uncaught Assertion failed: klass, at: /Applications/Unity/Unity.app/Contents/il2cpp/libil2cpp/vm/Class.cpp,1403,Init at Error
    at jsStackTrace (ba8.js?06a154816730bc5:859:12)
    at stackTrace (ba8.js?06a154816730bc5:873:11)
    at ___assert_fail (ba8.js?06a154816730bc5:9612:207)
    at il2cpp::vm::Class::Init(Il2CppClass*) [__ZN6il2cpp2vm5Class4InitEP11Il2CppClass] (ba8.asm.js?06a154816730bc5:2258545:11)
    at il2cpp::vm::Type::GetNameInternal(std::__2::basic_ostringstream<char, std::__2::char_traits<char>, std::__2::allocator<char> >&, Il2CppType const*, Il2CppTypeNameFormat, bool) [Array.__ZN6il2cpp2vm4Type15GetNameInternalERNSt3__219basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPK10Il2CppType20Il2CppTypeNameFormatb] (ba8.asm.js?06a154816730bc5:516865:4)
    at dynCall_viiii [Object.dynCall_viiii] (ba8.asm.js?06a154816730bc5:2755853:33)
    at invoke_viiii (ba8.js?06a154816730bc5:16538:26)
    at il2cpp::vm::Type::GetName(Il2CppType const*, Il2CppTypeNameFormat) [Array.__ZN6il2cpp2vm4Type7GetNameEPK10Il2CppType20Il2CppTypeNameFormat] (ba8.asm.js?06a154816730bc5:1440748:4)
    at dynCall_viii [Object.dynCall_viii] (ba8.asm.js?06a154816730bc5:2787476:33)
    at invoke_viii (ba8.js?06a154816730bc5:16986:25)
    at il2cpp::vm::Class::RaiseExecutionEngineException(Il2CppClass*, Il2CppClass*) [__ZN6il2cpp2vm5Class29RaiseExecutionEngineExceptionEP11Il2CppClassS3_] (ba8.asm.js?06a154816730bc5:937091:8)
    at il2cpp::vm::Class::GetInterfaceOffset(Il2CppClass*, Il2CppClass*, bool) [__ZN6il2cpp2vm5Class18GetInterfaceOffsetEP11Il2CppClassS3_b] (ba8.asm.js?06a154816730bc5:2190042:3)
    at il2cpp_codegen_get_interface_invoke_data(unsigned int, Il2CppClass*, void*, VirtualInvokeData*) [__Z40il2cpp_codegen_get_interface_invoke_datajP11Il2CppClassPvP17VirtualInvokeData] (ba8.asm.js?06a154816730bc5:2424846:21)
    at InterfaceActionInvoker2<Il2CppObject*, EventCallback_t2690062457*>::Invoke(unsigned int, Il2CppClass*, void*, Il2CppObject*, EventCallback_t2690062457*) [Array.__ZN23InterfaceActionInvoker2IP12Il2CppObjectP25EventCallback_t2690062457E6InvokeEjP11Il2CppClassPvS1_S3_] (ba8.asm.js?06a154816730bc5:2374890:2)
    at dynCall_viiiii [Object.dynCall_viiiii] (ba8.asm.js?06a154816730bc5:2731986:34)
    at invoke_viiiii (ba8.js?06a154816730bc5:16674:27)
    at _AvatarDisplayMediator_OnRemove_m1069380144 [Array._AvatarDisplayMediator_OnRemove_m1069380144] (ba8.asm.js?06a154816730bc5:1283835:4)
    at InterfaceActionInvoker0::Invoke(unsigned int, Il2CppClass*, void*) [__ZN23InterfaceActionInvoker06InvokeEjP11Il2CppClassPv] (ba8.asm.js?06a154816730bc5:2474824:45)
    at _MediationBinder_unmapView_m3867351209 [Array._MediationBinder_unmapView_m3867351209] (ba8.asm.js?06a154816730bc5:1948109:16)
    at VirtActionInvoker2<Il2CppObject*, Il2CppObject*>::Invoke(unsigned int, void*, Il2CppObject*, Il2CppObject*) [__ZN18VirtActionInvoker2IP12Il2CppObjectS1_E6InvokeEjPvS1_S1_] (ba8.asm.js?06a154816730bc5:2462165:46)
    at _MediationBinder_Trigger_m2772559931 [Array._MediationBinder_Trigger_m2772559931] (ba8.asm.js?06a154816730bc5:2108930:22)
    at InterfaceActionInvoker2<int, Il2CppObject*>::Invoke(unsigned int, Il2CppClass*, void*, int, Il2CppObject*) [__ZN23InterfaceActionInvoker2IiP12Il2CppObjectE6InvokeEjP11Il2CppClassPviS1_] (ba8.asm.js?06a154816730bc5:2400741:46)
    at _MVCSContext_RemoveView_m2484880243 [Array._MVCSContext_RemoveView_m2484880243] (ba8.asm.js?06a154816730bc5:2437685:2)
    at InterfaceActionInvoker1<Il2CppObject*>::Invoke(unsigned int, Il2CppClass*, void*, Il2CppObject*) [__ZN23InterfaceActionInvoker1IP12Il2CppObjectE6InvokeEjP11Il2CppClassPvS1_] (ba8.asm.js?06a154816730bc5:2429542:46)
    at _View_bubbleToContext_m767670831 [Array._View_bubbleToContext_m767670831] (ba8.asm.js?06a154816730bc5:1413449:4)
    at VirtActionInvoker3<MonoBehaviour_t1158329972*, bool, bool>::Invoke(unsigned int, void*, MonoBehaviour_t1158329972*, bool, bool) [__ZN18VirtActionInvoker3IP25MonoBehaviour_t1158329972bbE6InvokeEjPvS1_bb] (ba8.asm.js?06a154816730bc5:2423495:47)
    at _View_OnDestroy_m522232611 [Array._View_OnDestroy_m522232611] (ba8.asm.js?06a154816730bc5:2761426:2)
    at RuntimeInvoker_Void_t1841601450(MethodInfo const*, void*, void**) [Array.__Z31RuntimeInvoker_Void_t1841601450PK10MethodInfoPvPS2_] (ba8.asm.js?06a154816730bc5:2749637:45)
    at dynCall_iiii [Object.dynCall_iiii] (ba8.asm.js?06a154816730bc5:2772852:40)
    at invoke_iiii (ba8.js?06a154816730bc5:17194:32)
    at il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) [__ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException] (ba8.asm.js?06a154816730bc5:2190001:8)
    at _il2cpp_runtime_invoke (ba8.asm.js?06a154816730bc5:2630452:9)
    at scripting_method_invoke(ScriptingMethodIl2Cpp, Il2CppObject*, ScriptingArguments&, Il2CppException**, bool) [__Z23scripting_method_invoke21ScriptingMethodIl2CppP12Il2CppObjectR18ScriptingArgumentsPP15Il2CppExceptionb] (ba8.asm.js?06a154816730bc5:2363916:8)
    at ScriptingInvocation::Invoke(Il2CppException**, bool) [__ZN19ScriptingInvocation6InvokeEPP15Il2CppExceptionb] (ba8.asm.js?06a154816730bc5:1685741:7)
    at ScriptingInvocation::InvokeChecked(Il2CppException**) [__ZN19ScriptingInvocation13InvokeCheckedEPP15Il2CppException] (ba8.asm.js?06a154816730bc5:2186357:7)
    at MonoBehaviour::WillDestroyComponent() [Array.__ZN13MonoBehaviour20WillDestroyComponentEv] (ba8.asm.js?06a154816730bc5:1297065:2)
    at GameObject::WillDestroyGameObject() [__ZN10GameObject21WillDestroyGameObjectEv] (ba8.asm.js?06a154816730bc5:2508119:70)
    at PreDestroyRecursive(GameObject&, unsigned int*) [__ZL19PreDestroyRecursiveR10GameObjectPj] (ba8.asm.js?06a154816730bc5:2136088:2)
    at PreDestroyRecursive(GameObject&, unsigned int*) [__ZL19PreDestroyRecursiveR10GameObjectPj] (ba8.asm.js?06a154816730bc5:2136097:3)
    at PreDestroyRecursive(GameObject&, unsigned int*) [__ZL19PreDestroyRecursiveR10GameObjectPj] (ba8.asm.js?06a154816730bc5:2136097:3)
    at PreDestroyRecursive(GameObject&, unsigned int*) [__ZL19PreDestroyRecursiveR10GameObjectPj] (ba8.asm.js?06a154816730bc5:2136097:3)
    at PreDestroyRecursive(GameObject&, unsigned int*) [__ZL19PreDestroyRecursiveR10GameObjectPj] (ba8.asm.js?06a154816730bc5:2136097:3)
    at PreDestroyRecursive(GameObject&, unsigned int*) [__ZL19PreDestroyRecursiveR10GameObjectPj] (ba8.asm.js?06a154816730bc5:2136097:3)
    at PreDestroyRecursive(GameObject&, unsigned int*) [__ZL19PreDestroyRecursiveR10GameObjectPj] (ba8.asm.js?06a154816730bc5:2136097:3)
    at PreDestroyRecursive(GameObject&, unsigned int*) [__ZL19PreDestroyRecursiveR10GameObjectPj] (ba8.asm.js?06a154816730bc5:2136097:3)
    at DestroyGameObjectHierarchy(GameObject&) [__Z26DestroyGameObjectHierarchyR10GameObject] (ba8.asm.js?06a154816730bc5:2175428:2)
    at DestroyObjectHighLevel(Object*, bool) [__Z22DestroyObjectHighLevelP6Objectb] (ba8.asm.js?06a154816730bc5:647995:4)
    at DelayedDestroyCallback(Object*, void*) [Array.__Z22DelayedDestroyCallbackP6ObjectPv] (ba8.asm.js?06a154816730bc5:2811015:2)
    at DelayedCallManager::Update(int) [Array.__ZN18DelayedCallManager6UpdateEi] (ba8.asm.js?06a154816730bc5:891284:63)
    at InitPlayerLoopCallbacks()::UpdateScriptRunDelayedDynamicFrameRatestruct::Forward() [Array.__ZZ23InitPlayerLoopCallbacksvEN44UpdateScriptRunDelayedDynamicFrameRatestruct7ForwardEv] (ba8.asm.js?06a154816730bc5:2699882:70)
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    @Dinacode

    Can you submit a bug report with this issue? It looks like the libil2cpp runtime is attempting to throw an ExecutionEngineException because some type is missing (maybe because of code code we did not properly compiler ahead-of-time). But in the process of formatting the exception message, we were unable to get some type information. The inability to get type information is a side effect of the WebGL build created without Enable Exceptions set to FULL, which is expected. However, the code in libil2cpp should be able to handle that case and correct throw the managed exception.

    So this looks like a bit of a corner case, but it is one we should be able to handle. If you can provide a project to reproduce it, I would love to be able to correct it.
     
  5. solmyr-fr

    solmyr-fr

    Joined:
    Jun 18, 2009
    Posts:
    24
    Hi, any news ?
    I got something similar today (no probrem in 5.4) in webGL 5.5.0f3 :
    Invoking error handler due to
    Uncaught Assertion failed: klass, at: C:\Program Files\Unity\Editor\Data\il2cpp\libil2cpp\vm\Class.cpp,1403,Init at Error

    at jsStackTrace (debug.jsgz:1:19540)
    at stackTrace (debug.jsgz:1:19711)
    at ___assert_fail (debug.jsgz:1:224369)
    at aHn (debug.asm.jsgz:43:219768)
    at P6n (debug.asm.jsgz:13:369083)
    at R6n [Array.R6n] (debug.asm.jsgz:13:369738)
    at PGo [Object.PGo] (debug.asm.jsgz:13:1006387)
    at invoke_ii (debug.jsgz:1:347868)
    at bil [Array.bil] (debug.asm.jsgz:41:437623)
    at $ql [Array.$ql] (debug.asm.jsgz:6:161014)
    at cHo [Object.cHo] (debug.asm.jsgz:13:1008044)
    at invoke_iiii (debug.jsgz:1:350632)
    at iPn (debug.asm.jsgz:13:104828)
    at wPn (debug.asm.jsgz:13:109394)
    at P6n (debug.asm.jsgz:13:369285)
    at R6n (debug.asm.jsgz:13:369738)
    at hZn (debug.asm.jsgz:13:213544)
    at aPn (debug.asm.jsgz:13:101913)
    at VQn (debug.asm.jsgz:13:131575)
    at Cia (debug.asm.jsgz:9:20426)
    at yia [Object.yia] (debug.asm.jsgz:9:15943)
    at callMain [Object.callMain] (debug.jsgz:3:30264)
    at doRun (debug.jsgz:3:30970)
     
    Last edited: Jan 4, 2017
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    @solmyr-fr

    We have not been able to track down the cause of this issue yet. If you can provide a bug report, that would be a great help, as this seems to be a very special case.
     
  7. solmyr-fr

    solmyr-fr

    Joined:
    Jun 18, 2009
    Posts:
    24
    Hi Josh.
    I've just tested on another computer (with on other version on chrome (55.0.2883)), this time, the app loaded after the splashscreen (yesterday i had nothing at all, not even the splashscreen ) but still crashed after another error :
    GET https://config.uca.cloud.unity3d.com/local.44c7752af6a882a41963451360760cb7.json 403 (Forbidden)
    Strange, it's seem to be somehting else entierly (i searched on the forum on found it could be link to Analytics or PlayerPrefs this time...).

    I corrected some other warnings I had and will try to rebuild tomorrow (with my computer at home using 5.5 because my working computer is still on 5.4)..