summaryrefslogtreecommitdiff
path: root/indra/llcommon/llapp.cpp
diff options
context:
space:
mode:
authorAura Linden <aura@lindenlab.com>2014-04-14 15:11:42 -0700
committerAura Linden <aura@lindenlab.com>2014-04-14 15:11:42 -0700
commite5dae42252432d5a6d4453a767b1c3a9508deb32 (patch)
treede9639a8cdd60895ca6a051f17ae7ba8beabee17 /indra/llcommon/llapp.cpp
parent7e966f28da79d2d24f93a2615c8807421300700c (diff)
Fix for MAINT-5707 bad breakpad behavior with teleport links
Diffstat (limited to 'indra/llcommon/llapp.cpp')
-rwxr-xr-xindra/llcommon/llapp.cpp70
1 files changed, 41 insertions, 29 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index 5c8fff051f..63a38f2884 100755
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -320,7 +320,7 @@ void EnableCrashingOnCrashes()
}
#endif
-void LLApp::setupErrorHandling()
+void LLApp::setupErrorHandling(bool second_instance)
{
// Error handling is done by starting up an error handling thread, which just sleeps and
// occasionally checks to see if the app is in an error state, and sees if it needs to be run.
@@ -337,40 +337,52 @@ void LLApp::setupErrorHandling()
// Install the Google Breakpad crash handler for Windows
if(mExceptionHandler == 0)
{
- llwarns << "adding breakpad exception handler" << llendl;
+ if ( second_instance ) //BUG-5707 Firing teleport from a web browser causes second
+ {
+ mExceptionHandler = new google_breakpad::ExceptionHandler(
+ L"C:\\Temp\\",
+ 0, //No filter
+ windows_post_minidump_callback,
+ 0,
+ google_breakpad::ExceptionHandler::HANDLER_ALL); //No custom client info.
+ }
+ else
+ {
+ llwarns << "adding breakpad exception handler" << llendl;
- std::wstring wpipe_name;
- wpipe_name = mCrashReportPipeStr + wstringize(getPid());
+ std::wstring wpipe_name;
+ wpipe_name = mCrashReportPipeStr + wstringize(getPid());
- const std::wstring wdump_path(wstringize(mDumpPath));
+ const std::wstring wdump_path(wstringize(mDumpPath));
- int retries = 30;
- for (; retries > 0; --retries)
- {
- if (mExceptionHandler != 0) delete mExceptionHandler;
-
- mExceptionHandler = new google_breakpad::ExceptionHandler(
- wdump_path,
- NULL, //No filter
- windows_post_minidump_callback,
- 0,
- google_breakpad::ExceptionHandler::HANDLER_ALL,
- MiniDumpNormal, //Generate a 'normal' minidump.
- wpipe_name.c_str(),
- NULL); //No custom client info.
- if (mExceptionHandler->IsOutOfProcess())
+ int retries = 30;
+ for (; retries > 0; --retries)
{
- LL_INFOS("CRASHREPORT") << "Successfully attached to Out of Process exception handler." << LL_ENDL;
- break;
- }
- else
- {
- LL_WARNS("CRASHREPORT") << "Unable to attach to Out of Process exception handler. " << retries << " retries remaining." << LL_ENDL;
- ::Sleep(100); //Wait a tick and try again.
+ if (mExceptionHandler != 0) delete mExceptionHandler;
+
+ mExceptionHandler = new google_breakpad::ExceptionHandler(
+ wdump_path,
+ NULL, //No filter
+ windows_post_minidump_callback,
+ 0,
+ google_breakpad::ExceptionHandler::HANDLER_ALL,
+ MiniDumpNormal, //Generate a 'normal' minidump.
+ wpipe_name.c_str(),
+ NULL); //No custom client info.
+ if (mExceptionHandler->IsOutOfProcess())
+ {
+ LL_INFOS("CRASHREPORT") << "Successfully attached to Out of Process exception handler." << LL_ENDL;
+ break;
+ }
+ else
+ {
+ LL_WARNS("CRASHREPORT") << "Unable to attach to Out of Process exception handler. " << retries << " retries remaining." << LL_ENDL;
+ ::Sleep(100); //Wait a tick and try again.
+ }
}
- }
- if (retries == 0) LL_WARNS("CRASHREPORT") << "Unable to attach to Out of Process exception handler." << LL_ENDL;
+ if (retries == 0) LL_WARNS("CRASHREPORT") << "Unable to attach to Out of Process exception handler." << LL_ENDL;
+ }
if (mExceptionHandler)
{