[iOS Crash Issue in Cocos Creator 3.8.2: AudioEngine / OpenAL Context]

Hello,

I’m currently experiencing a crash issue on the iOS platform while running my live game (developed with Cocos Creator 3.8.2). The crash log is as follows:

mach_msg2_trap + 8
9 OpenAL
alcMakeContextCurrent + 412
10 alcatmist
cc::AudioEngineImpl::~AudioEngineImpl() + 4304651436
11 alcatmist
cc::AudioEngineImpl::~AudioEngineImpl() + 4304651812
12 alcatmist
cc::AudioEngine::end() + 4304620516
13 alcatmist
cc::Engine::destroy() + 4305742132
14 alcatmist
cc::Engine::~Engine() + 4305741836
15 alcatmist
cc::CocosApplication::~CocosApplication() + 4304613540
16 alcatmist
cocos_destroy() + 4304612124
17 alcatmist
-[AppDelegateBridge applicationWillTerminate:] + 4306378484

From what I can see, the crash seems related to AudioEngine / OpenAL context handling during termination. It looks like the crash is triggered when AudioEngineImpl and AudioEngine::end() are being destroyed, possibly due to an invalid or already-released audio context.

Questions:

  1. Has anyone else encountered this issue with Cocos Creator 3.8.2 on iOS?
  2. Is there a known fix or workaround (e.g., manually releasing the AudioEngine context earlier, or preventing double-destruction)?
  3. Should I consider updating to a newer version of Cocos Creator, or is there a patch for 3.8.2 that addresses this?

Any advice, insight, or code-level suggestions would be greatly appreciated.

Thank you!

Does anyone know a solution? I’m currently receiving complaints from iOS users. It’s frustrating.

Cocos 385 has fixed some IOS audio errors|crashes. You can upload the Cocos to 385. Or you can search the pr by linked:Pull requests · cocos/cocos-engine · GitHub and merge the codes by yourself. Hope that will help you.

Thank you very much. I will reflect this in this update.