Audio Crashes Player

WebGL support has been pretty damn incredible! It’s working!

I’m noticing crash issues with Audio.

TypeError: Failed to set the ‘value’ property on ‘AudioParam’: The provided float value is non-finite.
native::in TypeError
blob:http%3A//play.blocksworld.com/08834fdc-0d45-4280-b306-3dca131b307a:1:in _JS_Sound_SetVolume

I have noticed that the Web Audio implementation is very prone to errors - some of them come in due to having display:none and no canvas size. I have been able to work around these with very careful use of “visibility:hidden” instead of “display:none” and Pausing the Engine when ever the canvas needs to adjust size.

I am now experiencing a similar crash while a game is running without resizing.

I would like to see _JS_Sound_SetVolume have a guard function to check for values that are invalid instead of crashing the engine.

I have been able to hack around this issue for positional audio by monkey-patching ‘setPosition’.

Unfortunately I cannot do this with _JS_Sound_SetVolume.

Please could _JS_Sound_SetVolume be written in such a way as to protect assigning invalid values.

Best,

Curtis.

Linden Lab

While we could add code to check for invalid values all over the place, that is really just hiding the more fundamental issue of getting invalid values in the first place. So let’s get a bug report on this with a repro case, so we can figure this out.

Also, any chance that this issue is specific to Chrome? If it is, I might know what is causing it (and how to fix it).

Dear Jonas,

Thank you for your consideration and response.

It does appear to be related to chrome. Testing in Firefox doesn’t appear to crash due to audio.

@jonas-echterhoff_1 do you remember what could be the issue?
It started to randomly happen to us in some old and new builds. Only on Chrome.

One or more runs we get
TypeError: Failed to execute ‘setValueAtTime’ on ‘AudioParam’: The provided float value is non-finite
at _JS_Sound_SetListenerPosition
We clean cache and it suddenly works again