Description
Assertion failed: SoundWave->GetPrecacheState() == ESoundWavePrecacheState::InProgress

The above assertion fail was seen when played in standalone mode.

Play-In-Editor mode (PIE) is working as expected. You can hear your imported sound wave play out as normal. The actor reproduces and dies normally.

Seems like it only crashes when actor is created at runtime, simply placing an actor with granular synth in the level doesn't cause crashes.

A sample project is attached.

Steps to Reproduce

1.Create a new, blank BP project.
2. Import a useful sound wave. One is included with the project ZIP.
3. Create a new BP actor class.
4. Add a granular synthesizer component to your new BP class.
5. In the Event Graph, On BeginPlay, set the following on your Granular Synth component: Set Sound Wave (the audio you imported in step 2), optionally Set Grain Duration (200ms), optionally Set Grain Pitch (base: 0.9), Activate, and Note On (velocity 127)
6. Set Timer by Event on a new custom event. This event will simply spawn another actor of the same class. Timer duration: 5 seconds.
7. Set Lifespan of the actor to 5.1 seconds in details panel. (This will cause your actor to self-destruct after spawning another instance.)
8. Preview the game in "Standalone" mode. 

Results: The sound fails to play, and when the actor respawns 5 seconds later, the game crashes.

Expected: You should hear your imported sound wave play out as normal. The actor reproduces and dies normally.

Callstack

 

LoginId:a270f4404bdddd3c37b28b8debe4d294
EpicAccountId:d57f65c95c5d40d7b9a407ccf4e3c3fb
Assertion failed: SoundWave->GetPrecacheState() == ESoundWavePrecacheState::InProgress [File:L:/P4-Streams/JHuang_UE4_Release-4.26/Engine/Source/Runtime/Engine/Private/AudioDevice.cpp] [Line: 6077] Bad PrecacheState 0 on SoundWave /Game/Ahh_voice_sample.Ahh_voice_sample
UE4Editor_Core!AssertFailedImplV() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]
UE4Editor_Engine!DispatchCheckVerify<void,<lambda_d4495efdfb67eb3fc0d48764fe903908> >() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Core\Public\Misc\AssertionMacros.h:164]
UE4Editor_Engine!FAudioDevice::Precache() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Engine\Private\AudioDevice.cpp:6077]
UE4Editor_Engine!UE4Function_Private::TFunctionRefCaller<<lambda_20921082eac222e867ba62dd3d089725>,void __cdecl(void)>::Call() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Core\Public\Templates\Function.h:549]
UE4Editor_Engine!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),0> >::ExecuteTask() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:709]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:601]
UE4Editor_Engine!FAudioThread::Run() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Engine\Private\AudioThread.cpp:203]
UE4Editor_Core!FRunnableThreadWin::Run() [L:\P4-Streams\JHuang_UE4_Release-4.26\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-105072 in the post.

7
Login to Vote

Won't Fix
ComponentUE - Audio
Affects Versions4.25.34.26
CreatedJan 5, 2021
ResolvedJul 29, 2021
UpdatedSep 7, 2022