Description

There's a crash when "Play Quantized" is used on an Audio Component that was constructed via the functions "Create Sound 2D" or "Spawn Sound 2D" when the option 'Persist Across Level Transitions' is checked, due to GetWorld() returning null within the Play Quantized function.

Steps to Reproduce
  • In a Blueprint, call the function "Create Sound 2D." with an audible sound in the 'Sound' setting.
  • Expand the options on the "Create Sound 2D" function, and enable "Persist Across Level Transition." 
  • Drag off the 'Return Value' output of the "Create Sound 2D" function and connect it to a "Play Quantized" call
  • Drag off the 'In Clock Handle' input of "Play Quantized" and connect it to a "Create New Clock" call, and give it a name
  • Connect "Create New Clock"'s input to "World Quartz Subsystem"
  • Drag off the "Quartz Quantization Boundary" of "Play Quantized" and create a new Quantization Boundary object
  • Place your Blueprint in the level, and trigger its "Create Sound 2D" to "Play Quantized" function in PIE

 

Expected Result:

  • The sound plays at the requested quantization boundary

 

Actual Result:

  • The engine crashes
Callstack
> [Inline Frame] UnrealEditor-Engine.dll!FQuartzTickableObject::Init::__l3::<lambda_d97d308ad9a67b939158966e91c971a1>::operator()() Line 27 >

[Inline Frame] UnrealEditor-Engine.dll!FQuartzTickableObject::Init::__l3::<lambda_d97d308ad9a67b939158966e91c971a1>::operator()() Line 27 

UnrealEditor-Engine.dll!FQuartzTickableObject::Init(UWorld * InWorldPtr) Line 27 
UnrealEditor-Engine.dll!UAudioComponent::PlayQuantized(const UObject * WorldContextObject, UQuartzClockHandle * & InClockHandle, FQuartzQuantizationBoundary & InQuantizationBoundary, const FOnQuartzCommandEventBP & InDelegate, float InStartTime, float InFadeInDuration, float InFadeVolumeLevel, EAudioFaderCurve InFadeCurve) Line 467 
UnrealEditor-Engine.dll!UAudioComponent::execPlayQuantized(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 935 C++  UnrealEditor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) Line 6438 
UnrealEditor-CoreUObject.dll!UObject::CallFunction(FFrame & Stack, void * const Z_Param__Result, UFunction * Function) Line 1101

  [Inline Frame] UnrealEditor-CoreUObject.dll!FFrame::Step(UObject *) Line 463 

UnrealEditor-CoreUObject.dll!UObject::ProcessContextOpcode(FFrame & Stack, void * const Z_Param__Result, bool bCanFailSilently) Line 3071 

[Inline Frame] UnrealEditor-CoreUObject.dll!FFrame::Step(UObject *) Line 463

  UnrealEditor-CoreUObject.dll!ProcessLocalScriptFunction(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1171 

UnrealEditor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>(UObject * Context, UFunction * Function, FFrame & Stack, void * const Z_Param__Result, void(*)(UObject *, FFrame &, void *) ExecFtor) Line 

  UnrealEditor-CoreUObject.dll!ProcessLocalFunction(UObject * Context, UFunction * Fn, FFrame & Stack, void * const Z_Param__Result) Line 1241 C++  [Inline Frame] UnrealEditor-CoreUObject.dll!FFrame::Step(UObject *) Line 463 

 UnrealEditor-CoreUObject.dll!ProcessLocalScriptFunction(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1171 C+  +UnrealEditor-CoreUObject.dll!UObject::ProcessInternal(UObject * Context, FFrame & Stack, void * const Z_Param+__Result) Line 1268 C+  UnrealEditor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) Line 6438 

UnrealEditor-CoreUObject.dll!UObject::ProcessEvent(UFunction * Function, void * Parms) Line 2103 C++  UnrealEditor-Engine.dll!AActor::ProcessEvent(UFunction * Function, void * Parameters) Line 1071 

 [Inline Frame] UnrealEditor-Engine.dll!FInputActionHandlerDynamicSignature_DelegateWrapper(const TScriptDelegate<FWeakObjectPtr> &) Line 127 

 [Inline Frame] UnrealEditor-Engine.dll!FInputActionHandlerDynamicSignature::Execute(FKey) Line 127 

UnrealEditor-Engine.dll!FInputActionUnifiedDelegate::Execute(const FKey Key) Line 302 

UnrealEditor-Engine.dll!UPlayerInput::ProcessInputStack(const TArray<UInputComponent *,TSizedDefaultAllocator<32>> & InputComponentStack, const float DeltaTime, const bool bGamePaused) Line 1431 

 UnrealEditor-EnhancedInput.dll!UEnhancedPlayerInput::ProcessInputStack(const TArray<UInputComponent *,TSizedDefaultAllocator<32>> & InputComponentStack, const float DeltaTime, const bool bGamePaused) Line 233 

 UnrealEditor-Engine.dll!APlayerController::ProcessPlayerInput(const float DeltaTime, const bool bGamePaused) Line 2663 

 UnrealEditor-Engine.dll!APlayerController::TickPlayerInput(const float DeltaSeconds, const bool bGamePaused) Line 4852 

 UnrealEditor-Engine.dll!APlayerController::PlayerTick(float DeltaTime) Line 2267 

 UnrealEditor-Engine.dll!APlayerController::TickActor(float DeltaSeconds, ELevelTick TickType, FActorTickFunction & ThisTickFunction) Line 5004 

UnrealEditor-Engine.dll!FActorTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 210 

 UnrealEditor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 284 

 UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 1336 

 [Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 938 

UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 760

  UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 649 

[Inline Frame] UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type CurrentThread) Line 2126 

 UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr<FGraphEvent>,TSizedInlineAllocator<4,32,TSizedDefaultAllocator<32>>> & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 2180 

 UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 565 

 UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1592 

 UnrealEditor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 794 

 UnrealEditor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1537 

UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1787

UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 516 

UnrealEditor-Win64-DebugGame.exe!FEngineLoop::Tick() Line 5343 

[Inline Frame] UnrealEditor-Win64-DebugGame.exe!EngineTick() Line 62 

UnrealEditor-Win64-DebugGame.exe!GuardedMain(const wchar_t * CmdLine) Line 186 

 UnrealEditor-Win64-DebugGame.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 279 

 UnrealEditor-Win64-DebugGame.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 337 

Have Comments or More Details?

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

5
Login to Vote

Fixed
ComponentUE - Audio - Quartz
Affects Versions5.05.1
Target Fix5.1
Fix Commit22459803
Main Commit22462719
Release Commit22459803
CreatedJul 15, 2022
ResolvedOct 11, 2022
UpdatedMay 29, 2023