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

Issue 117470 link

Starred by 1 user

Issue metadata

Status: Verified
Email to this user bounced
Closed: Mar 2012
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

  • Only users with EditIssue permission may comment.

Sign in to add a comment

Chrome: AudioManagerBase::MakeAudioOutputStream(AudioParameters const &)

Project Member Reported by, Mar 8 2012

Issue description

might be from

Product, Version	 Chrome ,  19.0.1063.0
Stack Signature	 `anonymous namespace'::PureCall()-4E32440
New Stack Signature	 `anonymous namespace'::PureCall() 
Report Time (UTC)	 2012/03/08 19:23:30, Thu
Uptime	 1286365 ms
OS Name, Version	 Windows NT ,  6.1.7600
CPU Architecture, Info	 x86 ,  GenuineIntel family 6 model 23 stepping 10
channel	 canary
plat	 Win32
ptype	 browser


Thread 4 *CRASHED* ( EXCEPTION_BREAKPOINT @ 0x62aacd35 )

0x62aacd35	 [chrome.dll	 -	`anonymous namespace'::PureCall()
0x62a4ba43	 [chrome.dll	 - purevirt.c:47	_purecall
0x630d9786	 [chrome.dll	 -	AudioManagerBase::MakeAudioOutputStream(AudioParameters const &)
0x630e814e	 [chrome.dll	 -	AudioOutputDispatcher::CreateAndOpenStream()
0x630e83f4	 [chrome.dll	 -	AudioOutputDispatcher::StreamOpened()
0x630e8945	 [chrome.dll	 -	AudioOutputProxy::Open()
0x630dac00	 [chrome.dll	 -	media::AudioOutputController::DoCreate(AudioManager *,AudioParameters const &)
0x61f84708	 [chrome.dll	 - bind_internal.h:1384	base::internal::Invoker<3,base::internal::BindState<base::internal::RunnableAdapter<void ( PluginServiceImpl::*)(base::MessageLoopProxy *,base::Callback<void (std::vector<webkit::WebPluginInfo,std::allocator<webkit::WebPluginInfo> > const &)> const &)>,void (PluginServiceImpl *,base::MessageLoopProxy *,base::Callback<void (std::vector<webkit::WebPluginInfo,std::allocator<webkit::WebPluginInfo> > const &)> const &),void (base::internal::UnretainedWrapper<PluginServiceImpl>,scoped_refptr<base::MessageLoopProxy>,base::Callback<void (std::vector<webkit::WebPluginInfo,std::allocator<webkit::WebPluginInfo> > const &)>)>,void (PluginServiceImpl *,base::MessageLoopProxy *,base::Callback<void (std::vector<webkit::WebPluginInfo,std::allocator<webkit::WebPluginInfo> > const &)> const &)>::Run(base::internal::BindStateBase *)
0x61ed670f	 [chrome.dll	 -	MessageLoop::RunTask(base::PendingTask const &)
0x61ed551d	 [chrome.dll	 -	MessageLoop::DoWork()
0x61eea560	 [chrome.dll	 -	base::MessagePumpDefault::Run(base::MessagePump::Delegate *)
0x61ed508a	 [chrome.dll	 -	MessageLoop::RunHandler()
0x61ed5037	 [chrome.dll	 -	MessageLoop::Run()
0x61ed6348	 [chrome.dll	 -	base::Thread::Run(MessageLoop *)
0x61ed6309	 [chrome.dll	 -	base::Thread::ThreadMain()
0x61ed626d	 [chrome.dll	 -	base::`anonymous namespace'::ThreadFunc(void *)
0x76ea1113	 [kernel32.dll	 + 0x00051113]	BaseThreadInitThunk
0x77d5b298	 [ntdll.dll	 + 0x0005b298]	__RtlUserThreadStart
0x77d5b26b	 [ntdll.dll	 + 0x0005b26b]	_RtlUserThreadStart

Comment 1 by, Mar 12 2012

any updates?

Comment 2 by, Mar 12 2012

Sorry, I missed the first notification.


It is a bit weird to me, it looks like it gets into a pure virtual MakeLinearOutputStream(), which have been implemented in AudioManagerWin;

dharani, does this problem happens only in windows NT? Is it easy to reproduced?

Tommi, do you have any idea? 

Comment 3 by, Mar 12 2012

Yes, it happens only in Windows NT. I don't have a windows machine to reproduce this crash.

Comment 4 by, Mar 12 2012

From the crash thread report:
0x630d982b	 [chrome.dll	 -]	AudioManagerBase::Shutdown()
0x630d9847	 [chrome.dll	 -]	AudioManagerBase::~AudioManagerBase()
0x630e8bcb	 [chrome.dll	 + 0x01238bcb]	AudioManagerWin::`scalar deleting destructor'(unsigned int)
0x62f58b09	 [chrome.dll	 -]	content::BrowserMainLoop::~BrowserMainLoop()
0x62f58b49	 [chrome.dll	 + 0x010a8b49]	content::BrowserMainLoop::`scalar deleting destructor'(unsigned int)
0x61ecc93c	 [chrome.dll	 - scoped_ptr.h:160]	scoped_ptr<WifiDataProviderCommon::WlanApiInterface>::reset(WifiDataProviderCommon::WlanApiInterface *)
0x62f61f81	 [chrome.dll	 -]	`anonymous namespace'::BrowserMainRunnerImpl::Shutdown()

It looks like another thread is deleting the AudioManager while the AudioManager is creating the output stream.
I believe this problem is not related to my CL, but mainly on the synchronization between main thread and AudioManager::audio_thread_.

Comment 5 by, Mar 13 2012

Status: Started
Thanks Tommi for the help.

The problem is because the destruction of the AudioManager classes happens in order of AudioManagerWin, AudioManagerBase, then AudioManager. And we stop the audio thread in AudioManagerBase. So when AudioManagerWin goes away, the audio thread is still running, so it crashes when it tries to create a stream through AudioManagerWin.
And the same things can happen on all platforms.

CL is out and should fix the issue.

Project Member

Comment 6 by, Mar 14 2012

The following revision refers to this bug:

r126635 | | Wed Mar 14 07:07:39 PDT 2012

Changed paths:

Stopping the audio thread before destroying the AudioManager<Platform>.

The destruction of the AudioManager family happens in order of: AudioManager<Platform>, AudioManagerBase, AudioManager.
So before getting into the destruction of AudioManagerBase, we have make sure the audio thread has been stopped before AudioManager<Platform> is gone, otherwise it will end up into unexpected behavior, for example, crash because of pure virtual function.

BUG= 117470 
TEST=media_unittests, Address Sanitizer

Review URL:

Comment 7 by, Mar 14 2012

Status: Fixed
Labels: testcasenotadded
Status: Verified
Project Member

Comment 9 by, Oct 13 2012

Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member

Comment 10 by, Mar 10 2013

Labels: -Area-Internals -Mstone-19 -Feature-Media-Audio Cr-Internals-Media-Audio M-19 Cr-Internals
Project Member

Comment 11 by, Mar 14 2013

Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue

Sign in to add a comment