Environment
Engine: cocos2d / CocosDenshion (SimpleAudioEngine / CDSoundEngine, OpenAL)
Devices/OS: iOS 15+
Crash platform: Bugly
Thread: main thread (com.apple.main-thread)
(If relevant, fill in:)
cocos2d / cocos2d-x version:
Xcode / SDK version:
OpenAL usage: SimpleAudioEngine playEffect(...)
What happens
We have an intermittent crash when playing sound effects:
SimpleAudioEngine::playEffect → CDSoundEngine playSound:sourceGroupId:pitch:pan:gain:loop: → alSourcePlay
Crash is not reliably reproducible locally. We tried:
switching Bluetooth devices
triggering alarms / notifications
but could not reproduce.
In Bugly, the issue occurs only on iOS 15 devices (no clear concentration on a specific 15.x minor version).
Sometimes the crash shows:
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000
Other times the stack shows a terminate from C++ ABI.
Call stack (from Bugly)
0 libc++abi.dylib std::__terminate(void ()()) + 16
1 libc++abi.dylib std::terminate() + 39
2 libAudioDSP.dylib _DNNVAD_DestroyInstance + 1728459
3 libAudioDSP.dylib _RegisterAUVoiceIsolation_Unsearchable + 1027507
4 libAudioDSP.dylib _DNNVAD_DestroyInstance + 1715459
5 libAudioDSP.dylib _DNNVAD_DestroyInstance + 1721223
6 libAudioDSP.dylib _DNNVAD_DestroyInstance + 1696439
7 OpenAL OALSource::UpdateBusFormat() + 219
8 OpenAL OALSource::ChangeChannelSettings() + 455
9 OpenAL OALSource::SetupMixerBus(CAStreamBasicDescription) + 95
10 OpenAL OALSource::Play() + 1587
11 OpenAL _alSourcePlay + 279
12 JellyBlast -[CDSoundEngine playSound:sourceGroupId:pitch:pan:gain:loop:] + 339
13 JellyBlast CocosDenshion::SimpleAudioEngine::playEffect(...) + 175
...