Skip to content

AudioContext.decodeAudioData crashes in Dartium #2897

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

Closed
alextekartik opened this issue May 4, 2012 · 10 comments
Closed

AudioContext.decodeAudioData crashes in Dartium #2897

alextekartik opened this issue May 4, 2012 · 10 comments
Labels
closed-obsolete Closed as the reported issue is no longer relevant
Milestone

Comments

@alextekartik
Copy link

The following code:

    AudioContext audioContext = new AudioContext();
    XMLHttpRequest xhr = new XMLHttpRequest();
    xhr.open("GET", "sample.ogg", true);
    xhr.responseType = "arraybuffer";
    xhr.on.load.add((e) {
      audioContext.decodeAudioData(xhr.response, function(buffer) {
        AudioBufferSourceNode source = audioContext.createBufferSource();
        source.connect(audioContext.destination, 0);
        source.buffer = buffer;
        source.noteOn(0);
      });
    });
    xhr.send();

works fine in Chrome/JS but crashes in Dartium. No error reported as Dartium crashes with a "Aw, Snap!" message.

Tested using DartEditor Build 7323 on Windows 64 bits

I did not attach a sample ogg file.

Google Chrome 19.0.1084.41 (Official Build 134854) beta-m
OS Windows
WebKit 536.5 (@­115762)
JavaScript V8 3.9.24.17
Flash 11,2,202,235
User Agent Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.41 Safari/536.5
Command Line "C:\Users\alex\AppData\Local\Google\Chrome\Application\chrome.exe" --flag-switches-begin --flag-switches-end
Executable Path C:\Users\alex\AppData\Local\Google\Chrome\Application\chrome.exe
Profile Path C:\Users\alex\AppData\Local\Google\Chrome\User Data\Default

@alextekartik
Copy link
Author

However the following code works:

    AudioContext audioContext = new AudioContext();
    XMLHttpRequest xhr = new XMLHttpRequest();
    xhr.open("GET", "sample.ogg", true);
    xhr.responseType = "arraybuffer";
    xhr.on.load.add((e) {
      AudioBuffer buffer = audioContext.createBuffer(xhr.response, false);
      AudioBufferSourceNode source = audioContext.createBufferSource();
      source.connect(audioContext.destination, 0);
      source.buffer = buffer;
      source.noteOn(0);
    });
    xhr.send();

So it might be a misused of the API. I was trying to follow the example given in http://www.html5rocks.com/en/tutorials/webaudio/intro/

@DartBot
Copy link

DartBot commented May 5, 2012

This comment was originally written by [email protected]


Alex, thanks a lot for a report. Crashing is not the answer whatever goes on inside.

Pavel, may you have a look, please?


Set owner to [email protected].

@DartBot
Copy link

DartBot commented Jun 1, 2012

This comment was originally written by [email protected]


Added this to the M1 milestone.

@DartBot
Copy link

DartBot commented Sep 4, 2012

This comment was originally written by [email protected]


Works for me with latest Dartium on windows. Could you please check if it still crashes? If yes, please attach sample.ogg.


Added NeedsInfo label.

@DartBot
Copy link

DartBot commented Sep 11, 2012

This comment was originally written by [email protected]


Added AssumedStale label.

@DartBot
Copy link

DartBot commented Jun 3, 2013

This comment was originally written by [email protected]


Hello. I've encountered the same issue here. I'm running in Ubuntu x64.
I'm testing using this code:

    AudioContext audioContext = new AudioContext();
    AudioBufferSourceNode source;

    HttpRequest request = new HttpRequest();
    request.open("GET", "virus.ogg", async: true);
    request.responseType = "arraybuffer";

    request.onLoad.listen((_){
        print("before decodeAudio");

        audioContext.decodeAudioData(request.response, (buffer){
            print("decoded");

        });
    });

It breaks on the "before decodeAudio". Every audio format I've tried breaks ( the "Aw, Snap!" message. )

Compiling to javascript and running in chrome works.

@DartBot
Copy link

DartBot commented Jun 4, 2013

This comment was originally written by @financecoding


This bug does apply to Dartium on MacOSX

Dart Editor version 0.5.11_r23200
Dart SDK version 0.5.11.1_r23200

Easy way to test is git clone git://github.com/bp74/StageXL_Escape.git and run in Dartium on MacOSX

@DartBot
Copy link

DartBot commented Jun 4, 2013

This comment was originally written by @financecoding


Does not apply for

Dart Editor version 0.5.13_r23552
Dart SDK version 0.5.13.1_r23552

@DartBot
Copy link

DartBot commented Oct 25, 2014

This comment was originally written by [email protected]


I am aware this is an old issue but I'm still having this problem... Dartium can't decode the audio (in Dart SDK 1.7.2) but the Chrome JS version works without problems!

@vsmenon
Copy link
Member

vsmenon commented Oct 28, 2014

dhubau: if you are still seeing a crash, please file a new bug. closed bugs don't show up on our tracker, even after you reply. :-)

Please let us know if it's a crash as opposed to not being able to handle a particular audio format. Note, Dartium is based on open source Chromium, not Chrome, and neither supports all the formats Chrome does:

http://www.chromium.org/audio-video


Removed the owner.

@alextekartik alextekartik added Type-Defect closed-obsolete Closed as the reported issue is no longer relevant labels Oct 28, 2014
@alextekartik alextekartik added this to the M1 milestone Oct 28, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-obsolete Closed as the reported issue is no longer relevant
Projects
None yet
Development

No branches or pull requests

3 participants