Prevent Other Vive app from Closing Editor

It is a SteamVR Bug reported here: Bug report: closing SteamVR crashes or closes the UE4 editor :: SteamVR Developer Hardware General Discussions

And also reported here in UE4: [Bug][4.11] Closing SteamVR crashes the editor - XR Development - Epic Developer Community Forums

I’m looking to prevent other Vive VR apps from closing the editor or packaged game. In normal function launching another vive app will kill your editor. Does this require a source modification or do we have something exposed that prevents this from occuring?

see relevant for unity: Prevent Applications from Closing :: SteamVR Developer Hardware General Discussions

Edit:
Added a pull request to the engine here: https://github.com/EpicGames/UnrealEngine/pull/2641

This new IHeadMountedDisplay optional function LoadHMD(bool) solves the case of knowing when you launch the other app and preventing it from closing the editor/game.

Relevant; though it doesn’t crash anymore (seems the editor respects the FPlatformMisc::RequestExit) it still closes and this is not the desired behavior.

Exactly, btw the threads i posted are even for Crash/Close behavior. They happen either one, but one of those two for sure. To me, it just close :frowning:

After digging deeply through the source and trying a few things found something that worked for my purposes, but it requires source modification. Essentially you can unload the openvr module, launch the other app and return then reload the openvr link, it’s just a few lines of code. Will post a link to a repo for that one.

Edit link to commit that fixes it for the engine: https://github.com/getnamo/UnrealEngine/commit/d28f4fec5fe6b75b87b36fa8ff2ef8113a4fface and pull request: https://github.com/EpicGames/UnrealEngine/pull/2641

To have it so that any app won’t close your app, we’d need to intercept the RequestExit, ignore it and unload the module instead, then listen to openvr until it’s done with the app and reload the module. That is a bit more complicated of a workaround.

These links seem to be broken? I was looking for the same functionality so I could build a custom VR game launcher.

You need to have github access to the epic repository to see these links: Unreal Engine 4 on GitHub - Unreal Engine