summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-05-06 23:26:24 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-05-06 23:26:24 +0300
commitffbbc30d1a2978066e13e21d6de9dbc7e0f00276 (patch)
tree228eb4649e3f9cc77e1683a45f5970b86e6acc75
parent8e91c90ca3ea00ea992783be61263553573e221b (diff)
parentf47b0b146e122b0d93ba6d1d05ca6490c20d07e2 (diff)
Merged in lindenlab/viewer-lynx
-rwxr-xr-xautobuild.xml28
-rwxr-xr-xindra/llcommon/llapp.cpp6
-rwxr-xr-xindra/llcrashlogger/llcrashlogger.cpp242
-rwxr-xr-xindra/llcrashlogger/llcrashlogger.h5
-rwxr-xr-xindra/mac_crash_logger/llcrashloggermac.cpp9
-rwxr-xr-xindra/mac_crash_logger/mac_crash_logger.cpp6
-rwxr-xr-xindra/newview/CMakeLists.txt5
-rwxr-xr-xindra/newview/llappviewer.cpp18
-rwxr-xr-xindra/newview/llappviewermacosx.cpp5
-rwxr-xr-xindra/newview/llmaniprotate.cpp3
-rw-r--r--indra/win_crash_logger/llcrashloggerwindows.cpp16
11 files changed, 163 insertions, 180 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 6c29d5cb18..072dfa678a 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1528,11 +1528,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>468e88a527e610804c3eecf07f4ed70b</string>
+ <string>01a7cc9d0e56238a9abedd7a41ccd0a3</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions-source_llphysicsextensions-update/rev/298369/arch/Darwin/installer/llphysicsextensions_source-1.0.298369-darwin-298369.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions/rev/313564/arch/Darwin/installer/llphysicsextensions_source-1.0.313564-darwin-313564.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1542,9 +1542,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>793964e49c935b414c4bdbb8a0d14ad1</string>
+ <string>c94dc7ab6efe59c0d5d04fc447257c57</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions-source_llphysicsextensions-update/rev/298369/arch/Linux/installer/llphysicsextensions_source-1.0.298369-linux-298369.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions/rev/313564/arch/Linux/installer/llphysicsextensions_source-1.0.313564-linux-313564.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@@ -1554,16 +1554,16 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>922aad5261aac150e5ce3c094e57f373</string>
+ <string>e760be34addeb0cd6e2ec43394834bac</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions-source_llphysicsextensions-update/rev/298369/arch/CYGWIN/installer/llphysicsextensions_source-1.0.298369-windows-298369.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions/rev/313564/arch/CYGWIN/installer/llphysicsextensions_source-1.0.313564-windows-313564.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
<key>version</key>
- <string>1.0.298369</string>
+ <string>1.0.313564</string>
</map>
<key>llphysicsextensions_stub</key>
<map>
@@ -1582,11 +1582,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>1175977a191ffc936fd0ccca433c8278</string>
+ <string>c8c6e5867d1ead7ad452a3359b22cf44</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions-stub_llphysicsextensions-update/rev/298370/arch/Darwin/installer/llphysicsextensions_stub-1.0.298370-darwin-298370.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions/rev/313563/arch/Darwin/installer/llphysicsextensions_stub-1.0.313563-darwin-313563.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1596,9 +1596,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>d13d7927692eab2d6a63e36166b72a8a</string>
+ <string>e99afb25a4fd5b08c5cd3060ae9c1d59</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions-stub_llphysicsextensions-update/rev/298370/arch/Linux/installer/llphysicsextensions_stub-1.0.298370-linux-298370.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions/rev/313563/arch/Linux/installer/llphysicsextensions_stub-1.0.313563-linux-313563.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@@ -1608,16 +1608,16 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>9594f6fd79ee924fe675a4a23e30516e</string>
+ <string>6f4307a35c692e44b872125d7932df8e</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions-stub_llphysicsextensions-update/rev/298370/arch/CYGWIN/installer/llphysicsextensions_stub-1.0.298370-windows-298370.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions/rev/313563/arch/CYGWIN/installer/llphysicsextensions_stub-1.0.313563-windows-313563.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
<key>version</key>
- <string>1.0.298370</string>
+ <string>1.0.313563</string>
</map>
<key>mesa</key>
<map>
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index 5a40845e7d..eb0699ad41 100755
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -929,7 +929,7 @@ bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_
strncpy(path, minidump_desc.path(), remaining);
- LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
+ LL_INFOS("CRASHREPORT") << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
LLApp::runErrorHandler();
#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -975,7 +975,7 @@ bool unix_post_minidump_callback(const char *dump_dir,
strncpy(path, ".dmp", remaining);
}
- LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
+ LL_INFOS("CRASHREPORT") << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
LLApp::runErrorHandler();
#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -1019,7 +1019,7 @@ bool windows_post_minidump_callback(const wchar_t* dump_path,
strncpy(path, ".dmp", remaining);
}
- LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
+ LL_INFOS("CRASHREPORT") << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
// *NOTE:Mani - this code is stolen from LLApp, where its never actually used.
//OSMessageBox("Attach Debugger Now", "Error", OSMB_OK);
// *TODO: Translate the signals/exceptions into cross-platform stuff
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index 3e08fb4cf3..69a806bbea 100755
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -40,7 +40,6 @@
#include "lldir.h"
#include "llfile.h"
#include "llsdserialize.h"
-#include "llsdserialize.h"
#include "llproxy.h"
#include "llcorehttputil.h"
#include "llhttpsdhandler.h"
@@ -73,12 +72,15 @@ protected:
void LLCrashLoggerHandler::onSuccess(LLCore::HttpResponse * response, const LLSD &content)
{
+ LL_DEBUGS("CRASHREPORT") << "Request to " << response->getRequestURL() << "succeeded" << LL_ENDL;
gBreak = true;
gSent = true;
}
void LLCrashLoggerHandler::onFailure(LLCore::HttpResponse * response, LLCore::HttpStatus status)
{
+ LL_WARNS("CRASHREPORT") << "Request to " << response->getRequestURL()
+ << " failed: " << status.toString() << LL_ENDL;
gBreak = true;
}
@@ -150,18 +152,22 @@ std::string getStartupStateFromLog(std::string& sllog)
return startup_state;
}
-bool LLCrashLogger::readDebugFromXML(LLSD& dest, const std::string& filename )
+bool LLCrashLogger::readFromXML(LLSD& dest, const std::string& filename )
{
std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename);
- std::ifstream debug_log_file(db_file_name.c_str());
+ std::ifstream log_file(db_file_name.c_str());
- // Look for it in the debug_info.log file
- if (debug_log_file.is_open())
+ // Look for it in the given file
+ if (log_file.is_open())
{
- LLSDSerialize::fromXML(dest, debug_log_file);
- debug_log_file.close();
+ LLSDSerialize::fromXML(dest, log_file);
+ log_file.close();
return true;
}
+ else
+ {
+ LL_WARNS("CRASHREPORT") << "Failed to open " << db_file_name << LL_ENDL;
+ }
return false;
}
@@ -194,6 +200,11 @@ bool LLCrashLogger::readMinidump(std::string minidump_path)
mCrashInfo["Minidump"] = data;
}
+ else
+ {
+ LL_WARNS("CRASHREPORT") << "failed to open minidump "<<minidump_path<<LL_ENDL;
+ }
+
return (length>0?true:false);
}
@@ -203,9 +214,16 @@ void LLCrashLogger::gatherFiles()
LLSD static_sd;
LLSD dynamic_sd;
+ //if we ever want to change the endpoint we send crashes to
+ //we can construct a file download ( a la feature table filename for example)
+ //containing the new endpoint
+ LLSD endpoint;
+ std::string grid;
+ std::string fqdn;
- bool has_logs = readDebugFromXML( static_sd, "static_debug_info.log" );
- has_logs |= readDebugFromXML( dynamic_sd, "dynamic_debug_info.log" );
+ bool has_logs = readFromXML( static_sd, "static_debug_info.log" );
+ has_logs |= readFromXML( dynamic_sd, "dynamic_debug_info.log" );
+
if ( has_logs )
{
@@ -215,6 +233,7 @@ void LLCrashLogger::gatherFiles()
mFileMap["SecondLifeLog"] = mDebugLog["SLLog"].asString();
mFileMap["SettingsXml"] = mDebugLog["SettingsFilename"].asString();
+ mFileMap["CrashHostUrl"] = loadCrashURLSetting();
if(mDebugLog.has("CAFilename"))
{
LLCore::HttpRequest::setStaticPolicyOption(LLCore::HttpRequest::PO_CA_FILE,
@@ -226,8 +245,8 @@ void LLCrashLogger::gatherFiles()
LLCore::HttpRequest::GLOBAL_POLICY_ID, gDirUtilp->getCAFile(), NULL);
}
- LL_INFOS() << "Using log file from debug log " << mFileMap["SecondLifeLog"] << LL_ENDL;
- LL_INFOS() << "Using settings file from debug log " << mFileMap["SettingsXml"] << LL_ENDL;
+ LL_INFOS("CRASHREPORT") << "Using log file from debug log " << mFileMap["SecondLifeLog"] << LL_ENDL;
+ LL_INFOS("CRASHREPORT") << "Using settings file from debug log " << mFileMap["SettingsXml"] << LL_ENDL;
}
else
{
@@ -246,31 +265,14 @@ void LLCrashLogger::gatherFiles()
gatherPlatformSpecificFiles();
- //Use the debug log to reconstruct the URL to send the crash report to
- if(mDebugLog.has("CrashHostUrl"))
- {
- // Crash log receiver has been manually configured.
- mCrashHost = mDebugLog["CrashHostUrl"].asString();
- }
- else if(mDebugLog.has("CurrentSimHost"))
- {
- mCrashHost = "https://";
- mCrashHost += mDebugLog["CurrentSimHost"].asString();
- mCrashHost += ":12043/crash/report";
- }
- else if(mDebugLog.has("GridName"))
- {
- // This is a 'little' hacky, but its the best simple solution.
- std::string grid_host = mDebugLog["GridName"].asString();
- LLStringUtil::toLower(grid_host);
- mCrashHost = "https://login.";
- mCrashHost += grid_host;
- mCrashHost += ".lindenlab.com:12043/crash/report";
- }
+ if ( has_logs && (mFileMap["CrashHostUrl"] != "") )
+ {
+ mCrashHost = mFileMap["CrashHostUrl"];
+ }
- // Use login servers as the alternate, since they are already load balanced and have a known name
- mAltCrashHost = "https://login.agni.lindenlab.com:12043/crash/report";
+ //default to agni, per product
+ mAltCrashHost = "http://viewercrashreport.agni.lindenlab.com/cgi-bin/viewercrashreceiver.py";
mCrashInfo["DebugLog"] = mDebugLog;
mFileMap["StatsLog"] = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"stats.log");
@@ -279,26 +281,37 @@ void LLCrashLogger::gatherFiles()
for(std::map<std::string, std::string>::iterator itr = mFileMap.begin(); itr != mFileMap.end(); ++itr)
{
- std::ifstream f((*itr).second.c_str());
- if(!f.is_open())
- {
- LL_INFOS("CRASHREPORT") << "Can't find file " << (*itr).second << LL_ENDL;
- continue;
- }
- std::stringstream s;
- s << f.rdbuf();
+ std::string file = (*itr).second;
+ if (!file.empty())
+ {
+ LL_DEBUGS("CRASHREPORT") << "trying to read " << itr->first << ": " << file << LL_ENDL;
+ std::ifstream f(file.c_str());
+ if(f.is_open())
+ {
+ std::stringstream s;
+ s << f.rdbuf();
- std::string crash_info = s.str();
- if(itr->first == "SecondLifeLog")
- {
- if(!mCrashInfo["DebugLog"].has("StartupState"))
- {
- mCrashInfo["DebugLog"]["StartupState"] = getStartupStateFromLog(crash_info);
- }
- trimSLLog(crash_info);
- }
+ std::string crash_info = s.str();
+ if(itr->first == "SecondLifeLog")
+ {
+ if(!mCrashInfo["DebugLog"].has("StartupState"))
+ {
+ mCrashInfo["DebugLog"]["StartupState"] = getStartupStateFromLog(crash_info);
+ }
+ trimSLLog(crash_info);
+ }
- mCrashInfo[(*itr).first] = LLStringFn::strip_invalid_xml(rawstr_to_utf8(crash_info));
+ mCrashInfo[(*itr).first] = LLStringFn::strip_invalid_xml(rawstr_to_utf8(crash_info));
+ }
+ else
+ {
+ LL_WARNS("CRASHREPORT") << "Failed to open file " << file << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_DEBUGS("CRASHREPORT") << "empty file in list for " << itr->first << LL_ENDL;
+ }
}
std::string minidump_path;
@@ -308,20 +321,21 @@ void LLCrashLogger::gatherFiles()
if (has_minidump)
{
minidump_path = mDebugLog["MinidumpPath"].asString();
- }
-
- if (has_minidump)
- {
has_minidump = readMinidump(minidump_path);
}
+ else
+ {
+ LL_WARNS("CRASHREPORT") << "DebugLog does not have MinidumpPath" << LL_ENDL;
+ }
if (!has_minidump) //Viewer was probably so hosed it couldn't write remaining data. Try brute force.
{
- //Look for a filename at least 30 characters long in the dump dir which contains the characters MDMP as the first 4 characters in the file.
+ //Look for a filename at least 30 characters long in the dump dir which contains the characters MDMP as the first 4 characters in the file.
typedef std::vector<std::string> vec;
std::string pathname = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"");
+ LL_WARNS("CRASHREPORT") << "Searching for minidump in " << pathname << LL_ENDL;
vec file_vec = gDirUtilp->getFilesInDir(pathname);
- for(vec::const_iterator iter=file_vec.begin(); iter!=file_vec.end(); ++iter)
+ for(vec::const_iterator iter=file_vec.begin(); !has_minidump && iter!=file_vec.end(); ++iter)
{
if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) )
{
@@ -337,15 +351,27 @@ void LLCrashLogger::gatherFiles()
minidump_path = *iter;
has_minidump = readMinidump(fullname);
mDebugLog["MinidumpPath"] = fullname;
- if (has_minidump)
- {
- break;
- }
+ }
+ else
+ {
+ LL_DEBUGS("CRASHREPORT") << "MDMP not found in " << fullname << LL_ENDL;
}
}
+ else
+ {
+ LL_DEBUGS("CRASHREPORT") << "failed to open " << fullname << LL_ENDL;
+ }
}
+ else
+ {
+ LL_DEBUGS("CRASHREPORT") << "Name does not match minidump name pattern " << *iter << LL_ENDL;
+ }
}
}
+ else
+ {
+ LL_WARNS("CRASHREPORT") << "readMinidump returned no minidump" << LL_ENDL;
+ }
}
LLSD LLCrashLogger::constructPostData()
@@ -355,8 +381,9 @@ LLSD LLCrashLogger::constructPostData()
const char* const CRASH_SETTINGS_FILE = "settings_crash_behavior.xml";
-S32 LLCrashLogger::loadCrashBehaviorSetting()
+std::string LLCrashLogger::loadCrashURLSetting()
{
+
// First check user_settings (in the user's home dir)
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
if (! mCrashSettings.loadFromFile(filename))
@@ -366,38 +393,14 @@ S32 LLCrashLogger::loadCrashBehaviorSetting()
mCrashSettings.loadFromFile(filename);
}
- // If we didn't load any files above, this will return the default
- S32 value = mCrashSettings.getS32("CrashSubmitBehavior");
-
- // Whatever value we got, make sure it's valid
- switch (value)
- {
- case CRASH_BEHAVIOR_NEVER_SEND:
- return CRASH_BEHAVIOR_NEVER_SEND;
- case CRASH_BEHAVIOR_ALWAYS_SEND:
- return CRASH_BEHAVIOR_ALWAYS_SEND;
- }
-
- return CRASH_BEHAVIOR_ASK;
-}
-
-bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior)
-{
- switch (crash_behavior)
- {
- case CRASH_BEHAVIOR_ASK:
- case CRASH_BEHAVIOR_NEVER_SEND:
- case CRASH_BEHAVIOR_ALWAYS_SEND:
- break;
- default:
- return false;
- }
-
- mCrashSettings.setS32("CrashSubmitBehavior", crash_behavior);
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
- mCrashSettings.saveToFile(filename, FALSE);
-
- return true;
+ if (! mCrashSettings.controlExists("CrashHostUrl"))
+ {
+ return "";
+ }
+ else
+ {
+ return mCrashSettings.getString("CrashHostUrl");
+ }
}
bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg, int retries, int timeout)
@@ -405,13 +408,13 @@ bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- gBreak = false;
httpOpts->setTimeout(timeout);
for(int i = 0; i < retries; ++i)
{
updateApplication(llformat("%s, try %d...", msg.c_str(), i+1));
+ LL_INFOS("CRASHREPORT") << "POST crash data to " << host << LL_ENDL;
LLCore::HttpHandle handle = LLCoreHttpUtil::requestPostWithLLSD(httpRequest.get(), LLCore::HttpRequest::DEFAULT_POLICY_ID, 0,
host, data, httpOpts, LLCore::HttpHeaders::ptr_t(), LLCore::HttpHandler::ptr_t(new LLCrashLoggerHandler));
@@ -424,10 +427,11 @@ bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg
}
while(!gBreak)
- {
- updateApplication(); // No new message, just pump the IO
+ {
+ ms_sleep(250);
+ updateApplication(); // No new message, just pump the IO
httpRequest->update(0L);
- }
+ }
if(gSent)
{
return gSent;
@@ -440,12 +444,15 @@ bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg
bool LLCrashLogger::sendCrashLog(std::string dump_dir)
{
+
gDirUtilp->setDumpDir( dump_dir );
std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"SecondLifeCrashReport");
std::string report_file = dump_path + ".log";
-
+
+ LL_DEBUGS("CRASHREPORT") << "sending " << report_file << LL_ENDL;
+
gatherFiles();
LLSD post_data;
@@ -455,19 +462,26 @@ bool LLCrashLogger::sendCrashLog(std::string dump_dir)
std::ofstream out_file(report_file.c_str());
LLSDSerialize::toPrettyXML(post_data, out_file);
+ out_file.flush();
out_file.close();
bool sent = false;
- //*TODO: Translate
- if(mCrashHost != "")
+ if(mCrashHost != "")
{
+ LL_WARNS("CRASHREPORT") << "Sending crash data to server from CrashHostUrl '" << mCrashHost << "'" << LL_ENDL;
+
+ std::string msg = "Using override crash server... ";
+ msg = msg+mCrashHost.c_str();
+ updateApplication(msg.c_str());
+
sent = runCrashLogPost(mCrashHost, post_data, std::string("Sending to server"), CRASH_UPLOAD_RETRIES, CRASH_UPLOAD_TIMEOUT);
}
if(!sent)
{
- sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to alternate server"), CRASH_UPLOAD_RETRIES, CRASH_UPLOAD_TIMEOUT);
+ updateApplication("Using default server...");
+ sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to default server"), CRASH_UPLOAD_RETRIES, CRASH_UPLOAD_TIMEOUT);
}
mSentCrashLogs = sent;
@@ -477,8 +491,6 @@ bool LLCrashLogger::sendCrashLog(std::string dump_dir)
bool LLCrashLogger::sendCrashLogs()
{
-
- //pertinent code from below moved into a subroutine.
LLSD locks = mKeyMaster.getProcessList();
LLSD newlocks = LLSD::emptyArray();
@@ -517,8 +529,6 @@ bool LLCrashLogger::sendCrashLogs()
}
else
{
- //mCrashInfo["DebugLog"].erase("MinidumpPath");
-
mKeyMaster.cleanupProcess((*lock)["dumpdir"].asString());
}
}
@@ -526,7 +536,7 @@ bool LLCrashLogger::sendCrashLogs()
}
else
{
- LL_WARNS() << "Discarding corrupted entry from lock table." << LL_ENDL;
+ LL_INFOS() << "Discarding corrupted entry from lock table." << LL_ENDL;
}
}
}
@@ -542,11 +552,13 @@ bool LLCrashLogger::sendCrashLogs()
void LLCrashLogger::updateApplication(const std::string& message)
{
- if (!message.empty()) LL_INFOS() << message << LL_ENDL;
+ if (!message.empty()) LL_INFOS("CRASHREPORT") << message << LL_ENDL;
}
bool LLCrashLogger::init()
{
+ LL_DEBUGS("CRASHREPORT") << LL_ENDL;
+
LLCore::LLHttp::initialize();
// We assume that all the logs we're looking for reside on the current drive
@@ -570,6 +582,8 @@ bool LLCrashLogger::init()
// Set the log file to crashreport.log
LLError::logToFile(log_file); //NOTE: Until this line, LL_INFOS LL_WARNS, etc are blown to the ether.
+ LL_INFOS("CRASHREPORT") << "Crash reporter file rotation complete." << LL_ENDL;
+
// Handle locking
bool locked = mKeyMaster.requestMaster(); //Request master locking file. wait time is defaulted to 300S
@@ -596,16 +610,6 @@ bool LLCrashLogger::init()
"1 = always send crash report, "
"2 = never send crash report)");
- // LL_INFOS() << "Loading crash behavior setting" << LL_ENDL;
- // mCrashBehavior = loadCrashBehaviorSetting();
-
- // If user doesn't want to send, bail out
- if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND)
- {
- LL_INFOS() << "Crash behavior is never_send, quitting" << LL_ENDL;
- return false;
- }
-
init_curl();
LLCore::HttpRequest::createService();
LLCore::HttpRequest::startThread();
diff --git a/indra/llcrashlogger/llcrashlogger.h b/indra/llcrashlogger/llcrashlogger.h
index f5383daefc..8b4afae24a 100755
--- a/indra/llcrashlogger/llcrashlogger.h
+++ b/indra/llcrashlogger/llcrashlogger.h
@@ -46,13 +46,12 @@ class LLCrashLogger : public LLApp
public:
LLCrashLogger();
virtual ~LLCrashLogger();
- S32 loadCrashBehaviorSetting();
- bool readDebugFromXML(LLSD& dest, const std::string& filename );
+ std::string loadCrashURLSetting();
+ bool readFromXML(LLSD& dest, const std::string& filename );
void gatherFiles();
void mergeLogs( LLSD src_sd );
virtual void gatherPlatformSpecificFiles() {}
- bool saveCrashBehaviorSetting(S32 crash_behavior);
bool sendCrashLog(std::string dump_dir);
bool sendCrashLogs();
LLSD constructPostData();
diff --git a/indra/mac_crash_logger/llcrashloggermac.cpp b/indra/mac_crash_logger/llcrashloggermac.cpp
index 351009814d..3149fad6e8 100755
--- a/indra/mac_crash_logger/llcrashloggermac.cpp
+++ b/indra/mac_crash_logger/llcrashloggermac.cpp
@@ -66,22 +66,19 @@ void LLCrashLoggerMac::gatherPlatformSpecificFiles()
bool LLCrashLoggerMac::mainLoop()
{
+
if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND)
{
gSendReport = true;
}
- if(gRememberChoice)
- {
- if(gSendReport) saveCrashBehaviorSetting(CRASH_BEHAVIOR_ALWAYS_SEND);
- else saveCrashBehaviorSetting(CRASH_BEHAVIOR_NEVER_SEND);
- }
-
if(gSendReport)
{
setUserText(gUserNotes);
sendCrashLogs();
}
+
+ LL_INFOS() << "Sending of logs complete" << LL_ENDL;
return true;
}
diff --git a/indra/mac_crash_logger/mac_crash_logger.cpp b/indra/mac_crash_logger/mac_crash_logger.cpp
index d6b913829e..95d4e65207 100755
--- a/indra/mac_crash_logger/mac_crash_logger.cpp
+++ b/indra/mac_crash_logger/mac_crash_logger.cpp
@@ -39,16 +39,12 @@ int main(int argc, char **argv)
LLSD options = LLApp::instance()->getOptionData(
LLApp::PRIORITY_COMMAND_LINE);
- if (!(options.has("pid") && options.has("dumpdir")))
- {
- llwarns << "Insufficient parameters to crash report." << llendl;
- }
-
if (! app.init())
{
LL_WARNS() << "Unable to initialize application." << LL_ENDL;
return 1;
}
+
if (app.getCrashBehavior() != CRASH_BEHAVIOR_ALWAYS_SEND)
{
// return NSApplicationMain(argc, (const char **)argv);
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index bb745bcb43..b6cb96b11e 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -2170,7 +2170,10 @@ if (PACKAGE)
VERBATIM)
add_custom_target(generate_breakpad_symbols DEPENDS "${VIEWER_SYMBOL_FILE}")
- add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}")
+ add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}")
+ if (WINDOWS OR LINUX)
+ add_dependencies(generate_breakpad_symbols "${VIEWER_COPY_MANIFEST}")
+ endif (WINDOWS OR LINUX)
add_dependencies(llpackage generate_breakpad_symbols)
endif(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
endif (PACKAGE)
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 212627c0f7..45306dcff4 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3615,9 +3615,9 @@ void getFileList()
void LLAppViewer::handleViewerCrash()
{
- LL_INFOS() << "Handle viewer crash entry." << LL_ENDL;
+ LL_INFOS("CRASHREPORT") << "Handle viewer crash entry." << LL_ENDL;
- LL_INFOS() << "Last render pool type: " << LLPipeline::sCurRenderPoolType << LL_ENDL ;
+ LL_INFOS("CRASHREPORT") << "Last render pool type: " << LLPipeline::sCurRenderPoolType << LL_ENDL ;
LLMemory::logMemoryInfo(true) ;
@@ -3725,30 +3725,36 @@ void LLAppViewer::handleViewerCrash()
#endif
char *minidump_file = pApp->getMiniDumpFilename();
-
+ LL_DEBUGS("CRASHREPORT") << "minidump file name " << minidump_file << LL_ENDL;
if(minidump_file && minidump_file[0] != 0)
{
gDebugInfo["Dynamic"]["MinidumpPath"] = minidump_file;
}
-#ifdef LL_WINDOWS
else
{
+#ifdef LL_WINDOWS
getFileList();
+#else
+ LL_WARNS("CRASHREPORT") << "no minidump file?" << LL_ENDL;
+#endif
}
-#endif
gDebugInfo["Dynamic"]["CrashType"]="crash";
if (gMessageSystem && gDirUtilp)
{
std::string filename;
filename = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "stats.log");
+ LL_DEBUGS("CRASHREPORT") << "recording stats " << filename << LL_ENDL;
llofstream file(filename.c_str(), std::ios_base::binary);
if(file.good())
{
- LL_INFOS() << "Handle viewer crash generating stats log." << LL_ENDL;
gMessageSystem->summarizeLogs(file);
file.close();
}
+ else
+ {
+ LL_WARNS("CRASHREPORT") << "problem recording stats" << LL_ENDL;
+ }
}
if (gMessageSystem)
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 09227806fd..ca219fda59 100755
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -83,10 +83,6 @@ static void exceptionTerminateHandler()
bool initViewer()
{
-#if LL_SOLARIS && defined(__sparc)
- asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC
-#endif
-
// Set the working dir to <bundle>/Contents/Resources
if (chdir(gDirUtilp->getAppRODataDir().c_str()) == -1)
{
@@ -301,6 +297,7 @@ void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze)
std::string appname = gDirUtilp->getExecutableFilename();
std::string str[] = { "-pid", pid_str.str(), "-dumpdir", logdir, "-procname", appname.c_str() };
std::vector< std::string > args( str, str + ( sizeof ( str ) / sizeof ( std::string ) ) );
+ LL_WARNS() << "about to launch mac-crash-logger" << pid_str << " " << logdir << " " << appname << LL_ENDL;
launchApplication(&command_str, &args);
}
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index ed40483029..3a0f96cd37 100755
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -67,9 +67,6 @@ const F32 RADIUS_PIXELS = 100.f; // size in screen space
const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS;
const F32 WIDTH_PIXELS = 8;
const S32 CIRCLE_STEPS = 100;
-const F32 DELTA = F_TWO_PI / CIRCLE_STEPS;
-const F32 SIN_DELTA = sin( DELTA );
-const F32 COS_DELTA = cos( DELTA );
const F32 MAX_MANIP_SELECT_DISTANCE = 100.f;
const F32 SNAP_ANGLE_INCREMENT = 5.625f;
const F32 SNAP_ANGLE_DETENTE = SNAP_ANGLE_INCREMENT;
diff --git a/indra/win_crash_logger/llcrashloggerwindows.cpp b/indra/win_crash_logger/llcrashloggerwindows.cpp
index 51e70f95b6..23c29e6b18 100644
--- a/indra/win_crash_logger/llcrashloggerwindows.cpp
+++ b/indra/win_crash_logger/llcrashloggerwindows.cpp
@@ -171,22 +171,6 @@ bool handle_button_click(WORD button_id)
return false;
}
- // See if "do this next time" is checked and save state
- S32 crash_behavior = CRASH_BEHAVIOR_ASK;
- LRESULT result = SendDlgItemMessage(gHwndReport, IDC_CHECK_AUTO, BM_GETCHECK, 0, 0);
- if (result == BST_CHECKED)
- {
- if (button_id == IDOK)
- {
- crash_behavior = CRASH_BEHAVIOR_ALWAYS_SEND;
- }
- else if (button_id == IDCANCEL)
- {
- crash_behavior = CRASH_BEHAVIOR_NEVER_SEND;
- }
- ((LLCrashLoggerWindows*)LLCrashLogger::instance())->saveCrashBehaviorSetting(crash_behavior);
- }
-
// We're done with this dialog.
gFirstDialog = FALSE;