From ca0aeb8e6280fe1a64006474806ea81ac2313f43 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Sun, 6 Sep 2015 20:18:32 +0100 Subject: [PATCH] Windows: Avoid lockup for RuntimeError exception This is the same problem that the Plugin Open and BIOS load exceptions had - The message box pops up, intercepts the hide event for GSFrame and leaves you with no alternative but to terminate PCSX2 via the Task Manager. The same solution applies - Close the GSFrame first. --- pcsx2/gui/AppMain.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pcsx2/gui/AppMain.cpp b/pcsx2/gui/AppMain.cpp index c1c8f0709c..81d1d24a18 100644 --- a/pcsx2/gui/AppMain.cpp +++ b/pcsx2/gui/AppMain.cpp @@ -739,8 +739,15 @@ void Pcsx2App::HandleEvent(wxEvtHandler* handler, wxEventFunction func, wxEvent& // Runtime errors which have been unhandled should still be safe to recover from, // so lets issue a message to the user and then continue the message pump. + // Test case (Windows only, Linux has an uncaught exception for some + // reason): Run PSX ISO using fast boot + if (GSFrame* gsframe = wxGetApp().GetGsFramePtr()) + gsframe->Close(); + Console.Error( ex.FormatDiagnosticMessage() ); - Msgbox::Alert( ex.FormatDisplayMessage() ); + // I should probably figure out how to have the error message as well. + if (wxGetApp().HasGUI()) + Msgbox::Alert( ex.FormatDisplayMessage() ); } }