fix(audio): bump cpal 0.16→0.17 to fix device-enumeration crash on macOS 26 (Tahoe) - #1644
fix(audio): bump cpal 0.16→0.17 to fix device-enumeration crash on macOS 26 (Tahoe)#1644xronocode wants to merge 2 commits into
Conversation
…S 26 cpal 0.16 (via coreaudio-rs 0.13) segfaults enumerating audio devices on macOS 26 (Tahoe) — a deterministic SIGSEGV shortly after launch when the frontend requests the device list. cpal 0.17 pulls coreaudio-rs 0.14, which resolves it. Migrate rodio off the cpal-0.16-pinned fork onto upstream 0.22 so the entire dependency tree shares a single cpal 0.17. - Cargo.toml: cpal 0.16.0 -> 0.17; rodio git fork -> 0.22 - recorder.rs: SampleRate became a u32 alias in 0.17 (drop the .0) - audio_feedback.rs: rodio 0.22 renamed OutputStreamBuilder -> DeviceSinkBuilder
|
Most likely, this cannot be merged as is largely because there are other changes in the libraries that affect other platforms that we have to be aware of and need to be testing, especially as it goes to device enumeration. So, certainly this can't be pulled in as is and I do still need more information about your specific system |
|
Agreed, and thanks for calling that out. This should be treated cautiously because the dependency bump affects audio backends beyond the specific macOS crash I hit. The patch itself is intentionally small: cpal 0.16 -> 0.17, moving rodio off the cpal-0.16-pinned fork to rodio 0.22, plus the two required API fixups ( What I verified locally:
What I have not verified:
So I agree this may not be merge-ready without broader testing. If there is a specific test matrix or smoke test you want run for Linux/Windows/macOS, I can help with the parts I can reproduce locally and keep the PR scoped to the dependency bump only. |
|
Hi @cjpais, gentle nudge on this one. I know you flagged that the cpal 0.16 to 0.17 bump pulls in other library changes that need care. Happy to do that legwork if it helps: I can rebase on current main, run the full build and tests locally, and write up exactly which transitive deps changed and what I verified, so there's less for you to dig through. Let me know if that's useful or if you'd rather take it a different way. No rush. |
|
I mean, if you want to take this up and are serious about getting this in, I need you to basically reach out across platforms and get validation on a wide range of devices from people in the community. It's just unlikely I can make a dependency bump without large amounts of testing because it seems likely to bring in new bugs that at the moment I'm not really willing to because, as far as I can tell, you're one of the only people running into the crash. Either that or I need more reports on the crash itself to make it a higher priority. But right now, this is just not a priority. There are so many other issues that are affecting more users with less risk, so that has to take my priority at the end of the day |
Before Submitting This PR
Duplicate search done: no open or closed issue/PR covers the macOS 26 (Tahoe) CoreAudio device-enumeration segfault or a cpal 0.16→0.17 bump. Closest issues are Linux-specific OSS/ALSA/PipeWire (#806, #1339, #1349).
Human Written Description
Handy crashes hard on launch on macOS 26 (Tahoe) — it segfaults while enumerating audio devices, so the app is unusable there at all. I traced it down to cpal 0.16's CoreAudio path (coreaudio-rs 0.13); bumping cpal to 0.17 (and rodio to 0.22 so the whole tree shares one cpal) makes it survive device enumeration and run normally. This is a straight crash on a current macOS, so I wanted to get it upstream.
Related Issues/Discussions
Fixes #1643
Community Feedback
This is a bug fix (top priority per CONTRIBUTING) for a hard crash on macOS 26 (Tahoe). Not previously reported upstream; surfacing it as a fix alongside the bug report.
Testing
Root cause verified:
cpal0.16 (viacoreaudio-rs0.13) segfaults in CoreAudio device enumeration on macOS 26.cpal0.17 pullscoreaudio-rs0.14, which resolves it. Verified the tree now resolves to a singlecpal v0.17.3(shared by the direct dep androdio v0.22.2) —cargo tree -i cpalconfirms no duplicate cpal version.Build verification (on
main@9b0d8a1):cargo check --locked→ 0 errorscargo clippy --locked→ no new lints (only pre-existingdevice.name()deprecation notes — see note below)cargo fmt --check→ cleancargo tree -i cpal→ singlecpal v0.17.3Manual verification needed (hardware/macOS): launch on macOS 26, open Settings → Audio — the app must survive device enumeration with no
SIGSEGV. Before this patch the crash was deterministic within ~15–22s of launch.Scope: 4 files —
Cargo.toml(2 dep lines),Cargo.lock(regenerated),recorder.rs(1 line:SampleRatebecame au32alias in 0.17),audio_feedback.rs(5 lines: rodio 0.22 renamedOutputStreamBuilder→DeviceSinkBuilder). No recording/enumeration logic changed; Linux host selection (get_cpal_host()→ ALSA) is untouched.Cross-platform note:
cpal0.17 +rodio0.22 are current upstream releases; the change is platform-agnostic at the API level (only theSampleRatetuple→alias and the rodio builder rename). Thecjpais/rodiofork (rodio 0.20, which pinned cpal 0.16) is dropped in favor of upstream rodio 0.22.Known follow-up (intentionally NOT in this PR):
cpal0.17 deprecatesDevice::name()in favor ofdescription()/id(). That migration is not a drop-in —description()returns richer strings (name + manufacturer) that could stop matching savedselected_microphone/selected_output_devicesettings, so it deserves its own PR and separate testing. Left as 4 deprecation warnings for now.Screenshots/Videos (if applicable)
Native
SIGSEGVcrash produces no in-app visual; repro is "launch on macOS 26 → Settings → Audio → SIGSEGV". Happy to capture a no-crash video on request.AI Assistance
If AI was used:
main, and running the build/clippy/fmt verification. The crash reproduction and the decision to migrate to cpal 0.17 were driven by real macOS 26 hardware testing in the fork.