From 4c41b1d8ac041834b37fbd956f646749ac4c0325 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 26 Aug 2016 15:56:47 -0400 Subject: MAINT-5011: Add top-level exception handlers in LLAppViewer::frame(). --- indra/newview/llappviewer.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 766c807169..0c758d73a1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1537,10 +1537,14 @@ bool LLAppViewer::frame() resumeMainloopTimeout(); pingMainloopTimeout("Main:End"); - } + } + } + catch (const LLContinueError&) + { + LOG_UNHANDLED_EXCEPTION(""); } catch(std::bad_alloc) - { + { LLMemory::logMemoryInfo(TRUE) ; //stop memory leaking simulation @@ -1548,7 +1552,7 @@ bool LLAppViewer::frame() LLFloaterReg::findTypedInstance("mem_leaking"); if(mem_leak_instance) { - mem_leak_instance->stop() ; + mem_leak_instance->stop() ; LL_WARNS() << "Bad memory allocation in LLAppViewer::frame()!" << LL_ENDL ; } else @@ -1559,6 +1563,10 @@ bool LLAppViewer::frame() LL_ERRS() << "Bad memory allocation in LLAppViewer::frame()!" << LL_ENDL ; } } + catch (...) + { + CRASH_ON_UNHANDLED_EXCEPTION(""); + } if (LLApp::isExiting()) { @@ -1572,7 +1580,7 @@ bool LLAppViewer::frame() catch(std::bad_alloc) { LL_WARNS() << "Bad memory allocation when saveFinalSnapshot() is called!" << LL_ENDL ; - + //stop memory leaking simulation LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::findTypedInstance("mem_leaking"); @@ -1581,12 +1589,16 @@ bool LLAppViewer::frame() mem_leak_instance->stop() ; } } + catch (...) + { + CRASH_ON_UNHANDLED_EXCEPTION("saveFinalSnapshot()"); + } } - + delete gServicePump; - + destroyMainloopTimeout(); - + LL_INFOS() << "Exiting main_loop" << LL_ENDL; } -- cgit v1.2.3