[Bug][2.02.04] WebGL crash - float unrepresentable in integer range at _FMOD_OS_Time_GetUs

Hi There,

If our WebGL project is left running, after ~70minutes, an exception occurs in the FMOD stack which throws every frame subsequently and effectively freezes/crashes the experience,

The call stack is:

profiling.wasm:0x1c8bbdf Uncaught RuntimeError: float unrepresentable in integer range
    at _FMOD_OS_Time_GetUs (profiling.wasm:0x1c8bbdf)
    at __ZN5FMODZ9TimeStamp7stampInEv (profiling.wasm:0x1d00e4c)
    at __ZN5FMODZ6Output3mixEPvj (profiling.wasm:0x1d044c2)
    at __ZN5FMODZ6Output11mixCallbackEP17FMOD_OUTPUT_STATEPvj (profiling.wasm:0x1d041d3)
    at __ZN5FMODZ14OutputWebAudio9mix_to_jsEi (profiling.wasm:0x1cf618e)
    at _FMOD_JS_MixFunction (profiling.wasm:0x1cf612b)

My guess is a number which ticks ever higher reaches a value that causes the WASM error after ~70mins.

This is a fairly impactful bug for us - is it known/any work arounds?

Thanks,

Matt

I’ve created a minimal repro using the FMOD test project and hosting it at Unity WebGL Player | fmod_safari_bug

Repro Instructions:

Open link in Chrome or Safari on MacOS (haven’t tested other Operating Systems)

  1. Click Async Load Banks
  2. Click Emit Event
  3. Click Initialise Audio
  4. Wait for ~70minutes
  5. Observe crash

You can find the unity project that was built for this at:

Thanks,

Matt

I’ve updated this repro project in the previous post, including symbols so the call stack is in the error Unity WebGL Player | fmod_safari_bug

New project link:

Would edit the post above but I think that’s time limited!

Thanks for all that info Matt, I’m looking into it at the moment and will let you know how I go.

Hi, i’ve narrowed this down to a bug in the fastcomp branch, which Unity versions below 2021.2 use. Upstream emscripten does not have this issue.

What version of Unity are you using? My ā€˜quick’ solution is to use a newer Unity version, otherwise we can release a patch to pre-clamp numbers before they are converted into the integer. We could possibly provide a custom build for this if it is urgent.

1 Like

:tada: Nice one on tracking it down, that’s great! And thank you for jumping on it :pray:

Unfortunately we are blocked on our Unity upgrade path due to an unrelated WebGL performance regression present in 2021 (which we are working with Unity on)

Re. patch release - an FMOD update/patch would be great assuming that the patch is likely to release in the next 2 months?

If that timeframe is optimistic, then would love to explore if a custom build is possible.

looks like we got lucky , a patch just made it in for the upcoming release which may be out today. This will be 2.02.07 or 2.01.16

Amazing!!! Just want to check I understand your use of the word ā€œorā€ between the versions.

If it comes out in 2.01, does that mean we are waiting the next release cycle for it to land in 2.02? And if so what’s the rough cadence of patch releases?

sorry I meant ā€˜and’. I just mean you can pick one or the other.

1 Like

Gotcha! Thanks, keeping an eye out…

this is out now

1 Like

2.02.07 does indeed fix it, massive thanks to you, @cameron-fmod and the rest of the team for the hard work!