Skip to content

fix: MacOS support#14544

Draft
brianferri wants to merge 1 commit intorealsenseai:developmentfrom
brianferri:development
Draft

fix: MacOS support#14544
brianferri wants to merge 1 commit intorealsenseai:developmentfrom
brianferri:development

Conversation

@brianferri
Copy link
Copy Markdown
Contributor

MacOS Compatibility Restoration (M-Series/Modern macOS)

Goal

The primary objective of this PR is to address the stability issues introduced by modern macOS versions and Apple Silicon (M1/M2/M3) architecture. Currently, the application frequently encounters segmentation faults during device discovery and initialization.

@sysrsbuild-gh
Copy link
Copy Markdown

Can one of the admins verify this patch?

This is the first of probably many other commits that will attempt to
bring realsense application back to being at least runnable on Mac.

---

Specifically, in this commit, referencing this issue
realsenseai#12727, the main drive
was to fix (or at least lessen) the segmentation faults you get once you
connect your realsense device to a USB port on an M-Series Mac, running
any modern MacOS version.

The `return_error` flag logic was completely removed, replaced with
early returns to prevent potential dereferences of uninitialized or
failed handles.

I also updated the code to use modern Apple IOKit constants, [mentioned
here](libusb/hidapi#377).
@ashrafk93
Copy link
Copy Markdown
Contributor

ashrafk93 commented Dec 29, 2025

@brianferri
thanks for your contribution.
may i ask how you tested this?
since currently motion sensors were disabled for mac due to these issues

@brianferri
Copy link
Copy Markdown
Contributor Author

brianferri commented Dec 29, 2025

@ashrafk93

thanks for your contribution.
may i ask how you tested this?
since currently motion sensors were disabled for mac due to these issues

This is a draft PR, I haven't touched any specific sensor logic yet. You can check the commit history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants