From 38a2765b10195db60231037c7af23705f522afe5 Mon Sep 17 00:00:00 2001 From: Vasily Date: Fri, 1 Mar 2019 21:52:12 +0100 Subject: [PATCH] Add proper exit to shutdown code The old shutdown code did not correctly exit but instead just continuously called the QApplication notify function until it SEGFAULTed. This led to crashes whenever SteamVR was shut down. Users with Windows Error Reporting turned on would get a 100+ MB crashdump file along with increased shutdown time for SteamVR. For clarity the shutdown functions should probably be collected in a single function. --- src/overlaycontroller.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/overlaycontroller.cpp b/src/overlaycontroller.cpp index 2b525b3..dc073e2 100644 --- a/src/overlaycontroller.cpp +++ b/src/overlaycontroller.cpp @@ -671,9 +671,11 @@ void OverlayController::mainEventLoop() m_chaperoneTabController.shutdown(); Shutdown(); QApplication::exit(); - return; + + LOG( INFO ) << "All systems exited."; + exit( EXIT_SUCCESS ); + // Does not fallthrough } - break; case vr::VREvent_DashboardActivated: {