W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2012

Re: Strange crashes when using media-element

From: Chris Wilson <cwilso@google.com>
Date: Tue, 17 Jul 2012 13:28:54 -0700
Message-ID: <CAJK2wqU085qWccie0ovxy=Mh8wmNwoivSnKaLQ=nU06-mNTX5w@mail.gmail.com>
To: Peter van der Noord <peterdunord@gmail.com>
Cc: public-audio@w3.org
No, if I just add mediaelement+destination, connect them and play, it
crashes eventually as you described.  (No analyser.)

If I take that same file, write a quick code sample to create mediaelement
node and connect to audiocontext.destination, hit play, it does not crash.
 I can only imagine there's something else in your code that's coming in to
play.

On the analyser, BTW - I would STRONGLY advise against using setInterval.
 You should really use requestAnimationFrame to animate.

On Tue, Jul 17, 2012 at 1:16 PM, Peter van der Noord
<peterdunord@gmail.com>wrote:

> I can't seem to be able to reduce the problem atm since i don't have any
> crashes at home (where i am now). To be clear: what you're saying is that
> you *do* have crashes with destination+mediaelement+analyser, but not
> without the analyser.
>
> If that's the case then the analyser seems responsible. Since the crashes
> come out of the blue (as in: not as a response to any user-activity) it
> could be the setInterval i do on updateCanvas in this file...
>
> http://petervandernoord.nl/patchwork_js/js/modules/AnalyserModule.js
>
> ....but i don't see anything that could be related there. Especially not
> with the error that Chrome gives me after a crash:
> Failed to load resource
> http://petervandernoord.nl/patchwork_js/audio/flim.mp3
>
> Apart from that, there's not much going on in my code as far as i know. I
> will try to reduce it tomorrow at work (where i can reproduce the crash)
>
>
> 2012/7/17 Chris Wilson <cwilso@google.com>
>
>> Hey Peter-
>>
>> I can confirm that I get the same behavior (with Chrome 21.0.1180.41) - but
>> it doesn't happen when just playing the file, and when I created a simple
>> test case playing the file through a MediaElementSourceNode, I don't see
>> any problems.  Can you try reducing the test case down?  I can only image
>> it's something to do with your connection code, since the creation is
>> pretty straightforward (and I looked at that).
>>
>> On Tue, Jul 17, 2012 at 9:09 AM, Peter van der Noord <
>> peterdunord@gmail.com> wrote:
>>
>>> I'm encoutering strange crashes when i showed my creation to some
>>> colleagues at work. Actually, it crashed on every browser i tested...which
>>> is strange because i've been working a lot on it the past days, and never
>>> had a crash once. It appears to be a problem with the retrieval of the mp3
>>> i imbedded in the media-element, which is strange because the
>>> audio-tag-player seems to have buffered the whole thing. This is the error
>>> i get:
>>>
>>> Failed to load resource
>>> http://petervandernoord.nl/patchwork_js/audio/flim.mp3
>>>
>>> I have no idea what's going on (maybe the firewall here at work, maybe
>>> my server is crap), but i get a complete crash of the browser (the 'aw
>>> snap!' thing), which seems a bit too much for whatever it is that's
>>> happening.
>>>
>>> I can reproduce it by doing this:
>>> - go to petervandernoord.nl/patchwork_js/
>>> - add a mediaelement and a destination + connect
>>> - (i usually added a analyser to the mediaelement as well, but i doubt
>>> this has anything to do with it)
>>> - press play on the player in the bottom
>>> - do nothing and wait for it to crash. might take a while, but it
>>> happened here at work *every* time, on different computers and OS (the
>>> chrome i'm running here now is 20.0.1132.57)
>>>
>>> Any idea what happens here?
>>>
>>> regards,
>>> Peter
>>>
>>
>>
>
Received on Tuesday, 17 July 2012 20:29:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 17 July 2012 20:29:23 GMT