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.

GameObject methods don't support multi-threading

0 votes

Hi! We're facing issues with the wwise API, it seems that some threads are throwing exceptions, because they are trying to access GameObject methods which don't support multi-threading. The exceptions are caught by our IDE (JetBrains Rider), but are otherwise undetectable. It seems the threads are killed when trying to finalize and unregister a game object. Since it only throws when finalizing, this apparently doesn't lead to wrong behaviours or bugs. However, this highly reduces the efficiency of our debugging tools, so we need to find a way around this issue. Is this a known issue on your end? If so, what can we do about it? Please find attached the stack trace of the exception thrown, let me know if you need more information.

 

Stack Trace:
System.InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread at UnityEngine.Object.EnsureRunningOnMainThread () [0x0000d] in <10871f9e312b442cb78b9b97db88fdcb>:0 at UnityEngine.Object.GetInstanceID () [0x00001] in <10871f9e312b442cb78b9b97db88fdcb>:0 at AkSoundEngine.InternalGameObjectHash (UnityEngine.GameObject gameObject) [0x00001] in \Assets\Wwise\API\Runtime\Handwritten\Common\AkSoundEngine.cs:68 at AkSoundEngine.GetAkGameObjectID (UnityEngine.GameObject gameObject) [0x00001] in
\Assets\Wwise\API\Runtime\Handwritten\Common\AkSoundEngine.cs:87 at AkSoundEngine.UnregisterGameObj (UnityEngine.GameObject gameObject) [0x00001] in
\Assets\Wwise\API\Runtime\Handwritten\Common\AkSoundEngine.cs:128 at AkSoundEngine+AutoObject.Finalize () [0x00002] in
\Assets\Wwise\API\Runtime\AkSoundEngine.extensions.cs:39
 

 

 

asked Dec 7, 2023 in General Discussion by Antoine B. (150 points)

Please sign-in or register to answer this question.

...