macOS: AudioRelay Crashes When Display Audio Device Changes (DP ↔ HDMI)

Description

AudioRelay on macOS consistently crashes when my monitor input is switched from HDMI (Mac) to DisplayPort (Windows). The application closes instantly with no dialog.

From the macOS crash report sent to Apple, the crash occurs on Thread 79, which handles CoreAudio HAL notifications:

Thread 79 Crashed:: Dispatch queue: HALC_ProxyNotification Call
0   libsystem_kernel.dylib        0x1912535b0 \__pthread_kill + 8
1   libsystem_pthread.dylib       0x19128d888 pthread_kill + 34
2   libjvm.dylib                  0x10710dc24 os::abort(bool, void const\*, void const\*) + 564
3   libjvm.dylib                  0x10710deec VMError::report_and_die(…) + 726
4   libjvm.dylib                  0x107113b1c VMError::report_and_die(Thread\*, unsigned int, unsigned int, AudioObjectPropertyAddress const\*) + 2000
5   CoreAudio                     0x1945b9738 HALC_ProxyObjectPropertyElement::CallObjectPropertyListeners(…) + 952
6   CoreAudio                     0x1945b9ab0 HALC_ProxyNotifications::Listener::\__invoke(void\*) + 601
7   libdispatch.dylib             0x1910eaac4 \_dispatch_client_callout + 20
8   libdispatch.dylib             0x1910d9ff8 \_dispatch_lane_invoke + 440
9   libdispatch.dylib             0x1910db308 \_dispatch_workloop_worker_thread + …
10  libsystem_pthread.dylib       0x191288b9c start_wqthread + 8

This appears to be a null pointer dereference inside the HAL proxy notification system when the audio device list changes after switching monitor inputs.


Steps to Reproduce

  1. Start AudioRelay on macOS.

  2. Ensure monitor is displaying the Mac input via HDMI.

  3. Change the monitor input to DisplayPort (which is connected to a Windows PC).

  4. AudioRelay immediately crashes on the macOS side.

This occurs 100% of the time.


Devices / Environment

Device A (Mac side):

  • macOS: 26.1

  • AudioRelay: 1.0.0-alpha4

  • Hardware: Mac (running HDMI output)

  • Condition: Multiple audio devices present (HDMI, DP, Bluetooth)

Device B (Windows side):

  • Windows 11

  • AudioRelay: 1.0.0-alpha4

  • Connected to the same monitor via DisplayPort.


Additional Notes

  • The crash happens only when switching inputs on the physical monitor.

  • When the UI is hidden/minimized, the crash is even more frequent.

  • Windows does not experience this issue; only macOS crashes.

  • Likely related to CoreAudio HAL device churn when HDMI disappears and DP appears.


@superben Thanks for detailed report!

It should be fixed in 1.0.0-alpha06. Please let me know if that’s not the case.

That has been fixed, I switched my sources a few times and no crashes. Separate problem with my premium account responding with a 401 error and it doesn’t let me stay connected to my Windows machine. It says I’m using uncompressed audio regardless of the settings page and disconnects because the premium status isn’t getting checked. Maybe thats because Windows is still 0.27.5 I will probably switch back to 0.27.5 for now on my mac but thank you :slight_smile:. 1.0 is looking cool and I am looking forward to it.