Skip to content

Headset buttons: no crash at launch on macOS 27 - #15

Merged
HSMM merged 1 commit into
mainfrom
fix/headset-hid-activate-crash
Nov 30, 2026
Merged

HSMM merged 1 commit into
mainfrom
fix/headset-hid-activate-crash

Conversation

@HSMM

@HSMM HSMM commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Fixes #14

On macOS 27 a device handed to the HID matching callback is already activated, so IOHIDDeviceRegisterInputValueCallback in deviceMatched trips the IOKit assertion "Device has already been activated/cancelled" (SIGTRAP on every launch).

  • The input value callback and its matching are registered on the manager before IOHIDManagerActivate.
  • release() only closes the device; it no longer unregisters a device callback (same assertion on unplug).

Checked: builds; the app starts and stays up on macOS 27.2. Not checked: a real headset's buttons, the reporter's device set.

…at launch on macOS 27)

On macOS 27 a device handed to the matching callback is already activated, and registering an input value callback on it trips an IOKit assertion (SIGTRAP on every launch). The callback is now registered on the manager before activation; release() no longer touches device callbacks.

Fixes #14
@HSMM
HSMM merged commit 346f6c1 into main Nov 30, 2026
1 check passed
@HSMM
HSMM deleted the fix/headset-hid-activate-crash branch November 30, 2026 22:24
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.

Crash on every launch on macOS 27.0.1: IOKit assertion "Device has already been activated/cancelled" in HeadsetButtons.deviceMatched (SIGTRAP)

1 participant