-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic in AudioBufferSourceNode #134
Comments
Hi @jipodine, thanks for flagging this with us. This is probably an issue with the underlying rust audio implementation.
|
Hi,
Thank you for you help.
* which version are you running?
0.20.0
* which loop parameters are set? (loop, loopStart, loopEnd)
only `loop` (true)
* what |start| call was made? |start(when, offset, duration)|
I do not know exactly, but it could be possible that I tried to start a
with a very big `offset` (to synchronise with already playing sounds).
`when` is between audioContext.now and (audioContext.now + 1)
`duration` is undefined.
* which of the audio params are set? (detune, playbackrate)
none
* does it panic at the first loop iterations, or after several?
I do not know, but a guess would be at the first one with a very big offset.
|
It might also be that I played the sound in loop for a long time: like 2 hours for a 1 minute buffer. |
Hey, thanks for the feedback @otto, rapidly checking the Rust code, unless I missed something it seems we don't actually make all the checks and clamping defined here: https://webaudio.github.io/web-audio-api/#dom-audiobuffersourcenode-start-when-offset-duration-offset, can you have another look? |
Sure, I'm having a look. I'm writing a fuzzer now that tests the whole range of possible configurations, and I have already found a case where processing hangs indefinitely. I have yet to track the panic condition, but will indeed look at clamping first. |
About clamping, #135 might be related. |
Apologies, I have not been able to spend a lot of time on this. |
(hopefully) fixed in v0.21.2 Let's re-open if we see it again |
While trying to play a looped bufferSourceNode, I got the following error:
And it failed to quit or crash the application
Hard to replicate, but it seems that the loop bound is not safely clipped.
The text was updated successfully, but these errors were encountered: