New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 789035 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 717528
Owner: ----
Closed: Aug 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

web audio api leaks memory on stopped oscillators

Reported by uber5...@gmail.com, Nov 28 2017

Issue description

Chrome Version       : 62.0.3202.94
OS Version: 10.0
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari:
    Firefox:
    IE/Edge:

What steps will reproduce the problem?
1. Start memory profiling on the page "about:blank"
2. Run the following code in the console:

    const context = new AudioContext();
    for (var i = 0; i < 1000000; i++) {
        const node = context.createOscillator();
        node.start();
        node.stop();
    }

3. Stop profiling after some time.

What is the expected result?

The stopped oscillator nodes should be garbage collected. The JS heap in the profiler should increase and decrease to nearly the same memory usage as when the profiler began. Once the stopped oscillator goes out of context, it should be eligible for garbage collection.

What happens instead of that?

The JS heap size only increases, by about ~50MB. The stopped oscillator nodes (appear) to not be garbage collected.

Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36



 

Comment 1 by uber5...@gmail.com, Nov 28 2017

Forgot to mention: this appears to be working as expected in FireFox.
Labels: Needs-Triage-M62
Components: Blink>WebAudio
Cc: krajshree@chromium.org
Labels: Needs-Feedback Triaged-ET
uber5001@ - Thanks for filing the issue...!!

Could you please provide a sample test case to test the issue from TE-end.
This will help us in triaging the issue further.

Thanks...!!

Comment 5 by uber5...@gmail.com, May 1 2018

I'm not sure how to create a simple test case, as the issue is only observable from the devtools. Attached is the test case from the initial post.
webaudioleak.js
329 bytes View Download
Project Member

Comment 6 by sheriffbot@chromium.org, May 1 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Mergedinto: 717528
Status: Duplicate (was: Unconfirmed)
Repro case is the same as in issue 717528.

Sign in to add a comment