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.

What causes a music related UAkAudioEvent to not deactivate for garbage collection on the Unreal Engine 4?

0 votes

Every now and again a certain UAkAudioEvent for pausing and unpausing music won't garbage collect when closing a game made on UE4 version 4.26.2 using Wwise 2021.1.1.7601.1995.  First the garbage collector tries to destroy the audio event via UAkAudioEvent::BeginDestroy() which always fires the following warning (other events also fire it sometimes):

UE_LOG(LogAkAudio, Warning, TEXT("Stopping all instances of the \"%s\" event because it is being unloaded."), *GetName());

Then the garbage collector tries to call UAkAudioEvent::IsReadyForFinishDestroy() over and over again which in turn tries to call AK::SoundEngine::RenderAudio() which doesn't deactivate the event.  The event that is being deleted is the only active event in the audio device and there are no async tasks.  The log file keeps growing filling up the log file with this message:

[2022.04.12-03.38.48:818][394]LogGarbage: Warning: [0]: AkAudioEvent None.None, IsReadyForFinishDestroy: false

[2022.04.12-03.38.48:818][394]LogGarbage: Warning: Spent more than 10.00s on routing FinishDestroy to objects (objects in queue: 1)

The UAkAudioEvent pauses the game's music, starts the menu music, and also pauses all sounds.  There is a resume UAkAudioEvent that does the opposite which always gets called when exiting the game menu.  I only found this forum which had the same problem with no solution.  What is the garbage collector trying to accomplish by calling AK::SoundEngine::RenderAudio() over and over to deactivate the event?   Also why would an event that only contains pauses and a start not deactivate or stay active for a very long time?

asked Apr 13, 2022 in General Discussion by Elroy (100 points)
edited Apr 18, 2022 by Elroy

Please sign-in or register to answer this question.

...