New issue
Advanced search Search tips

Issue 891025 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Oct 18
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-10-18
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

multiple addModule() calls with inspector open freeze browser

Project Member Reported by hongchan@chromium.org, Oct 1

Issue description

From: https://stackoverflow.com/questions/52574159/multiple-audioctx-addmodule-calls-freeze-chrome-when-loaded-with-inspector-ope

Run the following snippet to repro:

---
// in Sound object #1
const offlineCtx1 = new OfflineAudioContext(2, 44100, 44100);
offlineCtx1.audioWorklet.addModule("processor.js")
     .then(() => log("first context loaded the processor"));

// ...
// in Sound object #2
const offlineCtx2 = new OfflineAudioContext(2, 44100, 44100);
offlineCtx2.audioWorklet.addModule("processor.js")
    .then(() => log("second context loaded the processor"));
---


Copied from the question:

When I try to add the module to the two different contexts, something funny happens. If the inspector is closed, the page seems to load fine. However, if the inspector is open, then the browser tab freezes to some extent. You aren't able to interact with the page or close the tab, but you can do some limited things inside the inspector.

It appears to be some sort of timing problem: if you wait 1000ms or for a user interaction to initiate the second addModule() call, then it works fine.

Actually, the best way I have found work around it: build a promise chain out of the call to .addModule() and wait for the first one to get back before firing off the next.
 
Labels: Needs-Milestone
Components: Platform>DevTools
Status: Assigned (was: Unconfirmed)
Cc: nhiroki@chromium.org
I've tested the case with 72.0.3582.0 and I can't reproduce it. However, this was reproducible in 69.0.3497.100. Not sure what the root cause is, but it seems to be fixed.

My suspicion is how to handle multiple WorkletGlobalScopes in terms of the DevTools. Do you have any insight on this nhiroki@?

If there's no more feedback, I'll close this issue as WontFix in few days.
NextAction: 2018-10-18
The NextAction date has arrived: 2018-10-18
Status: WontFix (was: Assigned)

Sign in to add a comment