xxfxxf / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 0 forks source link

[win] Crash with audio when playing HTML5 video (Chromium rev 107708) #392

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load the "HTML5 Video" test in cefclient on Windows.
2. Assertion with the following stack trace:

libcef.dll!base::debug::BreakDebugger()  Line 107    C++
     libcef.dll!logging::LogMessage::~LogMessage()  Line 638    C++
     libcef.dll!base::Lock::CheckUnheldAndMark()  Line 35    C++
     libcef.dll!base::Lock::Acquire()  Line 44    C++
     libcef.dll!base::AutoLock::AutoLock(base::Lock & lock)  Line 99    C++
>    libcef.dll!media::AudioRendererBase::ResumeAfterUnderflow(bool 
buffer_more_audio)  Line 139    C++
     libcef.dll!media::PipelineImpl::OnAudioUnderflow()  Line 1391 + 0x22 bytes    C++
     libcef.dll!base::internal::Invoker1<0,base::internal::InvokerStorage1<void (__thiscall media::PipelineImpl::*)(void),media::PipelineImpl *>,void (__thiscall media::PipelineImpl::*)(void)>::DoInvoke(base::internal::InvokerStorageBase * base)  Line 596 + 0x21 bytes    C++
     libcef.dll!base::Callback<void __cdecl(void)>::Run()  Line 269 + 0xe bytes    C++
     libcef.dll!media::AudioRendererBase::FillBuffer(unsigned char * dest, unsigned int dest_len, const base::TimeDelta & playback_delay, bool buffers_empty)  Line 242    C++
     libcef.dll!media::ReferenceAudioRenderer::OnMoreData(AudioOutputStream * stream, unsigned char * dest, unsigned int len, AudioBuffersState buffers_state)  Line 63    C++
     libcef.dll!PCMWaveOutAudioOutputStream::QueueNextPacket(wavehdr_tag * buffer)  Line 286 + 0x51 bytes    C++
     libcef.dll!PCMWaveOutAudioOutputStream::Start(AudioOutputStream::AudioSourceCallback * callback)  Line 185    C++
     libcef.dll!media::ReferenceAudioRenderer::SetPlaybackRate(float rate)  Line 39 + 0x31 bytes    C++
     libcef.dll!media::CompositeFilter::SetPlaybackRate(float playback_rate)  Line 192 + 0x31 bytes    C++
     libcef.dll!media::PipelineImpl::PlaybackRateChangedTask(float playback_rate)  Line 833 + 0x30 bytes    C++
     libcef.dll!base::internal::Invoker2<0,base::internal::InvokerStorage2<void (__thiscall media::PipelineImpl::*)(float),media::PipelineImpl *,float>,void (__thiscall media::PipelineImpl::*)(float)>::DoInvoke(base::internal::InvokerStorageBase * base)  Line 940 + 0x37 bytes    C++
     libcef.dll!base::Callback<void __cdecl(void)>::Run()  Line 269 + 0xe bytes    C++
     libcef.dll!MessageLoop::RunTask(const MessageLoop::PendingTask & pending_task)  Line 501    C++
     libcef.dll!MessageLoop::DeferOrRunPendingTask(const MessageLoop::PendingTask & pending_task)  Line 516    C++
     libcef.dll!MessageLoop::DoWork()  Line 703 + 0xc bytes    C++
     libcef.dll!base::MessagePumpDefault::Run(base::MessagePump::Delegate * delegate)  Line 23 + 0xf bytes    C++
     libcef.dll!MessageLoop::RunInternal()  Line 457 + 0x2a bytes    C++
     libcef.dll!MessageLoop::RunHandler()  Line 431    C++
     libcef.dll!MessageLoop::Run()  Line 342    C++
     libcef.dll!base::Thread::Run(MessageLoop * message_loop)  Line 130    C++
     libcef.dll!base::Thread::ThreadMain()  Line 167 + 0x16 bytes    C++
     libcef.dll!base::`anonymous namespace'::ThreadFunc(void * params)  Line 42 + 0xf bytes    C++

I've started a thread about this on chromium-dev:
http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/
a7e120b57fb9e2b6

Original issue reported on code.google.com by magreenb...@gmail.com on 28 Oct 2011 at 7:43

GoogleCodeExporter commented 9 years ago
Related Chromium issue: 
http://code.google.com/p/chromium/issues/detail?id=103920

Original comment by magreenb...@gmail.com on 11 Nov 2011 at 5:37

GoogleCodeExporter commented 9 years ago
The original crash is fixed with CEF revision 426 (Chromium revision 113143). 
We now have a new crash when browsing away from the video while loading:

>   libcef.dll!base::debug::BreakDebugger()  Line 107   C++
    libcef.dll!logging::LogMessage::~LogMessage()  Line 653 C++
    libcef.dll!base::subtle::RefCountedThreadSafeBase::AddRef()  Line 76    C++
    libcef.dll!base::RefCountedThreadSafe<media::Filter,base::DefaultRefCountedThreadSafeTraits<media::Filter> >::AddRef()  Line 139    C++
    libcef.dll!base::internal::MaybeRefcount<1,media::ReferenceAudioRenderer *>::AddRef(media::ReferenceAudioRenderer * o)  Line 352 + 0xe bytes    C++
    libcef.dll!base::internal::BindState<base::internal::RunnableAdapter<void (__thiscall media::ReferenceAudioRenderer::*)(void)>,void __cdecl(media::ReferenceAudioRenderer *),void __cdecl(media::ReferenceAudioRenderer *)>::BindState<base::internal::RunnableAdapter<void (__thiscall media::ReferenceAudioRenderer::*)(void)>,void __cdecl(media::ReferenceAudioRenderer *),void __cdecl(media::ReferenceAudioRenderer *)>(const base::internal::RunnableAdapter<void (__thiscall media::ReferenceAudioRenderer::*)(void)> & runnable, media::ReferenceAudioRenderer * const & p1)  Line 2452 + 0xc bytes    C++
    libcef.dll!base::Bind<void (__thiscall media::ReferenceAudioRenderer::*)(void),media::ReferenceAudioRenderer *>(void (void)* functor, media::ReferenceAudioRenderer * const & p1)  Line 110 + 0x30 bytes    C++
    libcef.dll!media::ReferenceAudioRenderer::~ReferenceAudioRenderer()  Line 21 + 0x29 bytes   C++
    libcef.dll!media::ReferenceAudioRenderer::`scalar deleting destructor'()  + 0x16 bytes  C++
    libcef.dll!base::RefCountedThreadSafe<media::Filter,base::DefaultRefCountedThreadSafeTraits<media::Filter> >::DeleteInternal(const media::Filter * x)  Line 149 + 0x3f bytes    C++
    libcef.dll!base::DefaultRefCountedThreadSafeTraits<media::Filter>::Destruct(const media::Filter * x)  Line 115 + 0x9 bytes  C++
    libcef.dll!base::RefCountedThreadSafe<media::Filter,base::DefaultRefCountedThreadSafeTraits<media::Filter> >::Release()  Line 143 + 0x21 bytes  C++
    libcef.dll!scoped_refptr<media::Filter>::~scoped_refptr<media::Filter>()  Line 242  C++
    libcef.dll!scoped_refptr<media::Filter>::`scalar deleting destructor'()  + 0x16 bytes   C++
    libcef.dll!std::_Destroy<scoped_refptr<media::Filter> >(scoped_refptr<media::Filter> * _Ptr)  Line 64   C++
    libcef.dll!std::allocator<scoped_refptr<media::Filter> >::destroy(scoped_refptr<media::Filter> * _Ptr)  Line 213 + 0x9 bytes    C++
    libcef.dll!std::_Dest_val<std::allocator<scoped_refptr<media::Filter> >,scoped_refptr<media::Filter> >(std::allocator<scoped_refptr<media::Filter> > & _Alval, scoped_refptr<media::Filter> * _Pdest)  Line 288 C++
    libcef.dll!std::_Destroy_range<std::allocator<scoped_refptr<media::Filter> > >(scoped_refptr<media::Filter> * _First, scoped_refptr<media::Filter> * _Last, std::allocator<scoped_refptr<media::Filter> > & _Al, std::_Nonscalar_ptr_iterator_tag __formal)  Line 97 + 0xd bytes    C++
    libcef.dll!std::_Destroy_range<std::allocator<scoped_refptr<media::Filter> > >(scoped_refptr<media::Filter> * _First, scoped_refptr<media::Filter> * _Last, std::allocator<scoped_refptr<media::Filter> > & _Al)  Line 88 + 0x29 bytes  C++
    libcef.dll!std::vector<scoped_refptr<media::Filter>,std::allocator<scoped_refptr<media::Filter> > >::_Destroy(scoped_refptr<media::Filter> * _First, scoped_refptr<media::Filter> * _Last)  Line 1270 + 0x14 bytes  C++
    libcef.dll!std::vector<scoped_refptr<media::Filter>,std::allocator<scoped_refptr<media::Filter> > >::erase(std::_Vector_const_iterator<std::_Vector_val<scoped_refptr<media::Filter>,std::allocator<scoped_refptr<media::Filter> > > > _First_arg, std::_Vector_const_iterator<std::_Vector_val<scoped_refptr<media::Filter>,std::allocator<scoped_refptr<media::Filter> > > > _Last_arg)  Line 1211    C++
    libcef.dll!std::vector<scoped_refptr<media::Filter>,std::allocator<scoped_refptr<media::Filter> > >::clear()  Line 1218 + 0x3a bytes    C++
    libcef.dll!media::CompositeFilter::~CompositeFilter()  Line 57  C++
    libcef.dll!media::CompositeFilter::`scalar deleting destructor'()  + 0x16 bytes C++
    libcef.dll!base::RefCountedThreadSafe<media::Filter,base::DefaultRefCountedThreadSafeTraits<media::Filter> >::DeleteInternal(const media::Filter * x)  Line 149 + 0x3f bytes    C++
    libcef.dll!base::DefaultRefCountedThreadSafeTraits<media::Filter>::Destruct(const media::Filter * x)  Line 115 + 0x9 bytes  C++
    libcef.dll!base::RefCountedThreadSafe<media::Filter,base::DefaultRefCountedThreadSafeTraits<media::Filter> >::Release()  Line 143 + 0x21 bytes  C++
    libcef.dll!scoped_refptr<media::Filter>::operator=(media::Filter * p)  Line 265 C++
    libcef.dll!media::PipelineImpl::FinishDestroyingFiltersTask()  Line 1094    C++
    libcef.dll!media::PipelineImpl::TeardownStateTransitionTask()  Line 1053    C++
    libcef.dll!base::internal::RunnableAdapter<void (__thiscall media::PipelineImpl::*)(void)>::Run(media::PipelineImpl * object)  Line 133 + 0x12 bytes    C++
    libcef.dll!base::internal::InvokeHelper<0,void,base::internal::RunnableAdapter<void (__thiscall media::PipelineImpl::*)(void)>,void __cdecl(media::PipelineImpl * const &)>::MakeItSo(base::internal::RunnableAdapter<void (__thiscall media::PipelineImpl::*)(void)> runnable, media::PipelineImpl * const & a1)  Line 849 C++
    libcef.dll!base::internal::Invoker<1,base::internal::BindState<base::internal::RunnableAdapter<void (__thiscall media::PipelineImpl::*)(void)>,void __cdecl(media::PipelineImpl *),void __cdecl(media::PipelineImpl *)>,void __cdecl(media::PipelineImpl *)>::Run(base::internal::BindStateBase * base)  Line 1133 + 0x14 bytes C++
    libcef.dll!base::Callback<void __cdecl(void)>::Run()  Line 267 + 0xe bytes  C++
    libcef.dll!MessageLoop::RunTask(const base::PendingTask & pending_task)  Line 506   C++
    libcef.dll!MessageLoop::DeferOrRunPendingTask(const base::PendingTask & pending_task)  Line 519 C++
    libcef.dll!MessageLoop::DoWork()  Line 706 + 0xc bytes  C++
    libcef.dll!base::MessagePumpDefault::Run(base::MessagePump::Delegate * delegate)  Line 28 + 0xf bytes   C++
    libcef.dll!MessageLoop::RunInternal()  Line 463 + 0x2a bytes    C++
    libcef.dll!MessageLoop::RunHandler()  Line 437  C++
    libcef.dll!MessageLoop::Run()  Line 343 C++
    libcef.dll!base::Thread::Run(MessageLoop * message_loop)  Line 127  C++
    libcef.dll!base::Thread::ThreadMain()  Line 161 + 0x16 bytes    C++
    libcef.dll!base::`anonymous namespace'::ThreadFunc(void * params)  Line 58 + 0xf bytes  C++

The problem is that the ReferenceAudioRenderer destructor is posting a task 
referencing the destroyed object.

Original comment by magreenb...@gmail.com on 16 Dec 2011 at 2:59

GoogleCodeExporter commented 9 years ago
Related Chromium issue: 
http://code.google.com/p/chromium/issues/detail?id=107864

Original comment by magreenb...@gmail.com on 16 Dec 2011 at 3:25

GoogleCodeExporter commented 9 years ago
Issue 470 has been merged into this issue.

Original comment by magreenb...@gmail.com on 3 Jan 2012 at 7:28

GoogleCodeExporter commented 9 years ago
The problem didn't occur at cef3. 
Version: cef_preview_3.1082.566_windows

It has been fixed in cef3, right?

Original comment by pengzuo...@gmail.com on 11 Apr 2012 at 1:28

GoogleCodeExporter commented 9 years ago
Correct, this is a problem with CEF1 only.

Original comment by magreenb...@gmail.com on 11 Apr 2012 at 2:46

GoogleCodeExporter commented 9 years ago
Furthemore, I can confirm that this problem goes away with a custom compilation 
of the last repository version of CEF 1. But if you download pre-built dll of 
CEF1, then you will have the problem.

Original comment by jfver...@gmail.com on 11 Apr 2012 at 3:10

GoogleCodeExporter commented 9 years ago
Note that audio playback capability was removed in revision 122508. See issue 
530 for details.

Original comment by magreenb...@gmail.com on 11 Apr 2012 at 3:22