From 4e058840afe5a5df1216cd84989fb275416c86e0 Mon Sep 17 00:00:00 2001 From: Tonya Souther Date: Tue, 30 Jul 2013 23:07:49 -0500 Subject: [PATCH] Fix crash on logout running out of memory when generating the shutdown snapshot. --- indra/newview/llviewerdisplay.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 3c28b8ef80..cc80fa4c58 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -281,9 +281,13 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) return; } + // Don't fiddle with for_snapshot: causes crashes at shutdown + // if rendering the UI runs out of memory + gSnapshot = for_snapshot; if (LLPipeline::sRenderDeferred) { //hack to make sky show up in deferred snapshots - for_snapshot = FALSE; + //for_snapshot = FALSE; + gSnapshot = FALSE; } if (LLPipeline::sRenderFrameTest) @@ -291,7 +295,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) send_agent_pause(); } - gSnapshot = for_snapshot; + // See fix above + //gSnapshot = for_snapshot; LLGLSDefault gls_default; LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE, GL_LEQUAL); @@ -796,7 +801,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); - if (!for_snapshot) + // Shutdown crash fix + //if (!for_snapshot) + if (!gSnapshot) { if (gFrameCount > 1) { //for some reason, ATI 4800 series will error out if you @@ -1116,6 +1123,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLPipeline::sUnderWaterRender = FALSE; LLAppViewer::instance()->pingMainloopTimeout("Display:RenderUI"); + // Shutdown crash fix: don't render the UI if not + // actually called for if (!for_snapshot) { LLFastTimer t(FTM_RENDER_UI);