Closed Bug 1675719 Opened 4 years ago Closed 4 years ago

Crash in [@ core::option::expect_none_failed | cubeb_coreaudio::backend::CoreStreamData::setup]

Categories

(Core :: Audio/Video: cubeb, defect, P1)

Unspecified
macOS
defect

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox82 --- wontfix
firefox83 --- wontfix
firefox84 --- fixed

People

(Reporter: gsvelto, Assigned: chunmin)

References

(Blocks 1 open bug)

Details

(Keywords: crash)

Crash Data

Attachments

(3 files)

Crash report: https://crash-stats.mozilla.org/report/index/f20f2ec0-5905-4421-bba8-fd4300201105

MOZ_CRASH Reason: Invalid output layout: DuplicateNonSilenceChannel

Top 10 frames of crashing thread:

0 XUL RustMozCrash mozglue/static/rust/wrappers.cpp:17
1 XUL core::ops::function::Fn::call src/libcore/ops/function.rs:72
2 XUL std::panicking::rust_panic_with_hook src/libstd/panicking.rs:474
3 XUL rust_begin_unwind src/libstd/panicking.rs:378
4 XUL core::panicking::panic_fmt src/libcore/panicking.rs:85
5 XUL core::option::expect_none_failed src/libcore/option.rs:1211
6 XUL cubeb_coreaudio::backend::CoreStreamData::setup third_party/rust/cubeb-coreaudio/src/backend/mod.rs:2708
7 XUL cubeb_backend::capi::capi_stream_init third_party/rust/cubeb-backend/src/capi.rs:156
8 XUL cubeb_stream_init media/libcubeb/src/cubeb.c:335
9 XUL XUL@0x3d93a9f 

This appears to be a macOS-specific crash

Assignee: nobody → cchang
Flags: needinfo?(cchang)

I'll take a look

Blocks: 1530713
Severity: -- → S3
Flags: needinfo?(cchang)
Priority: -- → P1

The MOZ_CRASH Reason is Invalid output layout: DuplicateNonSilenceChannel, which means there are duplicate non-silent channels in the output channel layout (e.g, <Front Right, Front Right>). So we got a panic when creating the mixer.

To avoid that, either we allow duplicate channels in the layout, or we need to use a different valid channel layout rather than what the device defines. The Audio MIDI Setup on MacOS disallows setting two channels to the same label (e.g., setting both first and second channel to Front Right). It will pop up a Overlapping Channels error. That implies the overlapping channels in the device layout is not defined by the user. The layout with overlapping channels may be defined by the firmware instead of user. It's not necessary to accept this kind of layout if the user doesn't ask it explicitly. Instead, it's better to follow the policy on Mac OS here.

I think we need to guess the output channel layout in this case, like what we did here.

Attached file GitHub Pull Request

Depends on D96617

Pushed by cchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d7f2e35881f1
P1: Update cubeb-coreaudio to 8766705 r=cubeb-reviewers,kinetik
https://hg.mozilla.org/integration/autoland/rev/c765cf351f8c
P2: mach vendor rust r=cubeb-reviewers,kinetik
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: