Setting "Enable HMD" causing crash on DX12 with OpenXR

I get an instant crash when setting “Enable HMD” to true.

I am using UE 4.27.2
My headset is the valve index
The crash only occurs when DX12 is the default RHI.
The crash only occurs when OpenXR is being used. The SteamVR plugin works fine.
I’ve tested OpenXR and SteamVR in a minimal_default project. I also tested OpenXR in the included VR template and that also crashes.

The error I have when I open the minidmp file:

  1. Unhandled exception at 0x00007FFA5F9853AD (vrclient_x64.dll) in UE4Minidump.dmp: 0xC0000005: Access violation reading location 0x0000000000000000.

My intended functionality is this:
If the player has a VR headset plugged in when they launch the game, they are asked if they would like to enable VR mode. If they click yes, once in game, VR mode will be enabled and the main screen will display “put on your VR headset” until the HMD is worn.

I would use DX11 except my project has some dependencies which require DX12, so that is not an option. I also would really like to utilize OpenXR to ensure future compatibility. The default VR template would also be a nice starting point so I didn’t have to develop everything from scratch.

Any suggestions and support would be appreciated!

1 Like

This seems to be an issue with the current SteamVR release. Switching SteamVR to the beta branch should fix it.

2 Likes

Yes! The latest beta version of SteamVR works perfectly. Hoping SteamVR gets updated by the time I’m ready to release.

Thanks!

Good day guys,

I am also having this issue, but within UE5. We load properly into the level into through HMD initially, but when teleporting to a new level, it is kicking up an error similar to yours regarding openxr. We have tried the SteamVR Beta method to no luck.

Any ideas?

Hi! Adding a 0.5 seconds delay before calling “Enable HMD” function solved this problem for me.

1 Like

This is important as well for sure. If you try to “Enable HMD” too quickly after loading a level it seems to cause a crash too.

It definitely is an issue unrelated to the SteamVR bug.

Hi. Trying this delay for “enable HMD” to solve my 5.02 VR film project. Could you direct me towards how to setup a delay. In the level blueprint?

this helps - I’m not getting any crashes in the editor anymore, but I still get this issue in builds. anyone got any tips for a fix for package project?