gelic-idealab / komodo-unity

Unity VR client for the Komodo XR platform
5 stars 3 forks source link

Invoking error handler due to RuntimeError: float unrepresentable in integer range #66

Closed parseccentric closed 3 years ago

parseccentric commented 3 years ago

Build: A project with KomodoCore package added.

Player Settings: The usual for Komodo, but Enable Exceptions is Full Without Stacktrace

Unity version: 2020.2.1f1.

Action: Open the same session with client A first, then join the same session with client B.

Expected Behavior: Client B gets added to client A's world successfully, with no errors.

Actual Behavior: The WebGL frame crashes.

Invoking error handler due to
RuntimeError: float unrepresentable in integer range
    at _NetworkUpdateHandler_OnUpdate_mE5B0812FD583C4771D4F5C642DCAB16565133E11 (<anonymous>:wasm-function[67995]:0x1382541)
    at __ZN23InterfaceActionInvoker1IfE6InvokeEtP11Il2CppClassP12Il2CppObjectf (<anonymous>:wasm-function[54890]:0x10d2f9c)
    at _GameStateManager_Update_m8B3893222DD9F028DC71D529FD8FF2C8B0FE1F62 (<anonymous>:wasm-function[71638]:0x1444907)
    at __Z65RuntimeInvoker_TrueVoid_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5PFvvEPK10MethodInfoPvPS4_ (<anonymous>:wasm-function[31486]:0xd342c3)
    at dynCall_iiiii (<anonymous>:wasm-function[116127]:0x237da37)
    at Object.dynCall_iiiii (https://vr.komodo-dev.library.illinois.edu/test/Build-2020.2-Attempt2/Build/Build-2020.2-Attempt2.framework.js:28037:40)
    at invoke_iiiii (https://vr.komodo-dev.library.illinois.edu/test/Build-2020.2-Attempt2/Build/Build-2020.2-Attempt2.framework.js:17880:33)
    at __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException (<anonymous>:wasm-function[113049]:0x23037a8)
    at _il2cpp_runtime_invoke (<anonymous>:wasm-function[111977]:0x22dd453)
    at __Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb (<anonymous>:wasm-function[5707]:0x2421c7)
    at __ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb (<anonymous>:wasm-function[5705]:0x241f8a)
    at __ZN13MonoBehaviour16CallUpdateMethodEi (<anonymous>:wasm-function[12822]:0x4a8efc)
    at __ZN13MonoBehaviour6UpdateEv (<anonymous>:wasm-function[12791]:0x4a7841)
    at __ZN20BaseBehaviourManager12CommonUpdateI16BehaviourManagerEEvv (<anonymous>:wasm-function[15518]:0x5f371d)
    at __ZN16BehaviourManager6UpdateEv (<anonymous>:wasm-function[15523]:0x5f3edb)
    at __ZZ23InitPlayerLoopCallbacksvEN41UpdateScriptRunBehaviourUpdateRegistrator7ForwardEv (<anonymous>:wasm-function[13493]:0x4f1633)
    at __Z17ExecutePlayerLoopP22NativePlayerLoopSystem (<anonymous>:wasm-function[12939]:0x4b3e62)
    at __Z17ExecutePlayerLoopP22NativePlayerLoopSystem (<anonymous>:wasm-function[12939]:0x4b3e77)
    at __Z10PlayerLoopv (<anonymous>:wasm-function[12924]:0x4b2e42)
    at __ZL8MainLoopv (<anonymous>:wasm-function[12912]:0x4b0f5d)
    at dynCall_v (<anonymous>:wasm-function[116220]:0x237e537)
    at Object.dynCall_v (https://vr.komodo-dev.library.illinois.edu/test/Build-2020.2-Attempt2/Build/Build-2020.2-Attempt2.framework.js:28502:36)
    at browserIterationFunc (https://vr.komodo-dev.library.illinois.edu/test/Build-2020.2-Attempt2/Build/Build-2020.2-Attempt2.framework.js:9721:23)
    at Object.runIter (https://vr.komodo-dev.library.illinois.edu/test/Build-2020.2-Attempt2/Build/Build-2020.2-Attempt2.framework.js:9823:5)
    at Browser_mainLoop_runner (https://vr.komodo-dev.library.illinois.edu/test/Build-2020.2-Attempt2/Build/Build-2020.2-Attempt2.framework.js:9759:20)

(Short version of stack trace:

NetworkUpdateHandler.OnUpdate
[interfaceActionInvoker]
GameStateManager.Update
[dynCall]
...
parseccentric commented 3 years ago

@davtamay I'm looking at this now, but I realized we could keep talking about undeployed things in the issues if we use the develop-branch.

parseccentric commented 3 years ago

I tried to fix this in https://github.com/gelic-idealab/komodo-unity/pull/69 (see the _ClampFloatToInt32 function), but the app still complains the same way. The current solution is to go to Unity > Edit > Project Settings > Player > Other Settings > WebAssembly Arithmetic Exceptions and make sure it is set to Ignore.