Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
9 years ago

Best way to handle ovrError_DisplayLost ? ( PC SDK 1.6 )

Hi,
ok this is the story, you do all the stuff, all works, you call ovrResult result = ovr_SubmitFrame(ovr_session, frameIndex, nullptr, &layers, 1); and you get the above : ovrError_DisplayLost

Now documentation ( Oculus Ridt | VR Focus Management ) page 36 basically says to destroy the mirrorTexture ( if used ), pEyeRenderTexture[], pEyeDepthBuffer[], call ovr_destroy ( session ) and then basically continue to poll OvrSessionStatus until HmdPresent is TRUE.

At that point you can re-create the above mentioned things, suppose also set frameIndex to 0 and continue to where you left ..

Except that it does not seems to work, doing exactly like that does not crash but you end up with a black screen, it's like "something else" is still missing.
 
Watching the code sample at page 39 it seems to also say that you should destroy the WHOLE ( DX11 ) graphics device and re-create everything , which is "kinda" like to say "restart the whole program from 0" which to me is "a bit extreme" because it means literally "disintegrate" all the graphic context/buffers/etc.

Now honestly I don't understand why simply trying to do what explained at page 36  "Managing an Unplugged Headset" does not work , I can't see a true reason why you should completely destroy the DX11 device.

Is any way to avoid that or there's really no way ? Any idea what I should look into about "ok why I am getting a blank screen" ?

Ah note, I am using a DK2 with SDK 1.6 on a PC windows running Windows 10.

Must be said I tried to see "what happens in the samples" that seems to do what the steps say you should do, all of them CRASH, they don't even go blank, they miserably crash so they are no help to me to see "what I should do".

Thanks in advance for any help.

Cheers.







2 Replies

  • Anonymous's avatar
    Anonymous
    Hi,
    yesterday I did a test with DK2 and some of the SW that is already out, like Lucky's Tale and that Apollo simulator.

    None of which seems to "respond nicely" to the test of "switch off the DK2 while you are playing", they both basically crash leaving an unresponsive DK2.

    At this point I wonder if I should just forget it, it's maybe a DK2 problem (?) and does not happen with CV1 ?

    Unfortunately I don't know as at the moment I don't have a CV1 yet.

    Cheers.

  • Anonymous's avatar
    Anonymous
    Hi,
    turns out after I gave the code to some people to test it "it works and recover" with CV1.

    You don't really need IMHO to completely destroy the whole DX11 device, it's sufficient you destroy the session and the various textures/buffer, poll for when the HMD is on again then re-create session and texture again.

    People telling me they literally yanked the cable out, all pauses, they put the cable back in and the game continued as normal.

    So I guess what I am seeing here is probably a just DK2 related problem, not a CV1 problem.

    Cheers.