Crash in macOS AudioIPC when unplugging mic during a WebRTC call [@ cubeb_backend::capi::capi_stream_get_current_device]
Categories
(Core :: Audio/Video: MediaStreamGraph, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr60 | --- | unaffected |
| firefox-esr68 | --- | unaffected |
| firefox67 | --- | unaffected |
| firefox68 | --- | unaffected |
| firefox69 | --- | unaffected |
| firefox70 | --- | wontfix |
| firefox71 | --- | fixed |
People
(Reporter: chunmin, Assigned: padenot)
References
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
|
7.06 KB,
text/plain
|
Details |
Step to reproduce
- Open
about:configand setmedia.cubeb.sandboxto true - Go to https://mozilla.github.io/webrtc-landing/gum_test.html and click Audio
- Select a microphone that can be unplugged (USB microphone, bluetooth headset, ... etc)
- After the call is started, unplug the microphone
Expected result
The microphone is switched to another device (if there is another microphone)
Actual result
Get a crash
Crash log
Hit MOZ_CRASH(assertion failed: `(left == right)`
left: `true`,
right: `false`) at media/audioipc/client/src/lib.rs:84
#01: gkrust_shared::panic_hook::h38fd71e185dee508[/Users/<username>/Work/gecko/obj-x86_64-apple-darwin18.5.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x6641958]
#02: core::ops::function::Fn::call::h1f718a637c76b5da[/Users/<username>/Work/gecko/obj-x86_64-apple-darwin18.5.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ee5c]
#03: std::panicking::rust_panic_with_hook::hddd286a9c773fc67[/Users/<username>/Work/gecko/obj-x86_64-apple-darwin18.5.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7cdffb1]
#04: std::panicking::continue_panic_fmt::ha1bbafe7a6df805a[/Users/<username>/Work/gecko/obj-x86_64-apple-darwin18.5.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7cdf9fd]
#05: std::panicking::begin_panic_fmt::hea7f0ae086528c10[/Users/<username>/Work/gecko/obj-x86_64-apple-darwin18.5.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7cdf951]
#06: audioipc_client::assert_not_in_callback::_$u7b$$u7b$closure$u7d$$u7d$::h888e6b9e2c32ae64 (.llvm.2648616375446828804)[/Users/<username>/Work/gecko/obj-x86_64-apple-darwin18.5.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x6ad4e92]
#07: std::thread::local::LocalKey$LT$T$GT$::try_with::h80f82c0f885f93b1[/Users/<username>/Work/gecko/obj-x86_64-apple-darwin18.5.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x6ad3185]
#08: std::thread::local::LocalKey$LT$T$GT$::with::h974d8256753483fa[/Users/<username>/Work/gecko/obj-x86_64-apple-darwin18.5.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x6ad2cf9]
#09: _$LT$audioipc_client..stream..ClientStream$u20$as$u20$cubeb_backend..traits..StreamOps$GT$::current_device::he0bd32c96a3f0831[/Users/<username>/Work/gecko/obj-x86_64-apple-darwin18.5.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x6add10f]
| Reporter | ||
Comment 1•7 years ago
|
||
| Reporter | ||
Comment 2•7 years ago
|
||
Here is the crash report. Here can find more.
It looks like the GraphDriver calls the current_device that is not allowed to be called in a callback.
| Reporter | ||
Comment 3•7 years ago
|
||
Set the priority to P2 for now. Feel free to change it.
Comment 4•7 years ago
•
|
||
Re-entering the cubeb API from within a callback context is forbidden. The assert in AudioIPC enforces that - earlier in cubeb's history we didn't bother to enforce this and would end up with random bugs in various backends.
GraphDriver needs to the queue the panning change to run outside of callback context. That's probably the simplest/quickest fix. Paul was planning on removing panning from the cubeb API in https://github.com/kinetiknz/cubeb/issues/522, but I'm not sure when that'll happen.
Updated•7 years ago
|
Comment 6•7 years ago
|
||
Fixed by bug 1575638.
Updated•7 years ago
|
Updated•7 years ago
|
Description
•