Search Unity

WebGL exception problem

Discussion in 'Web' started by bartofzo, Nov 27, 2018.

  1. bartofzo

    bartofzo

    Joined:
    Mar 16, 2017
    Posts:
    151
    Hi,

    I'm running into a problem with a WebGL build. When I set Enable Exceptions to Explicitly Thrown Exceptions Only the build runs without any problems. When I set it to None however (and build a development build) the following stacktrace is logged to the console:

    Code (CSharp):
    1. Exception at:
    2. Error
    3.     at jsStackTrace (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:966:12)
    4.     at stackTrace (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:980:11)
    5.     at blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:346:36
    6.     at __ZN6il2cpp2vm9Exception5RaiseEP15Il2CppExceptionP19Il2CppSequencePointP10MethodInfo [il2cpp::vm::Exception::Raise(Il2CppException*, Il2CppSequencePoint*, MethodInfo*)] (wasm-function[64614]:32)
    7.     at __Z30il2cpp_codegen_raise_exceptionP11Exception_tP19Il2CppSequencePointP10MethodInfo [il2cpp_codegen_raise_exception(Exception_t*, Il2CppSequencePoint*, MethodInfo*)] (wasm-function[23972]:7)
    8.     at _FileStream__ctor_m3151488352 (wasm-function[48168]:1184)
    9.     at _FileStream__ctor_m2889718780 (wasm-function[48181]:20)
    10.     at _File_OpenRead_m2936789020 (wasm-function[48182]:60)
    11.     at _TimeZoneInfo_FindSystemTimeZoneByFileName_m2720246141 (wasm-function[46402]:44)
    12.     at _TimeZoneInfo_CreateLocal_m701291163 (wasm-function[46399]:566)
    13.     at _TimeZoneInfo_get_Local_m2495540097 (wasm-function[46398]:57)
    14.     at _TimeZoneInfo_GetDateTimeNowUtcOffsetFromUtc_m3893949862 (wasm-function[46449]:51)
    15.     at _DateTime_get_Now_m1277138875 (wasm-function[53536]:194)
    16.     at _GUI__cctor_m3051457990 (wasm-function[59067]:379)
    17.     at __Z31RuntimeInvoker_Void_t1185182177PFvvEPK10MethodInfoPvPS4_ [RuntimeInvoker_Void_t1185182177(void (*)(), MethodInfo const*, void*, void**)] (wasm-function[22399]:17)
    18.     at __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException [il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)] (wasm-function[64007]:94)
    19.     at __ZN6il2cpp2vm7Runtime9ClassInitEP11Il2CppClass [il2cpp::vm::Runtime::ClassInit(Il2CppClass*)] (wasm-function[64009]:260)
    20.     at _GUIUtility_ResetGlobalState_m2426294461 (wasm-function[59469]:66)
    21.     at _GUIUtility_BeginGUI_m1428629348 (wasm-function[59468]:72)
    22.     at __Z85RuntimeInvoker_Void_t1185182177_Int32_t2950945753_Int32_t2950945753_Int32_t2950945753PFvvEPK10MethodInfoPvPS4_ [RuntimeInvoker_Void_t1185182177_Int32_t2950945753_Int32_t2950945753_Int32_t2950945753(void (*)(), MethodInfo const*, void*, void**)] (wasm-function[22433]:40)
    23.     at __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException [il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)] (wasm-function[64007]:94)
    24.     at _il2cpp_runtime_invoke (wasm-function[64392]:36)
    25.     at __Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb [scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)] (wasm-function[3682]:64)
    26.     at __ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb [ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)] (wasm-function[3680]:258)
    27.     at __ZN19ScriptingInvocation6InvokeIvEET_P21ScriptingExceptionPtrb [void ScriptingInvocation::Invoke<void>(ScriptingExceptionPtr*, bool)] (wasm-function[4231]:7)
    28.     at __ZN21IMGUIScriptingClasses8BeginGUIEiiiP21ScriptingExceptionPtr [IMGUIScriptingClasses::BeginGUI(int, int, int, ScriptingExceptionPtr*)] (wasm-function[12695]:163)
    29.     at __Z18MonoBehaviourDoGUIiR14ObjectGUIStateN13MonoBehaviour13GUILayoutTypeEi18ScriptingMethodPtr4PPtrIS1_E [MonoBehaviourDoGUI(int, ObjectGUIState&, MonoBehaviour::GUILayoutType, int, ScriptingMethodPtr, PPtr<MonoBehaviour>)] (wasm-function[12811]:427)
    30.     at __ZN11IMGUIModule18MonoBehaviourDoGUIEiR14ObjectGUIStateN13MonoBehaviour13GUILayoutTypeEi18ScriptingMethodPtr4PPtrIS2_E [IMGUIModule::MonoBehaviourDoGUI(int, ObjectGUIState&, MonoBehaviour::GUILayoutType, int, ScriptingMethodPtr, PPtr<MonoBehaviour>)] (wasm-function[12822]:93)
    31.     at __ZN13MonoBehaviour5DoGUIENS_13GUILayoutTypeEii [MonoBehaviour::DoGUI(MonoBehaviour::GUILayoutType, int, int)] (wasm-function[8593]:509)
    32.     at __ZL18MonoBehaviourDoGUIPvN13MonoBehaviour13GUILayoutTypeEii [MonoBehaviourDoGUI(void*, MonoBehaviour::GUILayoutType, int, int)] (wasm-function[12768]:27)
    33.     at __ZNK10GUIManager16GUIObjectWrapper5DoGUIEN13MonoBehaviour13GUILayoutTypeEii [GUIManager::GUIObjectWrapper::DoGUI(MonoBehaviour::GUILayoutType, int, int) const] (wasm-function[12772]:328)
    34.     at __ZN10GUIManager10DoGUIEventER10InputEventb [GUIManager::DoGUIEvent(InputEvent&, bool)] (wasm-function[12766]:1594)
    35.     at __ZZN10GUIManager14InitGUIManagerEvEN38UIEventsIMGUIRenderOverlaysRegistrator7ForwardEi [GUIManager::InitGUIManager()::UIEventsIMGUIRenderOverlaysRegistrator::Forward(int)] (wasm-function[12759]:121)
    36.     at __Z12PlayerRenderb [PlayerRender(bool)] (wasm-function[9554]:732)
    37.     at __ZZ23InitPlayerLoopCallbacksvEN45PostLateUpdateFinishFrameRenderingRegistrator7ForwardEv [InitPlayerLoopCallbacks()::PostLateUpdateFinishFrameRenderingRegistrator::Forward()] (wasm-function[9478]:53)
    38.     at __Z17ExecutePlayerLoopP22NativePlayerLoopSystem [ExecutePlayerLoop(NativePlayerLoopSystem*)] (wasm-function[8738]:163)
    39.     at __Z17ExecutePlayerLoopP22NativePlayerLoopSystem [ExecutePlayerLoop(NativePlayerLoopSystem*)] (wasm-function[8738]:184)
    40.     at __Z10PlayerLoopv [PlayerLoop()] (wasm-function[8734]:462)
    41.     at __ZL8MainLoopv [MainLoop()] (wasm-function[8721]:142)
    42.     at dynCall_v (wasm-function[66861]:12)
    43.     at Object.dynCall_v (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:26682:36)
    44.     at browserIterationFunc (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:7024:23)
    45.     at Object.runIter (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:7126:5)
    46.     at Browser_mainLoop_runner (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:7062:20)
    47. UnityLoader.js:417 Invoking error handler due to
    48. Uncaught undefined - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.
    Nowhere in this stacktrace can I find a call that is made from my own code. Can anyone point me in the right direction? Also, I've read in the docs that enabling full exceptions has an impact on performance. Is there any benefit in using No exceptions vs. Only explicit?

    (Unity 2018.2.16f1)
     
  2. Nimonymous

    Nimonymous

    Joined:
    Jul 15, 2016
    Posts:
    9
  3. bartofzo

    bartofzo

    Joined:
    Mar 16, 2017
    Posts:
    151
  4. bartofzo

    bartofzo

    Joined:
    Mar 16, 2017
    Posts:
    151
    Problem still exists after updating to 2018.3
     
  5. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    What were you doing in your game when the error happens?
     
  6. bartofzo

    bartofzo

    Joined:
    Mar 16, 2017
    Posts:
    151
  7. themikebabz

    themikebabz

    Joined:
    Oct 4, 2022
    Posts:
    1
    I've been googling since last night and this seems like the closest to my problem as well. I'm having an issue with 2019 Unity, and MFPS exporting to Webgl. First part of my issue was an addon from them i've been able to tweak into place but now i'm getting Exception error tossed at me as well. I turned the exception error "thingy" (lol) to None, but that didnt work. I'm gonna attempt the Explicity Thrown here next. But myself its called a JS I have no idea where it is. I'm gonna check the image effects, cuz i never thought of checking that (i do know mobile and webgl get weird issues when trying to do certain things like video for example) so thanks for suggesting it.
     

    Attached Files: