SteamVR-for-Linux icon indicating copy to clipboard operation
SteamVR-for-Linux copied to clipboard

[BUG] OpenXR app killed on user exit

Open amalon opened this issue 4 years ago • 0 comments

Describe the bug An OpenXR application can be exited from the VR interface or by steamvr closing / restarting, which triggers the exiting session state, however even if the app destroys the session, it doesn't give the app the opportunity to switch to a non-VR experience, instead killing it after a few seconds. This makes it impossible for the app to restart the VR session later (perhaps after a SteamVR restart) without having to be fully restarted itself, which is potentially time consuming and could lose progress & settings due to the abruptness of SIGKILL.

I did wonder whether it expects the app to destroy the instance (in addition to the session), but due to issue #422 I can't actually try this without the app hanging and getting killed anyway. That would seem wrong, but perhaps somebody can clarify?

To Reproduce Steps to reproduce the behavior:

  1. Start an app that responds to the session stopping state (with xrEndSession) and session exiting state (with xrDestroySession).
  2. Trigger a user exit. there are several ways: 2.1. in steamVR bring up the menu, and start another app, or go to exit that app from the bottom left menu. 2.2. exit steamvr 2.3. change a setting that requires a restart of steamvr and restart steamvr 2.4. wait long enough and steamvr will probably crash and need a restart anyway ;-)
  3. The OpenXR session is transitioned through visible, synchronised, stopping (app should end session), idle, and exiting states (app should destroy the session).
  4. After a few seconds the app is killed, presumably with SIGKILL.

Expected behavior If the app has cleanly ended its OpenXR session, the OpenXR runtime should leave it be so it can switch to a non-VR experience and the user can initiate VR experience again later.

System Information (please complete the following information):

  • Distribution: Arch
  • SteamVR version: 1.19.7
  • Steam client version: Aug 11 2021, 17:14:33
  • Opted into Steam client beta?: Yes
  • Graphics driver version: nvidia 470.63.01
  • Gist for SteamVR System Information: omitted (it looks like intentional behaviour of SteamVR that I am in disagreement with, so it is unlikely to be helpful IMO)

amalon avatar Aug 19 '21 15:08 amalon