Error: Assertion failed: PipelineState.bXrFrameStateUpdated

UE Version: 5.1
Platform: Hololens
Problem: Crashes silently on startup

My packaged project for Hololens crashes on startup. I tried digging through the crash dump file and the logs and this was the result. Does anyone know how to solve this issue?

Here is the call stack.

>	CRC_MRSimulation-HoloLens-DebugGamearm64.exe!FOpenXRHMD::GetDisplayTime(void)	C++
 	CRC_MRSimulation-HoloLens-DebugGamearm64.exe!FOpenXRARSystem::OnStartARGameFrame(struct FWorldContext &)	C++
 	CRC_MRSimulation-HoloLens-DebugGamearm64.exe!FARSupportInterface::StartARGameFrame(struct FWorldContext &)	C++
 	CRC_MRSimulation-HoloLens-DebugGamearm64.exe!FOpenXRHMD::OnStartGameFrame(struct FWorldContext &)	C++
 	CRC_MRSimulation-HoloLens-DebugGamearm64.exe!UWorld::Tick(enum ELevelTick,float)	C++

XrTime FOpenXRHMD::GetDisplayTime() const
{
	const FPipelinedFrameState& PipelineState = GetPipelinedFrameStateForThread();
	check(PipelineState.bXrFrameStateUpdated);    // Crashed here
	return PipelineState.FrameState.predictedDisplayTime;
}

Apparently, this was a common issue in UE5 with MSFTOpenXR
Solved the problem by putting a delay in StartARSession() in BeginPlay()

FTimerHandle DelayTimerHandle;

GetWorld()->GetTimerManager().SetTimer(DelayTimerHandle, FTimerDelegate::CreateLambda(
	[this]()->void
	{
		UARBlueprintLibrary::StartARSession(ARSessionConfig);
	}
), 0.5f, false);
1 Like

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