Webaudio: delete a context and create the exact same create a race condition
Reported by
p...@sketchfab.com,
May 11 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Steps to reproduce the problem: 1. AudioContext with medialEment->mediaElementSource->gain->destionation 2. play it. pause it 3. Disconnect all possible, delete all reference 3. recreate exact same configuration then play What is the expected behavior? it should play like the first AudioContext did What went wrong? the js is stuck. Pausing using devtools jsdebugger allows to see "pause called after play finished to execute etc" Did this work before? N/A Does this work in other browsers? Yes Chrome version: 58.0.3029.110 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 25.0 r0 ( related to https://bugs.chromium.org/p/chromium/issues/detail?id=721371 as in trying to overcome the 6 audiocontext limitation) Had to abandon this venue because of the race condition.
,
May 17 2017
I can repro for now only on very complex and not public url. https://jsbin.com/tiyibabevo/3/edit?js,output is the nearest I can get (sometimes there is huge "pauses" in the requestAnimationFram whereas in my case it total block) 'The play() request was interrupted by a call to pause()” error?' seems to be the culprit. so I'm fighting that in my js code for now.
,
May 17 2017
Thank you for providing more feedback. Adding requester "ligimole@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 17 2017
Thanks for the repro case. However, it's not really clear how to use it. Should I just run start_anew() from the console window to start the test?
,
May 18 2017
sorry commented the call at the end for my sanity. just uncomment it should do the trick
,
May 18 2017
note that it's a "heisenbug" as I surmise it implies race condition things, so it happens very randomly
,
May 18 2017
Thanks for the info. What's the expected output? What I see is that its starts playing the song at time 0. Then after 30 sec, it replays the song at around the 15 sec mark. It does that for a few times and then plays at time 30 once, repeats the segment at time 45 sec several times before advancing to time 60. And so on. Is the repetition of the segments at starting at time 15 the issue?
,
May 18 2017
It's supposed to play more or less seamlessly even if deleted/played https://jsbin.com/zamuhugiga/edit?js,output The Bug is when the requestAnimationFrame is not called any more for a long period, freezing the "progress bar visually after a restore. (and being silent a long time) I do try to repro today but cannot it seems. (unless setting breakpoint in the try{}catch() which seems more consistent, but that doesn't really count) Note that I fixed it in my app by making sure I never have any "DOMException: the play() request was interrupted by a call to a pause()" using lots of promises code checks. So not sure if it's worth trying to fix it on your side.
,
May 18 2017
I haven't seen any DOM exceptions here. I do hear glitches and silence, but the silence might be because it's reached the end of the song. (I'm not constantly listening to the test.)
,
May 18 2017
Sorry, I think yesterday link copy/paste from jsbin was no good, just checked, there is no try nor play/pause dom. The last link shared using the jsbin "share" do work. (tested in a "private" tab): https://jsbin.com/zamuhugiga/edit?js,output As said in last comment today, I have it no more since I avoid all DomException in my app code, that do point at my code being faulty not avoiding that. I wasn't doing things correctly rather than bug on your side, sorry to have bothered you.
,
May 18 2017
Ok. I'll leave this open for a bit longer in case you find something new. Since play() returns a promise, I would certainly use that to make sure play has started before proceeding with further processing.
,
Jun 2 2017
No further comments. Closing as WontFix (cannot reproduce). If you come across this problem again, please reopen this or file a new bug (with component Blink>WebAudio) |
|||
►
Sign in to add a comment |
|||
Comment 1 by ligim...@chromium.org
, May 11 2017Labels: Needs-Triage-M58 Needs-Feedback