chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.38k stars 467 forks source link

Audio handler broken with a crash on shutdown #3689

Closed pkviet closed 6 months ago

pkviet commented 6 months ago

Describe the bug Cef crashes on browser close due to Audio Handler. Here's the stack trace: devenv_2024-04-27_18-21-36

There an error message in OnAudioStreamError which is: Socket closed unexpectedly

The ceftests also fail for AudioOutputTest.AudioCloseBrowserTest with the same error message:

[ RUN      ] AudioOutputTest.AudioCloseBrowserTest
[0427/092425.012:WARNING:audio_output_unittest.cc(937)] OnAudioStreamError: message = Socket closed unexpectedly.
..\..\cef\tests\ceftests\audio_output_unittest.cc(948): error: Value of: got_on_audio_stream_stopped_
  Actual: false
Expected: true
Stack trace:
        `anonymous namespace'::AudioTestHandler::DestroyTest [0x00007FF65CCDEB3A+1018]
        `anonymous namespace'::AudioTestHandler::OnAudioStreamError [0x00007FF65CCE088D+253]
        CefAudioHandlerCppToC::CefAudioHandlerCppToC [0x00007FF65D2DAF90+2016]
        CefAudioHandlerCToCpp::OnAudioStreamError [0x00007FF9657EF78E+238]
        CefAudioCapturer::OnCaptureError [0x00007FF96586E8FB+203]
        media::AudioInputDevice::AudioThreadCallback::OnSocketError [0x00007FF969693C38+72]

..\..\cef\tests\ceftests\audio_output_unittest.cc(949): error: Value of: got_on_audio_stream_error_
  Actual: true
Expected: false
Stack trace:
        `anonymous namespace'::AudioTestHandler::DestroyTest [0x00007FF65CCDEC44+1284]
        `anonymous namespace'::AudioTestHandler::OnAudioStreamError [0x00007FF65CCE088D+253]
        CefAudioHandlerCppToC::CefAudioHandlerCppToC [0x00007FF65D2DAF90+2016]
        CefAudioHandlerCToCpp::OnAudioStreamError [0x00007FF9657EF78E+238]
        CefAudioCapturer::OnCaptureError [0x00007FF96586E8FB+203]
        media::AudioInputDevice::AudioThreadCallback::OnSocketError [0x00007FF969693C38+72]

To Reproduce Steps to reproduce the behavior:

  1. Just run ceftests --gtest_filter=AudioOutputTest

Expected behavior No crash on shutdown.

Screenshots

Versions (please complete the following information):

pkviet commented 6 months ago

@shagkur fyi

tytan652 commented 6 months ago

It looks like it might related to this chromium change https://chromium-review.googlesource.com/c/chromium/src/+/5331283