'Stop Sound' and 'Destroy Component' - Don't stop looping sounds.

Calling Stop Sound or Destroy Component on an Audio Component created in UMG doesn’t actually destroy the sound, and leaves it orphaned in the world.

This ONLY seems to occur with Looping sounds! I can call ‘Fade out’, but after the fade the sound starts again from scratch. Perhaps this is an issue with looping sounds? Video:

The sound is created and played while the money counts up. If the player chooses to close the box early, it tries to stop the sound early. For some reason, this doesn’t work - even though the functions are called.

[2016.04.13-15.37.44:088][774]LogActorComponent:Error: May not destroy component AudioComponent /Game/Maps/UEDPIE_0_UM_EarthMapScaled.UM_EarthMapScaled:PersistentLevel.BP_PlayerController_C_0.AudioComponent_1 owned by BP_PlayerController_C /Game/Maps/UEDPIE_0_UM_EarthMapScaled.UM_EarthMapScaled:PersistentLevel.BP_PlayerController_C_0.

Also get that in the output log.

Hello ,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps needed to reproduce this issue on our end?
  3. Could you provide screen shots of any blueprints that may be involved in this issue (if not shown in the video)?

Hello ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

Hi Rudy

  1. Create a UMG widget
  2. Somewhere in the event graph, tell it to play a sound - and store that sound as a variable.
  3. Drag off from the sound somewhere else in the graph and try to ‘Stop’ it or call ‘Destroy Component’ - neither operation works even though the sound is still valid.
  4. Make sure the sound is set to loop. It probably does the same with non-looping audio too.

Hello ,

I was able to reproduce this issue on our end. I have written up a report (UE-29983) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.

Make it a great day

Hey Rudy, would it be possibly to add this to issues.unrealengine.com? Cheers!

This is still a problem in 4.12, after stopping a looping sound once, it’s then impossible to stop it again at all.

Finally figured out where the bug is caused:

void FSoundConcurrencyManager::RemoveActiveSound(FActiveSound* ActiveSound)
	if (!ActiveSound->ConcurrencyGroupID)

That’s from the engine in SoundConcurrency.cpp. Essentially it’s perfectly possible to create sounds without a Concurrency class, but if you do that, the Concurrency manager never removes them.

That’s kind of a big deal IMO, there’s probably a memory leak situation there where non-looping FActiveSounds never get removed from the concurrency manager, even though they’re not doing anything.

Giving my audio component a Concurrency class fixed this issue for now, but this isn’t a requirement when creating the sound!

Hello ,

We are showing this issue to be resolved on our end. I have provided a link to the public tracker below for reference. Is it possible that your steps to reproduce this issue have changed since the original report?

Link: Unreal Engine Issues and Bug Tracker (UE-29983)

I’ve responded to this in the forums. I do not think the concurrency manager has a memory leak: