summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-05-25 13:32:12 -0700
committerAndrew A. de Laix <alain@lindenlab.com>2010-05-25 13:32:12 -0700
commit5a52c5eb8a5cc4e1215911bac9121891dd802d45 (patch)
tree7f708f7589a2c166e42b797797867408cfc9793e /indra/newview
parent45a86b67518a579b166e1cf6a719d4aed4c35a39 (diff)
Mac crash behavior matches windows and linux: report on crash (not after restart). This is OK because we use Breakpad generated minidumps instead of OS generated ones.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp26
-rw-r--r--indra/newview/llappviewermacosx.cpp32
2 files changed, 4 insertions, 54 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index e9ec0b8b77..418b587321 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -102,6 +102,8 @@
// Third party library includes
#include <boost/bind.hpp>
+#include <google_breakpad/exception_handler.h>
+
#if LL_WINDOWS
# include <share.h> // For _SH_DENYWR in initMarkerFile
@@ -2281,17 +2283,7 @@ void LLAppViewer::checkForCrash(void)
{
#if LL_SEND_CRASH_REPORTS
- //*NOTE:Mani The current state of the crash handler has the MacOSX
- // sending all crash reports as freezes, in order to let
- // the MacOSX CrashRepoter generate stacks before spawning the
- // SL crash logger.
- // The Linux and Windows clients generate their own stacks and
- // spawn the SL crash logger immediately. This may change in the future.
-#if LL_DARWIN
- if(gLastExecEvent != LAST_EXEC_NORMAL)
-#else
if (gLastExecEvent == LAST_EXEC_FROZE)
-#endif
{
llinfos << "Last execution froze, requesting to send crash report." << llendl;
//
@@ -2552,9 +2544,6 @@ void LLAppViewer::handleViewerCrash()
return;
}
pApp->mReportedCrash = TRUE;
-
- // Make sure the watchdog gets turned off...
-// pApp->destroyMainloopTimeout(); // SJB: Bah. This causes the crash handler to hang, not sure why.
//We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version
//to check against no matter what
@@ -2665,10 +2654,6 @@ void LLAppViewer::handleViewerCrash()
LLError::logToFile("");
-// On Mac, we send the report on the next run, since we need macs crash report
-// for a stack trace, so we have to let it the app fail.
-#if !LL_DARWIN
-
// Remove the marker file, since otherwise we'll spawn a process that'll keep it locked
if(gDebugInfo["LastExecEvent"].asInteger() == LAST_EXEC_LOGOUT_CRASH)
{
@@ -2681,8 +2666,6 @@ void LLAppViewer::handleViewerCrash()
// Call to pure virtual, handled by platform specific llappviewer instance.
pApp->handleCrashReporting();
-
-#endif //!LL_DARWIN
return;
}
@@ -3287,9 +3270,6 @@ void LLAppViewer::badNetworkHandler()
mPurgeOnExit = TRUE;
- LLAppViewer::handleSyncViewerCrash();
- LLAppViewer::handleViewerCrash();
-
std::ostringstream message;
message <<
"The viewer has detected mangled network data indicative\n"
@@ -3302,6 +3282,8 @@ void LLAppViewer::badNetworkHandler()
"If the problem continues, see the Tech Support FAQ at: \n"
"www.secondlife.com/support";
forceDisconnect(message.str());
+
+ LLApp::instance()->getExceptionHandler()->WriteMinidump();
}
// This routine may get called more than once during the shutdown process.
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 0b5f18c330..2f12ad7e38 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -384,38 +384,6 @@ void LLAppViewerMacOSX::handleCrashReporting(bool reportFreeze)
}
}
-
- if(!reportFreeze)
- {
- _exit(1);
- }
-
- // TODO from palmer: Find a better way to handle managing old crash logs
- // when this is a separate imbedable module. Ideally just sort crash stack
- // logs based on date, and grab the latest one as opposed to deleting them
- // for thoughts on what the module would look like.
- // See: https://wiki.lindenlab.com/wiki/Viewer_Crash_Reporter_Round_4
-
- // Remove the crash stack log from previous executions.
- // Since we've started logging a new instance of the app, we can assume
- // The old crash stack is invalid for the next crash report.
- char path[MAX_PATH];
- FSRef folder;
- if(FSFindFolder(kUserDomain, kLogsFolderType, false, &folder) == noErr)
- {
- // folder is an FSRef to ~/Library/Logs/
- if(FSRefMakePath(&folder, (UInt8*)&path, sizeof(path)) == noErr)
- {
- std::string pathname = std::string(path) + std::string("/CrashReporter/");
- std::string mask = "Second Life*";
- std::string file_name;
- while(gDirUtilp->getNextFileInDir(pathname, mask, file_name, false))
- {
- LLFile::remove(pathname + file_name);
- }
- }
- }
-
}
std::string LLAppViewerMacOSX::generateSerialNumber()