Thanks for your ideas.
I will try your solution soon, DaveWithTheNiceHat.
I’m not sure if this will help, because I’m using an HTC Vive, so OculusXR should not be used in my case … but anyway I’ll give it a try.
For now I have simply completely disabled all OpenXR plugins, and it works fine, with SteamVR plugin enabled (even in the OpenXR template from Unreal)
So I went back to using the all good old SteamVR way instead of OpenXR (which is probably not ready to be used for now)
I have this issue as well. Disabling openxr is not a solution though, we need openXR to work. It’s only ocassional too. If I restart the project with the headset enabled already (worn) it won’t crash.
Sorry, I haven’t retried with OpenXR for a long time. I’ve switched back to SteamVR and it fixed my problem. So if you can use SteamVR instead of OpenXR, you have a solution.
But if OpenXR is mandatory for your project, I’m not sure there is a solution for now…
If anyone else gets this issue, for me it seems like there is no assert for if there is an empty input context slot and it causes an access violation to an empty address. Removing the empty slot fixed it for me.
My experience: I’ve had this problem in 4.27 and now it’s back in 5.2. Even when I try to open a simple test project made almost only with the VR Template. The same project in 5.1 opens with problem.
What I’ve found in my case:
Changing OpenXR runtime to Oculus works (in my case, done with OpenXR Explorer but I supose using the standard Oculus App works. But I agree that’s a workaround because I also want to use SteamVR.
When Openning with SteamVR, crashes. Even though I’ve opened the SteamVR soft.
BUT! I had no HMD attached. I had writen down from last time that it’s realated, so I plugged in my HMD (Quest2 Through Oculus Link), restarted activated Oculus Link inside my Quest, and restarted SteamVR app in the PC. And now it opens the project.
Hope it helps, but I cannot understand why that’s not an issue in 5.1 for me and yes un 4.27 and 5.2
Just my two cents here. Take it for what it’s worth as this is my experience of the crash and the only ■■■■ thing that stopped it happening…
Woke up to do my client work. Big client mind you. Project won’t open. Get the above crash. Ok, don’t panic. I update Windows just in case. No joy. I update Graphics drivers. No joy. I heard someone say to delete the ‘saved’ folder. Nope. I tried opening a few other levels, one or two worked, but same crash for other project levels.
The only thing I had done differently at all was unplug my VR headset the day before. While that seemed fairly irrelevant, it was a long shot. Then I google the exact error and come to this thread… which mentions VR. Interesting. So I figure what the hell, and I plugged my headset back in and everything was fine.
I can confirm that this happens if you’re using the OpenXR Plugin but your headset is not plugged in. I’d assume that this is actually a bug in the OpenXR plugin where it would run an assertion to initialize the environment for a headset but doesn’t find any and fail. That code actually hasn’t been touched for a while and I think that error has always been there as far as a I remember.
Alternatively switch OpenXR runtime (using something like OpenXR Explorer) to something other than SteamVR before opening Unreal if you don’t have a headset. Looks like SteamVR’s OpenXR implementation doesn’t elegantly handle the case when a HMD is not connected (unlike other runtimes)
I had the exact same problem, UE5.4 wouldn’t start until I switched on HMD. FPS with HMD on was 9-10. Turned off HMD after booting. I was able to do something, but it would crash a lot. Tried disconnecting the HMD from the PC did not solve the problem. I use varjo aero, in varjo base you can turn off steam vr and openXR. UE is running I will test it.