#sound gain html runtime crash
1 messages · Page 1 of 1 (latest)
Uncaught TypeError: Cannot read properties of null (reading 'gain')
at _rR (jam-template-src.js?QJEAC=1938144749:6078:252)
at _VQ (jam-template-src.js?QJEAC=1938144749:1488:215)
at _HQ4._n6 [as _O5] (jam-template-src.js?QJEAC=1938144749:4184:25)
at _HQ4._et2 (jam-template-src.js?QJEAC=1938144749:8967:424)
at _Bi3._et2 (jam-template-src.js?QJEAC=1938144749:8765:294)
at _Bi3._P93 (jam-template-src.js?QJEAC=1938144749:8765:475)
at _dM1 (jam-template-src.js?QJEAC=1938144749:5628:70)
at _HQ4._ga [as _O5] (jam-template-src.js?QJEAC=1938144749:4692:492)
at _HQ4._et2 (jam-template-src.js?QJEAC=1938144749:8967:424)
at _Bi3._et2 (jam-template-src.js?QJEAC=1938144749:8765:294)
I stopped in the debugger and we can see, that this _zL3 resolves to null in the const declaration:
ok... figured it out - it's audio_sound_gain which crashes
what's the new way to set the volume of a sound?
ok... it seems i have to set the gain when i call audio_play_sound as parameter -- that's ok - but how to modify the volume of an already playing sound if audio_sound_gain crashes?
audio_sound_gain() shouldn't crash
We’ve had a recent discussion on audio_sound_gain() causing a crash (in #lazy_gm_bug_reports)
Make sure that the audio context is available or that the audio_play_sound is not returning -1
oh is it that bug still?
Yeah
damn
yep - ty -- I wrote a bit of "safety" code around it -- it's working for now but yeah, there's definitely something not perfectly in place here
Yeah fuji mentioned that they added in a bunch of checks for emitters that failed silently, so that might’ve had been extended to assets too
i see -- i will open another question shortly because I might have a language-barrier//understanding problem with the manual -- it's also about sounds but it's another topic - don't want to hijack my own thread