UE5 VR Template Crashes on VR Preview with OpenXR + Vive

Question: Has anyone successfully launched a “VR Preview” of the default VR template using a Vive Cosmos Elite and the OpenXR plugin? Mine crashes on every play.

Steps to Reproduce: Create a fresh copy of the UE5.1 VR template with Starter Content. Play default level in VR using VR Preview, with SteamVR and VIVE Console running. Crashes every time.

Error Message Reported: Assertion failed: InOutSizeX != 0 && InOutSizeY != 0 [File:D:\build\++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD.cpp] [Line: 890]

Attempted Fixes: Things I’ve tried, based on other forum posts:

  • Switched targeted RHI from DX12 to DX11 or Vulcan in Project Settings => Platforms => Windows => Default RHI. Result: Same crash as above.

  • Switched VR plugin from OpenXR to SteamVR plugin. Result: VR Preview works when using SteamVR plugin, but controller buttons don’t function. (Likely because the deprecated StreamVR plugin doesn’t support the Enhanced Input System.)

Devices and Software Versions:
Unreal Version: 5.1.1
VR Device: Vive Comos Elite (All firmware up to date.)
Steam VR Version: 1.25.7
VIVE Console Version: 2.0.23.2
GPU: Nvidia GeForce RTX 3080
OS: Windows 11 (22H2 22621.1413)

Full Logs from Saved\Crashes Folder:
FirstVR_2.log (138.0 KB)

SteamVR System Report:
SteamVR-2023-04-15-AM_07_37_28.txt (2.3 MB)

Update: Over in the Unreal Slackers Discord, VictorLerp suggested that I add the newly released Vive OpenXR Plugin (v1.6.0 for UE5.1) to the project. With this plugin installed (along with Epic’s OpenXR plugin) I’m still getting the same assertion failed crash.

The Vive folks have also provided a sample UE5.1 project with their new v1.6.0 Vive OpenXR Plugin at the above link. It also crashes on play, but with a series of XR_ERROR_HANDLE_INVALID errors.

Full logs from Vive OpenXR Sample UE5.1 Project:
ViveOpenXRGame_2.log (144.7 KB)

I’ve now cross-posted my help request to the HTC forums.

From what I can tell in the log, you’re not using the default VR Template. There are Focus 3 keybindings, Enhanced Input is not setup, etc. Is this a sample project from HTC? You’re also using the Vive Reality Runtime, not SteamVR.

The log in my second post is indeed from the Vive sample. My first post includes the logs from Epic’s Default VR template.

That said, you’re absolutely correct about the runtime. I’m so new to VR development that I didn’t realized the SteamVR app had different OpenXR runtimes that I could change via developer settings.

I’ve changed the runtime to SteamVR such that the logs now show: LogHMD: Initialized OpenXR on SteamVR/OpenXR runtime version 0.1.0

The default VR Template now launches without crashing!

Thank you very much @VictorLerp for your assistance!

The Solution For Others Who Might Have This Problem: If you cannot launch Epic’s UE5.1 Default VR Template with a Vive Cosmos Elite using the OpenXR Plugin:

  1. Ensure that you’ve enabled the developer settings in the SteamVR app and have changed your OpenXR runtime from ViveOpenXR to SteamVR: Instructions here.
  2. Ensure that along with Epic’s OpenXR plugin, that your project also includes the latest Vive OpenXR plugin in your project’s Plugins folder.
1 Like

It should be noted, that if the Vive OpenXR Plugin contains OpenXR Vendor Extensions from HTC, those features may only work w. the Vive Reality Runtime. You can use OpenXR Explorer to check which extensions are available in the runtime.

1 Like

Thanks for being awesome Victor!