Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

0 votes
Hi, we're receiving crash stacks with our prod builds with this series of function calls:

0  <unknown>                                                0xffffffdddddddddd
1  split_config.arm64_v8a.apk!libAkSoundEngine.so +0x2133ec CAkFileHelpers::CloseFile(AkFileDesc&) (AkFileHelpers.h:298:9)
2  split_config.arm64_v8a.apk!libAkSoundEngine.so +0x2133a4 CAkDefaultIOHookBlocking::Close(AkFileDesc&) (AkDefaultIOHookBlocking.cpp:207:29)
3  split_config.arm64_v8a.apk!libAkSoundEngine.so +0x21ded4 CAkFilePackageLowLevelIO<CAkDefaultIOHookBlocking, CAkDiskPackage>::Close(AkFileDesc&) (AkFilePackageLowLevelIO.inl:222:35)
4  split_config.arm64_v8a.apk!libAkSoundEngine.so +0x368de0 AK::StreamMgr::CAkStmTask::~CAkStmTask() (AkDeviceBase.cpp:980:36)
5  split_config.arm64_v8a.apk!libAkSoundEngine.so +0x3693a4 AK::StreamMgr::CAkStdStmBase::~CAkStdStmBase() (AkDeviceBase.cpp:1102:1)
6  split_config.arm64_v8a.apk!libAkSoundEngine.so +0x375c24 AK::StreamMgr::CAkStdStmBlocking::~CAkStdStmBlocking() (AkDeviceBlocking.cpp:444)
7  split_config.arm64_v8a.apk!libAkSoundEngine.so +0x3669c8 void AkDelete<AK::StreamMgr::CAkStmTask>(int, AK::StreamMgr::CAkStmTask*) (AkObject.h:118:16)
8  split_config.arm64_v8a.apk!libAkSoundEngine.so +0x367360 AK::StreamMgr::CAkDeviceBase::SchedulerFindNextTask(float&) (AkDeviceBase.cpp:449:5)
9  split_config.arm64_v8a.apk!libAkSoundEngine.so +0x375168 AK::StreamMgr::CAkDeviceBlocking::PerformIO() (AkDeviceBlocking.cpp:170)
10 split_config.arm64_v8a.apk!libAkSoundEngine.so +0x37defc AK::StreamMgr::CAkIOThread::IOSchedThread(void*) (AkIOThread.cpp:237:18)
11 libc.so +0xc37b0                                         __pthread_start(void*)
12 libc.so +0x5d080                                         __start_thread

These stacks are all Android stacks, I don't know if a similar issue is happening with iOS.
These crashes can happen both when the app is foregrounded/backgrounded but also when the app has never been in the background.

During debugging in editor, I started noticing these exceptions:

Object.EnsureRunningOnMainThread()at /Users/jeffery.chow/Library/Application Support/JetBrains/Rider2022.1/resharper-host/DecompilerCache/decompiler/6a9007df24904c27bc0d5500898fff63172a00/40/8b5dc120/Object.cs:line 73
Object.GetInstanceID()at /Users/jeffery.chow/Library/Application Support/JetBrains/Rider2022.1/resharper-host/DecompilerCache/decompiler/6a9007df24904c27bc0d5500898fff63172a00/40/8b5dc120/Object.cs:line 45
Object.IsNativeObjectAlive()
Object.CompareBaseObjects()
Object.op_Equality()
AkSoundEngine.InternalGameObjectHash()
AkSoundEngine.GetAkGameObjectID()
AkSoundEngine.UnregisterGameObj()
AkSoundEngine.AutoObject.Finalize()

Basically it looks like AkSounEngine.AutoObject.Finalize() is being called on a worker thread but calls a UnityEngine.Object.operator== which is only allowed on the main thread.
Could these be related?

We are on:
Unity 2022.3.10f1
Wwise Info:
    Based on Wwise SDK: 2021.1.13 Build 8036
    Unity Integration Bundle: 2021.1.13.2602
    Unity Integration Version: 19

Might these issues be addressed in 2022.1.13? I looked in the release notes and didn't find any bugs that closely matched our symptoms.

I did find this one:

WG-68844 Fixed: Possible crash when closing Wwise.

but our issue isn't limited to when closing wwise.
in General Discussion by J C. (150 points)

Please sign-in or register to answer this question.

...