cancel
Showing results for 
Search instead for 
Did you mean: 

xrCreateInstance blocks for 10 seconds inside LibOVRRT64

cubeleo
Level 2

I'm on Windows 10 with released v38 Oculus Desktop software, and a Quest 2 with v38, running over AirLink.  I'm working on switching to openxr from the proprietary API, and building up a simple "hello" app to get the hang of it before doing a full integration into my codebase.  I quickly noticed that every time my app starts up, it spends a very long (10 second) time inside xrCreateInstance.  I'm using the Khronos OpenXR-SDK loader.  I debugged inside xrCreateInstance, and the time is all spent inside a call to the _get_instance_proc_addr() function pointer, which points to a location inside LibOVRRT64.

 

I work very hard to make my application load quickly, and I don't want to take a 10 second hit just trying to initialize openxr.  I don't see anything like this with the proprietary API.  What could be causing this?  Is it because I have Steam installed on my PC?  Is it some option I need to pass to xrCreateInstance to skip some sort of check that takes 10 seconds?

 

Specifically, the line of code about 5 calls deep into xrCreateInstance is:

_get_instance_proc_addr(XR_NULL_HANDLE, "xrEnumerateInstanceExtensionProperties",
reinterpret_cast<PFN_xrVoidFunction*>(&rt_xrEnumerateInstanceExtensionProperties));

 

Any help with this issue is greatly appreciated.  I'd like to get off of the deprecated API as soon as possible, but a 10 second startup penalty is unacceptable.  Thanks,

 

Aaron Dwyer

 

7 REPLIES 7

cubeleo
Level 2

Since posting this, I disconnected and reconnected AirLink, and now it stopped doing this.  Very strange since it reliably happened every time I ran for at least 20 debug sessions.  I'll update if I see it again.

cubeleo
Level 2

The 10 seconds in xrCreateInstance is happening again.  Things worked for many more code-compile-run-quit cycles, then AirLink disconnected due to sitting idle for a bit, and after reconnecting it, the problem started again.  A disconnect and reconnect of AirLink fixed it.

johnkearney
Oculus Staff

@cubeleo Thanks for the report. This is surprising. Could you give me the list of extensions that you are passing to `xrCreateInstance` so I can try to replicate?

Hi John,

 

Thanks for the response, and yep!  I'm just passing XR_KHR_OPENGL_ENABLE_EXTENSION_NAME.  I haven't seen the issue again since that last post and several AirLink disconnect/reconnect cycles.

cubeleo
Level 2

This continues to happen intermittently.  Any other information I can collect for you?

johnkearney
Oculus Staff

@cubeleo I haven't been able to replicate this issue myself - and I'm not exactly clear what information you could collect for me as really we need to know where it is freezing. I'm going to add some extra logging in Oculus PC release v41 to try to narrow this down. One question to try to help me with this:when you see this issue do you see a black screen on your headset or do you see Oculus PC dash onscreen?

I will say that Oculus PC SDK (CAPI) and OpenXR follow essentially identical code paths in this area (if you are just passing `XR_KHR_opengl_enable` so I expect that you may see the same issues using CAPI as you do with OpenXR when this issue pops up.

Thanks,
John

Hi John, I'll look to see if it's black screen or dash.  I'll check to see if it happens with pure Oculus PC SDK API as well.  This bug seems to come around every few days or so and then stay for a while, so next time it happens I'll respond.  Thanks!