Hello, my app crashed on the new MacOS12.x system, it works well on MacOS 11 BigSur.
I'm developing an audio app on MacOS using AudioUnit, it sometime crashed when i switch devices. the relevant api is:
AudioUnitSetProperty(audio_unit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, kAudioUnitOutputBus, &rnd_id, sizeof(rnd_id));
it troubles me for month, i can't find the reason or any useful info, any help will be appreciate.
the crash log is:
OS Version: macOS 12.1 (21C51)
Report Version: 12
Bridge OS Version: 6.1 (19P647)
Crashed Thread: 43 schedule-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000a14f8969188
Exception Codes: 0x0000000000000001, 0x00000a14f8969188
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
objc_msgSend() selector name: copy
Thread 43 Crashed:: schedule-thread
0 libobjc.A.dylib 0x7ff815ef405d objc_msgSend + 29
1 CoreAudio 0x7ff817a237b9 HALC_ShellDevice::_GetPropertyData(unsigned int, AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, unsigned int&, void*, unsigned int&, AudioObjectPropertyAddress&, bool&) const + 1133
2 CoreAudio 0x7ff817c57b81 invocation function for block in HALC_ShellObject::GetPropertyData(unsigned int, AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, unsigned int&, void*) const + 107
3 CoreAudio 0x7ff817e8a606 HALB_CommandGate::ExecuteCommand(void () block_pointer) const + 98
4 CoreAudio 0x7ff817c56a98 HALC_ShellObject::GetPropertyData(unsigned int, AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, unsigned int&, void*) const + 376
5 CoreAudio 0x7ff817b04235 HAL_HardwarePlugIn_ObjectGetPropertyData(AudioHardwarePlugInInterface**, unsigned int, AudioObjectPropertyAddress const*, unsigned int, void const*, unsigned int*, void*) + 349
6 CoreAudio 0x7ff817c16109 HALPlugIn::ObjectGetPropertyData(HALObject const&, AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int&, void*) const + 59
7 CoreAudio 0x7ff817bd2f5d HALObject::GetPropertyData(AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int&, void*) const + 461
8 CoreAudio 0x7ff817f2ffca HALDevice::GetPropertyData(AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int&, void*) const + 644
9 CoreAudio 0x7ff8179809ab AudioObjectGetPropertyData + 275
10 AudioDSP 0x134b6df19 0x13490b000 + 2502425
11 AudioDSP 0x134b69776 0x13490b000 + 2484086
12 AudioDSP 0x134cc4eb4 0x13490b000 + 3907252
13 AudioDSP 0x134cc5f56 0x13490b000 + 3911510
14 AudioDSP 0x134e17b2c 0x13490b000 + 5294892
15 AudioDSP 0x134e0f4d1 0x13490b000 + 5260497