Bug 153593

Summary: Safari Crashes if audio.src is changed while connected to AudioAnalyserNode
Product: WebKit Reporter: Gregg Tavares <gman>
Component: Web AudioAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, eric.carlson, jer.noble
Priority: P2 Keywords: InRadar
Version: Safari 9   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
crash report
none
Patch
none
Patch none

Comment 1 Alexey Proskuryakov 2016-01-30 23:03:16 PST
I cannot reproduce this with Safari 9.0.3 (shipping WebKit). I only get an exception in console:

InvalidStateError: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.
createMediaElementSource safari-issue.html:92
handleCanplay safari-issue.html:92
Comment 2 Gregg Tavares 2016-02-01 07:04:43 PST
Try this

1. Make sure the WebInspector is NOT open (nor any other JavaScript tools)

2. Go to http://greggman.com/downloads/examples/safari-audio-issue/safari-issue.html

   Do **NOT** click the button

3. Go to http://google.com

4. Go to http://greggman.com/downloads/examples/safari-audio-issue/safari-issue.html

What happens for me at step 4 is safari doesn't play the music like it did in step 2

I might have to repeat steps 3 and 4. This is in Safari 9.0.3
Comment 3 Gregg Tavares 2016-02-01 07:21:53 PST
Created attachment 270385 [details]
crash report
Comment 4 Gregg Tavares 2016-02-01 07:23:27 PST
Here's a video of it crashing.

Previously attached crash report

https://youtu.be/qcERq9gphqk

Safari 9.0.3


If you can't repo try hitting refresh quickly in succession while the music is playing
Comment 5 Gregg Tavares 2016-02-01 07:56:06 PST
Here's a video of the visit, visit something else, visit again issue

https://youtu.be/VJ-pCi5oCwg
Comment 6 Gregg Tavares 2016-02-01 07:56:56 PST
the URL used in the video above is http://twgljs.org/examples/dynamic-buffers.html but http://greggman.com/downloads/examples/safari-audio-issue/safari-issue.html seems to work for that issue just ask well
Comment 7 Alexey Proskuryakov 2016-02-01 09:51:20 PST
I could reproduce after a few reloads. Thank you!

rdar://problem/23648082
Comment 8 Jer Noble 2016-03-23 22:39:02 PDT
*** Bug 155833 has been marked as a duplicate of this bug. ***
Comment 9 Jer Noble 2016-03-23 22:40:34 PDT
Created attachment 274821 [details]
Patch
Comment 10 Jer Noble 2016-03-23 22:48:34 PDT
Created attachment 274822 [details]
Patch
Comment 11 WebKit Commit Bot 2016-03-24 17:52:41 PDT
Comment on attachment 274822 [details]
Patch

Clearing flags on attachment: 274822

Committed r198654: <http://trac.webkit.org/changeset/198654>
Comment 12 WebKit Commit Bot 2016-03-24 17:52:45 PDT
All reviewed patches have been landed.  Closing bug.