New issue
Advanced search Search tips

Issue 656652 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

DHECK failure in AudioNodeInput::enable()

Reported by andrew.macpherson@soundtrap.com, Oct 17 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36

Steps to reproduce the problem:
1. Open a page and run the attached .js file in a build of Chromium with DCHECKs enabled.
2. See a check failed with stack trace in the console.

What is the expected behavior?
No failure when running the .js file.

What went wrong?
The 'gain' AudioNode thinks that the node called 'other' should be in its m_disabledOutputs list but since this node was added while the 'gain' node was already in a disabled state it is not and the DCHECK fails.

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 56.0.2892.0  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 23.0 r0
 
AudioNodeInput-DCHECK-fail.js
213 bytes View Download

Comment 1 by rtoy@chromium.org, Oct 17 2016

Status: Available (was: Unconfirmed)
Thanks for the report and repro case. I can reproduce this locally.

We'll take a look.
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b61db9ee9a2987fa92d5d7aa082b5eaa33684991

commit b61db9ee9a2987fa92d5d7aa082b5eaa33684991
Author: rtoy <rtoy@chromium.org>
Date: Tue Oct 18 16:03:15 2016

Handle disabled outputs better when enabling.

The DCHECK for disabled outputs didn't handle the case where
m_disabledOutputs was empty.  Of course, the output isn't in
m_disabledOutputs if m_disabledOutputs is empty.

Items get added to m_disabledOutputs only from
disableOutputsIfNecessary which happens when the number of connections
goes to 0 or 1, in preparation for collecting the node.  In the test
case, the nodes still have references so there's no call to
disableOutputsIfNecessary.  The output is just disconnected from the
downstream node.

BUG= 656652 
TEST=audionode-disconnect.html updated to include test

Review-Url: https://codereview.chromium.org/2429633003
Cr-Commit-Position: refs/heads/master@{#425979}

[modify] https://crrev.com/b61db9ee9a2987fa92d5d7aa082b5eaa33684991/third_party/WebKit/LayoutTests/webaudio/audionode-disconnect-expected.txt
[modify] https://crrev.com/b61db9ee9a2987fa92d5d7aa082b5eaa33684991/third_party/WebKit/LayoutTests/webaudio/audionode-disconnect.html
[modify] https://crrev.com/b61db9ee9a2987fa92d5d7aa082b5eaa33684991/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp

Just confirmed that the problem is resolved after this patch. Thanks!

Comment 4 by rtoy@chromium.org, Oct 19 2016

Owner: rtoy@chromium.org
Status: Verified (was: Available)
Thanks so much for the report and for testing the fix!

Sign in to add a comment