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

Issue 762971 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

DCHECK hit and browser crash when unplugging USB device

Project Member Reported by grunell@chromium.org, Sep 7 2017

Issue description

Chrome Version: 63.0.3208.0 (Developer Build) (64-bit), 	935fae24e75ed434f7dce7cf9c92abbfece99844-refs/heads/master@{#499895}
OS: Mac

What steps will reproduce the problem?
(1) Build with dchecks enabled.
(2) Use a Soundblaster Tactic3D Rage USB headset (or maybe any device), select as default in and out.
(3) Go to https://webrtc.github.io/samples/src/content/getusermedia/audio/
(3) Pull out headset.

What is the expected result?
Well, no crash.

What happens instead?
Hitting dcheck, then browser crash. Also including error messages spit out when the sample app started.

---
[39934:775:0907/164615.822174:ERROR:scoped_audio_unit.cc(43)] Failed to set current device for audio unit.: Error Domain=NSOSStatusErrorDomain Code=-10851 "(null)" (-10851)
[39934:775:0907/164615.822274:ERROR:audio_manager_mac.cc(628)] Failed to get the device channels, use stereo as default for device default
[39934:775:0907/164615.823156:ERROR:scoped_audio_unit.cc(43)] Failed to set current device for audio unit.: Error Domain=NSOSStatusErrorDomain Code=-10851 "(null)" (-10851)
[39934:775:0907/164615.823193:ERROR:audio_manager_mac.cc(628)] Failed to get the device channels, use stereo as default for device AppleHDAEngineInput:1F,3,0,1,0:1
[39934:775:0907/164615.823990:ERROR:scoped_audio_unit.cc(43)] Failed to set current device for audio unit.: Error Domain=NSOSStatusErrorDomain Code=-10851 "(null)" (-10851)
[39934:775:0907/164615.824019:ERROR:audio_manager_mac.cc(628)] Failed to get the device channels, use stereo as default for device AppleUSBAudioEngine:Creative Technology Ltd:SB Tactic3D Rage USB:000000047035:1
[39934:775:0907/164615.834348:ERROR:scoped_audio_unit.cc(43)] Failed to set current device for audio unit.: Error Domain=NSOSStatusErrorDomain Code=-10851 "(null)" (-10851)
[39934:775:0907/164615.834393:ERROR:audio_manager_mac.cc(628)] Failed to get the device channels, use stereo as default for device default

(Plugged out headset here)

[39934:157963:0907/164654.512340:FATAL:agc_audio_stream.h(137)] Check failed: thread_checker_.CalledOnValidThread(). 
0   libbase.dylib                       0x000000010672a5fc base::debug::StackTrace::StackTrace(unsigned long) + 28
1   libbase.dylib                       0x0000000106754d50 logging::LogMessage::~LogMessage() + 224
2   libmedia.dylib                      0x000000010b8c0a4e media::AgcAudioStream<media::AudioInputStream>::GetAutomaticGainControl() + 94
3   libmedia.dylib                      0x000000010b8bec38 media::AUAudioInputStream::OnDataIsAvailable(unsigned int*, AudioTimeStamp const*, unsigned int, unsigned int) + 456
4   libmedia.dylib                      0x000000010b8ba96f media::AUAudioInputStream::DataIsAvailable(void*, unsigned int*, AudioTimeStamp const*, unsigned int, unsigned int, AudioBufferList*) + 287
5   CoreAudio                           0x00000001255474cf AUHAL::AUIOProc(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*) + 2311
6   CoreAudio                           0x00007fff7c8568ce HALC_ProxyIOContext::IOWorkLoop() + 5290
7   CoreAudio                           0x00007fff7c855264 HALC_ProxyIOContext::IOThreadEntry(void*) + 128
8   CoreAudio                           0x00007fff7c854fa3 HALB_IOThread::Entry(void*) + 75
9   libsystem_pthread.dylib             0x00007fff9268793b _pthread_body + 180
10  libsystem_pthread.dylib             0x00007fff92687887 _pthread_body + 0
11  libsystem_pthread.dylib             0x00007fff9268708d thread_start + 13

(A few seconds pause)

Trace/BPT trap: 5
---

I haven't tested with my stable channel browser yet.
 
At least no browser crash in stable. Maybe a consequence of the dcheck crash.

Could it simply be that we're getting callbacks on another thread when plugging out? Are we not dealing correctly with this?

Sign in to add a comment