Stereo Layers break my game

Setup: UE5.1, Oculus Quest 2, project based on VR template. Custom Gamemode/Map. OpenXR plugin enabled.

When I add stereo layer to my pawn (either through BP or CPP), it leads to a crash in VR preview.

This is the error that I get:
Fatal error: [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD_Swapchain.cpp] [Line: 93] Failed to wait on acquired swapchain image. This usually indicates a problem with the OpenXR runtime.

In CPP stereo layer implementation, I noticed that it happens only if I call SetTexture() method. In BP implementation, game crashes either during start or within ~10-15 seconds from start.

I am using Face Locked, Quad Layer options. Tried various textures (e.g. T_Grid). Also tried setting the texture compression settings to UI.

Has anyone experienced anything similar?

I don’t know what causes this problem.

These are from the crash logs, but they don’t seem very helpful to me:

[2023.06.05-12.37.31:908][760]LogResonanceAudio: Display: Resonance Audio Listener is initialized
[2023.06.05-12.37.31:918][760]LogRenderer: Warning: Resizing VR buffer to 3648 by 1840
[2023.06.05-12.37.31:921][760]LogSlate: Took 0.000134 seconds to synchronously load lazily loaded font ‘…/…/…/Engine/Content/Slate/Fonts/Roboto-Regular.ttf’ (155K)
[2023.06.05-12.37.31:971][762]LogProfilingDebugging: Allocated a 1024 x 1024 texture for HMD canvas layer
[2023.06.05-12.37.31:993][763]LogStats: FPlatformStackWalk::StackWalkAndDump - 0.008 s
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: === Handled ensure: ===
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error:
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: Ensure condition failed: ((Result) >= 0) [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD_Swapchain.cpp] [Line: 47]
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: OpenXR call failed with result XR_ERROR_CALL_ORDER_INVALID
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: Stack:
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd07bd894b UnrealEditor-OpenXRHMD.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd07bcfd71 UnrealEditor-OpenXRHMD.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd59454fb5 UnrealEditor-RHI.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd59422927 UnrealEditor-RHI.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd59462a04 UnrealEditor-RHI.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd42e82fdd UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd42e8352e UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd59853ac2 UnrealEditor-RenderCore.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd435a5342 UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffd4359d230 UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffdafe87614 KERNEL32.DLL!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error: [Callstack] 0x00007ffdb03226a1 ntdll.dll!UnknownFunction
[2023.06.05-12.37.31:993][763]LogOutputDevice: Error:
[2023.06.05-12.37.31:998][763]LogStats: SubmitErrorReport - 0.000 s
[2023.06.05-12.37.32:036][763]LogRHI: Error: Breadcrumbs ‘RHIThread’

[2023.06.05-12.37.32:789][763]LogStats: SendNewReport - 0.791 s
[2023.06.05-12.37.32:789][763]LogStats: FDebug::EnsureFailed - 0.805 s
[2023.06.05-12.37.32:799][763]LogStats: FPlatformStackWalk::StackWalkAndDump - 0.009 s
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: === Handled ensure: ===
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error:
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: Ensure condition failed: ((Result) >= 0) [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD_Swapchain.cpp] [Line: 124]
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: OpenXR call failed with result XR_ERROR_VALIDATION_FAILURE
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: Stack:
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd07be68b9 UnrealEditor-OpenXRHMD.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd07bcfc81 UnrealEditor-OpenXRHMD.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd59454fb5 UnrealEditor-RHI.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd59422927 UnrealEditor-RHI.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd59462a04 UnrealEditor-RHI.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd42e82fdd UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd42e8352e UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd59853ac2 UnrealEditor-RenderCore.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd435a5342 UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffd4359d230 UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffdafe87614 KERNEL32.DLL!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error: [Callstack] 0x00007ffdb03226a1 ntdll.dll!UnknownFunction
[2023.06.05-12.37.32:799][763]LogOutputDevice: Error:
[2023.06.05-12.37.32:803][763]LogStats: SubmitErrorReport - 0.000 s
[2023.06.05-12.37.32:842][763]LogRHI: Error: Breadcrumbs ‘RHIThread’

[2023.06.05-12.37.34:993][763]LogStats: SendNewReport - 2.190 s
[2023.06.05-12.37.34:993][763]LogStats: FDebug::EnsureFailed - 2.204 s
[2023.06.05-12.37.35:008][764]LogStats: FPlatformStackWalk::StackWalkAndDump - 0.008 s
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: === Handled ensure: ===
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error:
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: Ensure condition failed: ((Result) >= 0) [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD_Swapchain.cpp] [Line: 83]
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: OpenXR call failed with result XR_ERROR_CALL_ORDER_INVALID
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: Stack:
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd07bf1d0c UnrealEditor-OpenXRHMD.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd07bcfd9a UnrealEditor-OpenXRHMD.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd59454fb5 UnrealEditor-RHI.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd59422927 UnrealEditor-RHI.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd59462a04 UnrealEditor-RHI.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd42e82fdd UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd42e8352e UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd59853ac2 UnrealEditor-RenderCore.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd435a5342 UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffd4359d230 UnrealEditor-Core.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffdafe87614 KERNEL32.DLL!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error: [Callstack] 0x00007ffdb03226a1 ntdll.dll!UnknownFunction
[2023.06.05-12.37.35:008][764]LogOutputDevice: Error:
[2023.06.05-12.37.35:014][764]LogStats: SubmitErrorReport - 0.000 s
[2023.06.05-12.37.35:052][764]LogRHI: Error: Breadcrumbs ‘RHIThread’

[2023.06.05-12.37.37:209][764]LogStats: SendNewReport - 2.194 s
[2023.06.05-12.37.37:209][764]LogStats: FDebug::EnsureFailed - 2.209 s
[2023.06.05-12.37.37:209][764]LogWindows: Error: appError called: Fatal error: [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD_Swapchain.cpp] [Line: 93]
Failed to wait on acquired swapchain image. This usually indicates a problem with the OpenXR runtime.

After downloading Meta XR plugin seems to be stable. Will test and write back in future again. Related: Is Meta XR plugin needed for Quest 2? - #3 by AxSoler

Seems stable .

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