I am having an issue creating a session when the Windows Mixed Reality runtime is set, trying to create a session returns XR_ERROR_RUNTIME_FAILURE.
If I switch to SteamVR as the OpenXR runtime creating the session works.
The really odd behavior here is that both my own code and the OpenXR Explorer get this runtime failure message, the Microsoft provided OpenXR Developer Tools for Windows Mixed Reality Demo Scene loads and play correctly.
I am cross posting this issue from: https://github.com/maluoi/openxr-explorer/issues/6
as I think this may be a better place to discuss the problem. Unless there is a Microsoft specific forum for discussing issues with their OpenXR runtime.
Our application is 64 bit, no API layers are enabled. Interestingly the hello_xr binaries from the sdk source do work. I will compare the hello_xr sample to our code and see if anything is significantly different.
You can also compare to this example, which is much simpler (straight line code) but only runs on Linux (the complexity in hello_xr comes from being cross-graphics-API) https://gitlab.freedesktop.org/monado/demos/openxr-simple-example/ You may be able to adapt it to run on Windows without too much trouble if you use something like glfw.
I integrated the Monado sample code into our engine and that gives the same error. What I have noticed is that both our engine and the OpenXR-Explorer have a very similar error which points to some kind of WinRT error. This is interesting as we have no WinRT code, so it must be something happening with the WMR OpenXR runtime.
OpenXR-Explorer gets the following error: Exception thrown at 0x00007FF8255D4F69 (KernelBase.dll) in openxr-explorer.exe: WinRT originate error - 0x80070005 : 'Access is denied.'.
While we get: Exception thrown at 0x00007FF8255D4F69 (KernelBase.dll) in umajin.exe: WinRT originate error - 0x80004002 : 'No such interface supported'.
The hello_xr sample has no such error and works correctly.
Given that the same code works with SteamVR and Oculus AirLink to a quest2 from the same machine this does look like a bug with the WMR OpenXR runtime. I have submitted and issue via the Feedback Hub, hopefully will hear something back.
Just for reference, one of my MS friends sent me this link as the preferred process for doing Feedback Hub for OpenXR on WinMR: Filing bugs and feedback - Enthusiast Guide | Microsoft Learn (I have bookmarked it with the rest of my public openxr links so I’ll have it ready next time it’s needed)
After realizing you need to compile and set environment vars for the api validation layers to actually show up I was hoping they would shed some light on the issue.
Unfortunately they show no issues, and I still get XR_ERROR_RUNTIME_FAILURE when calling xrCreateSession.
Suspiciously I had no validation issues, so I had to put some in to ensure the validation layer was actually working.
This is Matt from the OpenXR team with Microsoft. Sorry we did not see your message earlier.
I am unable to find your report in our system. Do you have a report ID that was provided after you submitted your feedback?
In all cases, could you follow the instructions on our GitHub page:
This will guide you through capturing a trace log. Once you have a trace log, please send me a direct message and we will arrange to transfer the trace so that my team can take a look ASAP.
For anyone else who comes across this in the future, updating the d3d_compiler47.dll file we ship with our application to the latest one from the Windows 10 SDK has resolved the issue.