Ue sometime crash when Audio play

Hello!
I am trying play ai generated audio in game. I use Runtime Audio Importer plugin to import audio to SoundWave and then play them. But sometimes urneal crashed in dark line.


And trigger the following exception:

And SoundToPlay is:

So what happend and how I slove this ? Thanks!

Edit: I think I find the solution. I add a reference to soundwave to ensure it doesn’t get garbage collected.

Looks like SountToPlay is null. Make sure it is not null and add if (!SoundToPlay) return; before the dark line.

1 Like

Before play audio, I use IsVaild to check SoundToPlay and it passed. But I notice that the ObjectFlags is RF_BeginDestroyed | RF_FinishDestroyed. Does it right?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.