OpenXR crashes when playing VR Preview a second time in both UE 5.1.1 and 5.0.3
Hi, when using UE5 with Meta Quest 2, launching VR preview will crash the engine the second time I try to launch (first time works fine, as expected).
Steps to reproduce:
- Connect Meta Quest 2 to the PC, open Oculus Link in the headset, launching the Oculus App on the PC
- Open Unreal Engine
- Launch the game in VR Preview-mode
- Close the VR Preview-mode
- Launch the game in VR Preview-mode again
It will remain white, then crash.
Searching through the logs, this seems to be the reason:
[2023.11.08-12.00.19:855][356]LogOutputDevice: Error: Ensure condition failed: ((Result) >= 0) [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD.cpp] [Line: 1045]
[2023.11.08-12.00.19:855][356]LogOutputDevice: Error: OpenXR call failed with result XR_ERROR_SYSTEM_INVALID
My Meta Quest 2 is connected and is running the Oculus App, using Oculus Link to enable the VR Preview in Unreal prior to launching both of the times.
I believe this is an issue with OpenXR, it happens on two different VR-projects, both in UE 5.0.3 and 5.1.1.
