ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.09k stars 1.28k forks source link

Issue when background application closes and tries to re-initialize. #1247

Open ColbyMor opened 4 years ago

ColbyMor commented 4 years ago

Since updating to the latest steam VR we are having issues initializing the CVRSystem.

We have a c# application that manages steam VR, for our enterprise VR locations. It launches and tracks steam status as well as handles aligning the room.

It will close Steam VR and re-open. We check and poll for the quit event vrSystem.AcknowledgeQuit_Exiting(); OpenVR.Shutdown(); vrSystem = null; Which works to close Steam VR with out crashing the program.

Since updating to the latest Steam VR 1.8+ we have an issue where when we try to reinitialize the CVRSystem after closing steam VR, we get the init error Init_NoServerForBackgroundApp every time we try to initialize.

        EVRInitError initError = EVRInitError.None;
        vrSystem = OpenVR.Init(ref initError, EVRApplicationType.VRApplication_Background);

If we keep steam running and just restart our application it connects successfully. Seems like there is some OpenVR reference that is not properly disposing.

Thank you!

BenWoodford commented 2 weeks ago

Hey did you ever solve this one? Having the same issue