HarbourMasters / HarbourMasters/Shipwright
Crash on Controller Connect/Disconnect – macOS Sequoia 15.4 (M1 Pro)
- Dominant language
- C
- Stars
- 5.4k
- Forks
- 837
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
I’m encountering consistent, reproducible crashes when connecting or disconnecting any controllers on macOS as of v9.0.0. I’m not very familiar with macOS crash logs or low-level debugging, but after combing through the crash report, I *think* I have a rough idea of what might be happening.
[Here's the log](https://github.com/user-attachments/files/19623683/LOG.txt)
From what I can tell, the crash seems related to SDL2 and HID device handling. The crash log shows a segmentation fault in `__IOHIDDeviceSetupAsyncSupport`, which appears to be part of the IOKit HID cleanup process. It also references `SDL_hid_close_REAL` and `Ship::SDLAddRemoveDeviceEventHandler::UpdateElement`, so it looks like the crash occurs during the removal or update of a HID device.
The system is attempting to access a NULL pointer (`EXC_BAD_ACCESS (SIGSEGV)`), so my guess is that it might be trying to close or update a device that was already freed or wasn’t fully initialized.
That said, I’m not entirely sure I’m interpreting this correctly—just hoping this context helps. Let me know if there's anything I can collect or try. I love the project and am more than happy to help with testing or logs.
---
**Tested Controllers:**
- Xbox Elite Series 2 Controller (wired and wireless)
- Nintendo Switch Pro Controller (wireless)
- Retro Fighters Brawler64 v2 Controller (wireless)
**Behavior:**
- On version 9.0.0, the app crashes shortly after connecting or disconnecting any of the controllers above.
- On version 8.0.6, the app would freeze briefly during controller connect/disconnect but would recover shortly without crashing... 99% of the time.
---
**System Info:**
- **macOS Version:** macOS Sequoia 15.4 (24E248)
- **Model Identifier:** MacBookPro18,3
- **Model Number:** MKGP3LL/A
- **Chip:** Apple M1 Pro
- **Memory:** 16 GB
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.