Skip to content

Fix crash when trying to use the microphone on macOS.#12074

Merged
vorporeal merged 2 commits into
masterfrom
david/fix-macos-microphone-access-crash
Jun 2, 2026
Merged

Fix crash when trying to use the microphone on macOS.#12074
vorporeal merged 2 commits into
masterfrom
david/fix-macos-microphone-access-crash

Conversation

@vorporeal
Copy link
Copy Markdown
Contributor

@vorporeal vorporeal commented Jun 2, 2026

Description

The authorizationStatusForMediaType API returns an unsigned 64-bit integer, but our code was storing the result as a i32. When we moved from using the objc crate to the objc2 crate, I think the new crate performs more careful checking of these types, and started to produce a runtime error as a result of the type mismatch.

The objc2 crate family includes objc2-av-foundation, which includes concrete APIs for all of the code here. I've moved over to using that, improving safety and clarity.

Testing

  • Manually tested that accessing the microphone crashes on master but succeeds on this branch.

@cla-bot cla-bot Bot added the cla-signed label Jun 2, 2026
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vorporeal vorporeal requested a review from alokedesai June 2, 2026 15:30
@vorporeal vorporeal marked this pull request as ready for review June 2, 2026 15:39
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 2, 2026

@vorporeal

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR switches the macOS microphone permission check from a hand-written Objective-C message send to the typed objc2-av-foundation bindings and wires the new dependency.

Concerns

  • For this user-facing crash fix, please include screenshots or a short screen recording demonstrating microphone access working end to end on this branch. The description only states manual testing, and the repo guidance requires visual evidence for behavioral/user-facing changes.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@vorporeal vorporeal enabled auto-merge (squash) June 2, 2026 15:45
@vorporeal vorporeal merged commit 463df36 into master Jun 2, 2026
27 checks passed
@vorporeal vorporeal deleted the david/fix-macos-microphone-access-crash branch June 2, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants