cancel
Showing results for 
Search instead for 
Did you mean: 

VR won't load. X Plane 11 - Rift S

1960Steve
Explorer
Click VR and it begins loading. Load screen reappears and then does nothing. Click DONE and the X11 crashes.

i5  32gig RAM  1080 card 
61 REPLIES 61

vaskins
Honored Guest
Same issue here. CV1 with Windows 7

Worked just fine before, new update is forced and installed (V17), all of a sudden, no more VR in Xplane 11. 

Please release a patch for this Oculus. 

SWA4420
Honored Guest
Problem still exists even after an update this afternoon....XP11.41 cannot start VR....c'mon Oculus!  FIX THIS, PLEASE!

1960Steve
Explorer
Ran Oculus repair and it now works. 

TomCgcmfc
MVP
MVP

1960Steve said:

Ran Oculus repair and it now works. 


Did the repair take you back to v16?  Thanks.
i9 13900K water cooled, RTX4090, Z790 MB w/wifi6e, 32Gb 6400 ram, 2x2TB SSD, 1000W PSU, Win 11, QPro, Q3, w/Link and Air Link, Vive Pro1 with Etsy lens mod and Index Controllers

kojack
MVP
MVP
I thought I'd take a look at what X-Plane is doing with the Oculus sdk using my Oculus Injector. Umm, why is X-Plane loading the Oculus runtime library 375 times in a row before I've even ticked the "Enable VR" button?
I'm going to have to change my hooking system to avoid maxing out hooks, no other vr game I've tested does this.
Edit: while writing this it's already reached 3455 calls to load the oculus library. Is it just reloading the library every frame?

Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2

TomCgcmfc
MVP
MVP

kojack said:

I thought I'd take a look at what X-Plane is doing with the Oculus sdk using my Oculus Injector. Umm, why is X-Plane loading the Oculus runtime library 375 times in a row before I've even ticked the "Enable VR" button?
I'm going to have to change my hooking system to avoid maxing out hooks, no other vr game I've tested does this.
Edit: while writing this it's already reached 3455 calls to load the oculus library. Is it just reloading the library every frame?



Where are you looking to see this?  Nothing obvious in my xp11 log files. If there is anything you can sent to Laminar support to help them sort this out that would be great.  Thanks mate and cheers.
i9 13900K water cooled, RTX4090, Z790 MB w/wifi6e, 32Gb 6400 ram, 2x2TB SSD, 1000W PSU, Win 11, QPro, Q3, w/Link and Air Link, Vive Pro1 with Etsy lens mod and Index Controllers

kojack
MVP
MVP
The Oculus Injector that I mentioned above is my project that injects code into the Oculus SDK allowing me to intercept any call made by a game, modify what it does or log out what it's parameters and result were. It's what I've been using to do things like trick Beat Saber into thinking my DK2 has Touch controllers (but they are really xbox thumbsticks). 🙂

So far what I'm seeing:

During the VR panel settings screen (with Enable VR turned off) X-Plane loads the Oculus runtime library, calls ovr_Initialize (asking for runtime 1.23), then 0.008s later it calls ovr_Shutdown. It repeats this pattern 25 times per second.

Repeatedly initializing and shutting down the oculus sdk 25 times a second is not normal behaviour for a VR app. Also maybe they should update their oculus sdk, they are requesting a runtime from 2 years ago. That shouldn't hurt, I don't think the application binary interface has changed between then and now, but if it had...

I need to add some more logging to see if they are doing anything else between the initialize and shutdown. (I can't tell why they do anything, all I can see is what they are telling the sdk to do, and I need to manually write code for each function I want to check).

Interesting side note: Audica and Pistol Whip both use runtime 1.37. Beat Saber uses 1.45. All three do the same procedure (they are all Unity apps): initialize the sdk in invisible mode (has full access but no rendering, what I use for Auto Oculus Touch), shut it down a fraction of a second later, then initialize again in focus aware mode for the actual game. I'm guessing the first invisible call is to check connected hardware or something.

Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2

kojack
MVP
MVP
A little update.
I ended up writing a Ruby program to procedurally generate C++ injection code. Yay, much easier now. There's 75 functions in the SDK, I've got 14 intercepted now. 🙂
(Still takes effort to add each function and more to do something custom with each one, but it's much easier than before)

It looks like after about 37  init / shutdown cycles X-Plane does an initialize with focus aware. It then creates a session, checks the session status a few times, destroys the session, then goes back to the init/shutdown loop for the rest of it's lifetime.
Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2

kojack
MVP
MVP
I've hooked into a LOT of sdk functions now (almost every one, I just left out some like guardian boundary querying and haptics for now).

Ok, some progress.
When I enter X-Plane everything is fine. I click on Settings and it goes to the VR device page with the VR checkbox off. That's when it starts spamming initialise/shutdown.
When I click to enable VR mode, that's when it does a create session.
It then does 3 calls to ovr_CreateTextureSwapChainGL. But the third one fails with an error of "wglDXRegisterObjectNV failed".
It then calls ovr_CommitTextureSwapChain 3 times, the second time fails with the error of "Null chain pointer provided."
Next it sets up tracking origin style and waits for the next frame to start (using ovr_WaitToBeginFrame).
It does a ovr_BeginFrame, then a couple of misc calls.
Then an ovr_EndFrame, which fails with "NULL texture provided to ovrLayerType_Cube. Disabling layer 0"
Next it checks for inputs and waits for another frame.
It tries to do the ovr_BeginFrame again, but it now fails with "BeginFrame called before EndFrame." because the previous ovr_EndFrame failed.
Then it tries ovr_EndFrame again, which now fails with "EndFrame called with different frameIndex from BeginFrame."
It was about to try a third time, but it crashed at that point.


So long story short, X-Plane is trying to create 3 textures for the swap chains, but 1 failed for some reason. It doesn't validate it, just tries to use the broken texture, which breaks the EndFrame (which submits the frame to the runtime for distortion and display). That then breaks the requirement of matching begin/end pairs and it all falls apart.

Next I'm going to get it to tell me more details about the textures it's trying to make.

Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2

kojack
MVP
MVP
The ovr_CommitTextureSwapChain that is failing is trying to use type ovrTexture_Cube (to make a 512x512x6 cube map), but the SDK header says "Must be ovrTexture_2D". I don't know if that is still a valid requirement.

Anyway, turns out if I go into the graphics settings and turn on Vulkan mode, it runs fine. I'm in X-Plane 11.50b9 with Oculus v17. It's only the OpenGL path that is failing, the Vulkan path seems ok (and is supposed to give better performance anyway).


Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2