Skip to content
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

Web Audio API AudioContext crashes tab in Dartium #3015

Closed
sethladd opened this issue May 11, 2012 · 11 comments
Closed

Web Audio API AudioContext crashes tab in Dartium #3015

sethladd opened this issue May 11, 2012 · 11 comments

Comments

@sethladd
Copy link
Contributor

Chromium 20.0.1124.0 (Developer Build 134875)

Following code:

import('dart:html');

main() {

  AudioContext audioContext = new AudioContext();

}

will crash a tab in Dartium

@DartBot
Copy link

DartBot commented May 12, 2012

This comment was originally written by [email protected]


Seth,

that works fine on Linux with the most recent build.

I know we may have some troubles on Windows, but any way, what's your platform?


Set owner to [email protected].
Added NeedsInfo label.

@sethladd
Copy link
Contributor Author

Apologies for forgetting to include platform. I am on Mac 10.6.8.


Added Triaged label.

@DartBot
Copy link

DartBot commented May 12, 2012

This comment was originally written by [email protected]


also happening to me, using this version of dartium:

Chromium 20.0.1121.0 (Developer Build 134442)
OS Linux
WebKit 536.10 (Source/WebCore/Configurations@466)
JavaScript V8 3.10.6
DartVM r7221
Flash 11.2 r202
User Agent Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.10 (KHTML, like Gecko) Chrome/20.0.1121.0 (Dart) Safari/536.10
Command Line /usr/local/bin/dart/dart-sdk/chromium/chrome --remote-debugging-port=9322 --user-data-dir=/home/pete/.dartChromeSettings --bwsi --no-first-run --no-default-browser-check --no-process-singleton-dialog --flag-switches-begin --flag-switches-end about:blank
Executable Path /usr/local/bin/dart/dart-sdk/chromium/chrome
Profile Path /home/pete/.dartChromeSettings/Default

@DartBot
Copy link

DartBot commented May 12, 2012

This comment was originally written by [email protected]


p.reisinger, it looks like you start the sample from Dart Editor, is it correct?

Seth, do you start the sample from Dart Editor too?

@sethladd
Copy link
Contributor Author

Indeed. I can try starting natively, I'll let you know. (sorry, didn't know starting from editor might affect things :)

@sethladd
Copy link
Contributor Author

Just for the record, I can trigger a crash with this version:

Chromium 21.0.1134.0 (Developer Build 136493)
OS Mac OS X
WebKit 537.1 (Source/WebCore/Configurations@500)
JavaScript V8 3.10.8.4
DartVM r7533
Flash 11.2.202.235
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1134.0 (Dart) Safari/537.1
Command Line /Users/sethladd/Downloads/dart/dart-sdk/Chromium.app/Contents/MacOS/Chromium --remote-debugging-port=9322 --user-data-dir=/Users/sethladd/.dartChromeSettings --bwsi --no-first-run --no-default-browser-check --no-process-singleton-dialog --flag-switches-begin --flag-switches-end about:blank
Executable Path /Users/sethladd/Downloads/dart/dart-sdk/Chromium.app/Contents/MacOS/Chromium
Profile Path /Users/sethladd/.dartChromeSettings/Default

@sethladd
Copy link
Contributor Author

This is the minimum code to trigger the crash. It looks like decodeAudioData is responsible. If I comment out decodeAudioData, no crash. If I compile this to JavaScript, no crash.

#import('dart:html');

main() {
  AudioContext audioContext = new AudioContext();
  AudioGainNode gainNode = audioContext.createGainNode();
  
  XMLHttpRequest xhr = new XMLHttpRequest();
  xhr.open("GET", "button-3.mp3", true);
  xhr.responseType = "arraybuffer";
  xhr.on.load.add((e) {

    // asynchronous decoding
    audioContext.decodeAudioData(xhr.response, (buffer) {
      // something
    }, (error) {
      print('Error decoding MP3 file');
    });
    
  });
  
  xhr.send();
}

@sethladd
Copy link
Contributor Author

attaching mp3


Attachment:
button-3.mp3 (6.58 KB)

@DartBot
Copy link

DartBot commented May 12, 2012

This comment was originally written by [email protected]


Thanks, this one I can repro.

@DartBot
Copy link

DartBot commented May 12, 2012

This comment was originally written by [email protected]


The problem is Dartium internal.

Dartium fails to decode .mp3 and attempts to invoke errorCallback passing NULL as AudioBuffer* pointer. We're not prepared for such input and crashed. Fix is pending review.


Added Started label.

@DartBot
Copy link

DartBot commented May 12, 2012

This comment was originally written by [email protected]


Added Fixed label.

copybara-service bot pushed a commit that referenced this issue May 20, 2022
…25 revisions)

https://dart.googlesource.com/dartdoc/+log/334072b0cad4..cf0685a2d1ce

2022-05-19 [email protected] Create scorecards-analysis.yml (#3032)
2022-05-18 [email protected] Add the docs.dart.js.map file to published package (#3042)
2022-05-17 [email protected] Reintroduce query param search (#3026)
2022-05-17 [email protected] Include docs.dart.js in published code (#3040)
2022-05-17 [email protected] Optimize built js (#3028)
2022-05-17 [email protected] Use dart run instead of deprecated dart pub run (#3038)
2022-05-17 [email protected] fix exception for empty dartdoc_options.yaml file (#3034)
2022-05-16 [email protected] Fix build config (#3035)
2022-05-02 [email protected] Drop version back to 5.1.0 (#3031)
2022-05-02 [email protected] Fixed: YouTube directive respects width/height argument (#3030)
2022-04-19 [email protected] Update pubspec.yaml (#3025)
2022-04-12 [email protected] Remove dead field commentRefs, which is always empty (#3021)
2022-04-12 [email protected] make the converted web frontend follow Dart conventions (#3020)
2022-04-11 [email protected] convert lib/resources/script.js to Dart (#3016)
2022-04-11 49699333+dependabot[bot]@users.noreply.github.com Bump actions/cache from 3.0.1 to 3.0.2 (#3019)
2022-04-10 [email protected] rename the CI script (#3017)
2022-04-08 49699333+dependabot[bot]@users.noreply.github.com Bump actions/cache from 2 to 3.0.1 (#3014)
2022-04-08 49699333+dependabot[bot]@users.noreply.github.com Bump markdown from 4.0.1 to 5.0.0 (#3015)
2022-04-08 [email protected] Move many static declarations to top-level; avoid RegExp (#3009)
2022-04-08 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 2 to 3 (#3013)
2022-04-07 [email protected] Add a web frontend (#3011)
2022-04-07 [email protected] enable dependabot deps checks (#3012)
2022-04-07 [email protected] Do not store the AstNode on ModelNode; eagerly grab the source indexes (#3008)
2022-04-07 [email protected] Create a .pubignore in order to skip testing files from publish check (#3010)
2022-03-29 [email protected] Bump to version 5.1.0 (#3006)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: [email protected]
Change-Id: I3467a27d6947c43f7f41acbb2959d72863fd8a34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245483
Commit-Queue: Devon Carew <[email protected]>
Reviewed-by: Devon Carew <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants