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.

+2 votes

Hello, we're using Wwise 2023.1.1.8417.2904 for UE 5.3.2 and we're encountering a failing check() when stopping PIE with multiple client players in AkAudioDevice.cpp line 3101: check(!m_defaultListeners.Contains(in_pComponent));

In this integration, they changed the typedef of UAkComponentSet to be a TSet of TWeakObjectPtrs as opposed to raw pointers, previously. This has a side effect of not being able to reliably find a matching entry in the TSet if the set contains any PendingKill objects (affects functions like Contains(), Find(), Remove(), etc). This is because the equality operator (used for the aforementioned functions) of TWeakObjectPtrs considers PendingKill objects both as nullptr, and therefore equal, even if the two weak ptrs were originally pointing to separate objects (this is because the equal op uses the de-ref op, which uses Get(bool bEvenIfPendingKill = false) for perf reasons).

In regards to Wwise's failing check(), where it worked previously because raw pointer addresses of PendingKill object were still distinct, it is now reasonable for the TSet that they're check()'ing against to contain multiple PendingKill ("null") listeners (due to stopping PIE multi-player), so the check() just doesn't make sense anymore - in fact, all of the usages of the TSet modification functions are now suspect because attempting to query/find/remove any PendingKill object will perform those actions with other PendingKill entries in the TSet even if the set didn't actually contain the object in question.

We're commenting-out the failing check() to stop the editor from closing for the team, but this change to use weak pointers as a drop-in replacement seems alarming to me - can someone from Wwise offer any insight?

Thanks

in General Discussion by Kevin Mabie (120 points)

Hello! Thank you for your post, we have exactly the same issue as you: www.audiokinetic.com/qa/12674/crash-bug-in-fakaudiodevice-unregistercomponent

We have removed temporarily the check like you, but replacing the TWeakObjectPtr to a raw pointer as it was before also works.

Looking forward to hear from Wwise guys.

Hey, we've been seeing the same thing using 2023.1.4.8496.3012, and I've commented out the check for now too. I'm wary of changing the TWeakObjectPtr back to raw though! It seems there has been a bit of work in this area given the IsValid test, and CleanDefaultListeners function used in editor builds. I'm looking forward to a resolution too.

Please sign-in or register to answer this question.

...