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.

Crash caused by loading maps in UE with Event-based Packaging

+1 vote
Using 2019.2.4.7329.1721:

Loading maps in UE4 can cause a crash in the UE4 integration plugin. It crashes at line 78 in the Load function of UAkAssetDataWithMedia in AkAssetBase.cpp because the garbage collector has collected a sound asset and cleaned it up during a map change.

I managed to find what appears to be causing the problem. The Unload function is called at the correct time, but when mediaStreamHandle is valid it's supposed to be cleaned up here (line 98). The bug is that the function being called is ReleaseHandle instead of CancelHandle. This means that the Asynchronous loading callback from line 75 of the Load function does not get cancelled and the callback then crashes accessing a deleted object.

The fix is to change line 98 from
mediaStreamHandle->ReleaseHandle();
to
mediaStreamHandle->CancelHandle();

I hope other people find this useful and that the development team can incorporate this fix into the next version!
asked Aug 17, 2020 in General Discussion by Ben M. (110 points)

Please sign-in or register to answer this question.

...