summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/linux_crash_logger/linux_crash_logger.cpp14
-rw-r--r--indra/linux_crash_logger/llcrashloggerlinux.cpp2
-rw-r--r--indra/llcommon/indra_constants.h2
-rw-r--r--indra/llcrashlogger/llcrashlogger.cpp95
-rw-r--r--indra/llcrashlogger/llcrashlogger.h11
-rw-r--r--indra/mac_crash_logger/CrashReporter.nib/objects.xib2
-rw-r--r--indra/mac_crash_logger/llcrashloggermac.cpp5
-rw-r--r--indra/mac_crash_logger/mac_crash_logger.cpp15
-rw-r--r--indra/newview/app_settings/cmd_line.xml13
-rw-r--r--indra/newview/app_settings/settings_files.xml5
-rw-r--r--indra/newview/llappviewer.cpp84
-rw-r--r--indra/newview/llappviewerlinux.cpp63
-rw-r--r--indra/newview/llappviewerwin32.cpp6
-rwxr-xr-xindra/newview/llfloaterpreference.cpp5
-rw-r--r--indra/newview/llviewercontrol.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_setup.xml2
-rw-r--r--indra/win_crash_logger/llcrashloggerwindows.cpp7
-rw-r--r--indra/win_crash_logger/llcrashloggerwindows.h1
-rw-r--r--indra/win_crash_logger/win_crash_logger.cpp35
19 files changed, 164 insertions, 207 deletions
diff --git a/indra/linux_crash_logger/linux_crash_logger.cpp b/indra/linux_crash_logger/linux_crash_logger.cpp
index 8beae555fb..99d0ad7e14 100644
--- a/indra/linux_crash_logger/linux_crash_logger.cpp
+++ b/indra/linux_crash_logger/linux_crash_logger.cpp
@@ -24,16 +24,24 @@
* $/LicenseInfo$
*/
+#include "linden_common.h"
#include "llcrashloggerlinux.h"
int main(int argc, char **argv)
{
+ llinfos << "Starting crash reporter." << llendl;
+
LLCrashLoggerLinux app;
app.parseCommandOptions(argc, argv);
- app.init();
+
+ if (! app.init())
+ {
+ llwarns << "Unable to initialize application." << llendl;
+ return 1;
+ }
+
app.mainLoop();
app.cleanup();
+ llinfos << "Crash reporter finished normally." << llendl;
return 0;
}
-
-
diff --git a/indra/linux_crash_logger/llcrashloggerlinux.cpp b/indra/linux_crash_logger/llcrashloggerlinux.cpp
index 7449c6426f..7316717193 100644
--- a/indra/linux_crash_logger/llcrashloggerlinux.cpp
+++ b/indra/linux_crash_logger/llcrashloggerlinux.cpp
@@ -30,8 +30,6 @@
#include "linden_common.h"
-#include "boost/tokenizer.hpp"
-
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
#include "llerror.h"
#include "llfile.h"
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index d0f287657e..0745696ef3 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -387,8 +387,6 @@ const S32 MAP_SIM_RETURN_NULL_SIMS = 0x00010000;
const S32 MAP_SIM_PRELUDE = 0x00020000;
// Crash reporter behavior
-const char* const CRASH_SETTINGS_FILE = "settings_crash_behavior.xml";
-const char* const CRASH_BEHAVIOR_SETTING = "CrashSubmitBehavior";
const S32 CRASH_BEHAVIOR_ASK = 0;
const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1;
const S32 CRASH_BEHAVIOR_NEVER_SEND = 2;
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index 68e45f36e4..93f3c910bd 100644
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -31,10 +31,12 @@
#include "llcrashlogger.h"
#include "linden_common.h"
#include "llstring.h"
-#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
+#include "indra_constants.h" // CRASH_BEHAVIOR_...
#include "llerror.h"
+#include "llerrorcontrol.h"
#include "lltimer.h"
#include "lldir.h"
+#include "llfile.h"
#include "llsdserialize.h"
#include "lliopipe.h"
#include "llpumpio.h"
@@ -54,7 +56,7 @@ public:
virtual void error(U32 status, const std::string& reason)
{
- gBreak = true;
+ gBreak = true;
}
virtual void result(const LLSD& content)
@@ -64,21 +66,8 @@ public:
}
};
-bool LLCrashLoggerText::mainLoop()
-{
- std::cout << "Entering main loop" << std::endl;
- sendCrashLogs();
- return true;
-}
-
-void LLCrashLoggerText::updateApplication(const std::string& message)
-{
- LLCrashLogger::updateApplication(message);
- std::cout << message << std::endl;
-}
-
LLCrashLogger::LLCrashLogger() :
- mCrashBehavior(CRASH_BEHAVIOR_ASK),
+ mCrashBehavior(CRASH_BEHAVIOR_ALWAYS_SEND),
mCrashInPreviousExec(false),
mCrashSettings("CrashSettings"),
mSentCrashLogs(false),
@@ -281,26 +270,48 @@ LLSD LLCrashLogger::constructPostData()
return mCrashInfo;
}
+const char* const CRASH_SETTINGS_FILE = "settings_crash_behavior.xml";
+
S32 LLCrashLogger::loadCrashBehaviorSetting()
{
+ // 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))
+ {
+ // Next check app_settings (in the SL program dir)
+ std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, CRASH_SETTINGS_FILE);
+ mCrashSettings.loadFromFile(filename);
+ }
- mCrashSettings.loadFromFile(filename);
-
- S32 value = mCrashSettings.getS32(CRASH_BEHAVIOR_SETTING);
-
- if (value < CRASH_BEHAVIOR_ASK || CRASH_BEHAVIOR_NEVER_SEND < value) return CRASH_BEHAVIOR_ASK;
+ // If we didn't load any files above, this will return the default
+ S32 value = mCrashSettings.getS32("CrashSubmitBehavior");
- return value;
+ // 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)
{
- if (crash_behavior != CRASH_BEHAVIOR_ASK && crash_behavior != CRASH_BEHAVIOR_ALWAYS_SEND) return false;
+ switch (crash_behavior)
+ {
+ case CRASH_BEHAVIOR_ASK:
+ case CRASH_BEHAVIOR_NEVER_SEND:
+ case CRASH_BEHAVIOR_ALWAYS_SEND:
+ break;
+ default:
+ return false;
+ }
- mCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior);
+ mCrashSettings.setS32("CrashSubmitBehavior", crash_behavior);
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
-
mCrashSettings.saveToFile(filename, FALSE);
return true;
@@ -309,14 +320,13 @@ bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior)
bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg, int retries, int timeout)
{
gBreak = false;
- std::string status_message;
for(int i = 0; i < retries; ++i)
{
- status_message = llformat("%s, try %d...", msg.c_str(), i+1);
+ updateApplication(llformat("%s, try %d...", msg.c_str(), i+1));
LLHTTPClient::post(host, data, new LLCrashLoggerResponder(), timeout);
while(!gBreak)
{
- updateApplication(status_message);
+ updateApplication(); // No new message, just pump the IO
}
if(gSent)
{
@@ -336,7 +346,7 @@ bool LLCrashLogger::sendCrashLogs()
updateApplication("Sending reports...");
std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
- "SecondLifeCrashReport");
+ "SecondLifeCrashReport");
std::string report_file = dump_path + ".log";
std::ofstream out_file(report_file.c_str());
@@ -365,6 +375,7 @@ void LLCrashLogger::updateApplication(const std::string& message)
{
gServicePump->pump();
gServicePump->callback();
+ if (!message.empty()) llinfos << message << llendl;
}
bool LLCrashLogger::init()
@@ -374,14 +385,27 @@ bool LLCrashLogger::init()
// We assume that all the logs we're looking for reside on the current drive
gDirUtilp->initAppDirs("SecondLife");
+ LLError::initForApplication(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
+
// Default to the product name "Second Life" (this is overridden by the -name argument)
mProductName = "Second Life";
+
+ // Rename current log file to ".old"
+ std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "crashreport.log.old");
+ std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "crashreport.log");
+ LLFile::rename(log_file.c_str(), old_log_file.c_str());
+
+ // Set the log file to crashreport.log
+ LLError::logToFile(log_file);
- mCrashSettings.declareS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ASK, "Controls behavior when viewer crashes "
- "(0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)");
+ mCrashSettings.declareS32("CrashSubmitBehavior", CRASH_BEHAVIOR_ALWAYS_SEND,
+ "Controls behavior when viewer crashes "
+ "(0 = ask before sending crash report, "
+ "1 = always send crash report, "
+ "2 = never send crash report)");
- llinfos << "Loading crash behavior setting" << llendl;
- mCrashBehavior = loadCrashBehaviorSetting();
+ // llinfos << "Loading crash behavior setting" << llendl;
+ // mCrashBehavior = loadCrashBehaviorSetting();
// If user doesn't want to send, bail out
if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND)
@@ -394,10 +418,11 @@ bool LLCrashLogger::init()
gServicePump->prime(gAPRPoolp);
LLHTTPClient::setPump(*gServicePump);
- //If we've opened the crash logger, assume we can delete the marker file if it exists
+ //If we've opened the crash logger, assume we can delete the marker file if it exists
if( gDirUtilp )
{
- std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker");
+ std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.exec_marker");
LLAPRFile::remove( marker_file );
}
diff --git a/indra/llcrashlogger/llcrashlogger.h b/indra/llcrashlogger/llcrashlogger.h
index a5daa74247..5d0cb5931c 100644
--- a/indra/llcrashlogger/llcrashlogger.h
+++ b/indra/llcrashlogger/llcrashlogger.h
@@ -66,15 +66,4 @@ protected:
bool mSentCrashLogs;
};
-class LLCrashLoggerText : public LLCrashLogger
-{
-public:
- LLCrashLoggerText(void) {}
- ~LLCrashLoggerText(void) {}
-
- virtual bool mainLoop();
- virtual void updateApplication(const std::string& message = LLStringUtil::null);
-};
-
-
#endif //LLCRASHLOGGER_H
diff --git a/indra/mac_crash_logger/CrashReporter.nib/objects.xib b/indra/mac_crash_logger/CrashReporter.nib/objects.xib
index 634d1c5321..32647391b6 100644
--- a/indra/mac_crash_logger/CrashReporter.nib/objects.xib
+++ b/indra/mac_crash_logger/CrashReporter.nib/objects.xib
@@ -15,7 +15,7 @@
<string name="bounds">414 390 434 487 </string>
</object>
<object class="IBCarbonStaticText" id="181">
- <string name="title">Second Life appears to have crashed or frozen the last time it ran.&#10;&#10;This crash reporter collects information about your computer&apos;s hardware configuration, operating system, and some Second Life logs, all of which are used for debugging purposes only.&#10;&#10;In the space below, please briefly describe what you were doing or trying to do just prior to the crash. Thank you for your help!&#10;&#10;This report is NOT read by Customer Support. If you have billing or other questions, please go to: http://www.secondlife.com/support/&#10;&#10;If you don&apos;t wish to send Linden Lab a crash report, press Cancel.&#10;</string>
+ <string name="title">Second Life appears to have crashed or frozen the last time it ran.&#10;&#10;This crash reporter collects information about your computer&apos;s hardware configuration, operating system, and some Second Life logs, all of which are used for debugging purposes only.&#10;&#10;In the space below, please briefly describe what you were doing or trying to do just prior to the crash. Thank you for your help!&#10;&#10;This report is NOT read by Customer Support. If you have billing or other questions, please go to: http://www.secondlife.com/support/&#10;&#10;If you don&apos;t wish to send Linden Lab a crash report, press Don&apos;t Send.&#10;</string>
<string name="bounds">20 20 231 487 </string>
</object>
<object class="IBCarbonWindow" id="166">
diff --git a/indra/mac_crash_logger/llcrashloggermac.cpp b/indra/mac_crash_logger/llcrashloggermac.cpp
index bec8cce04e..b555e92b96 100644
--- a/indra/mac_crash_logger/llcrashloggermac.cpp
+++ b/indra/mac_crash_logger/llcrashloggermac.cpp
@@ -29,9 +29,6 @@
#include <Carbon/Carbon.h>
#include <iostream>
-#include <sstream>
-
-#include "boost/tokenizer.hpp"
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
#include "llerror.h"
@@ -247,7 +244,7 @@ bool LLCrashLoggerMac::mainLoop()
void LLCrashLoggerMac::updateApplication(const std::string& message)
{
- LLCrashLogger::updateApplication();
+ LLCrashLogger::updateApplication(message);
}
bool LLCrashLoggerMac::cleanup()
diff --git a/indra/mac_crash_logger/mac_crash_logger.cpp b/indra/mac_crash_logger/mac_crash_logger.cpp
index 20b491c401..6571b35241 100644
--- a/indra/mac_crash_logger/mac_crash_logger.cpp
+++ b/indra/mac_crash_logger/mac_crash_logger.cpp
@@ -25,22 +25,23 @@
*/
#include "linden_common.h"
-
#include "llcrashloggermac.h"
int main(int argc, char **argv)
{
- //time(&gLaunchTime);
-
- llinfos << "Starting Second Life Viewer Crash Reporter" << llendl;
+ llinfos << "Starting crash reporter." << llendl;
LLCrashLoggerMac app;
app.parseCommandOptions(argc, argv);
- if(!app.init())
+
+ if (! app.init())
{
- return 0;
+ llwarns << "Unable to initialize application." << llendl;
+ return 1;
}
+
app.mainLoop();
-
+ app.cleanup();
+ llinfos << "Crash reporter finished normally." << llendl;
return 0;
}
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 89e5949fbe..15434f2b8f 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -220,8 +220,7 @@
<map>
<key>desc</key>
<string>Set the detail level.
- 0 - low, 1 - medium, 2 - high, 3 - ultra
- </string>
+0 - low, 1 - medium, 2 - high, 3 - ultra</string>
<key>count</key>
<integer>1</integer>
</map>
@@ -229,10 +228,7 @@
<key>setdefault</key>
<map>
<key>desc</key>
- <string> specify the value of a particular
- configuration variable which can be
- overridden by settings.xml
- </string>
+ <string>specify the value of a particular configuration variable which can be overridden by settings.xml.</string>
<key>count</key>
<integer>2</integer>
<!-- Special case. Mapped to settings procedurally. -->
@@ -241,10 +237,7 @@
<key>set</key>
<map>
<key>desc</key>
- <string> specify the value of a particular
- configuration variable that
- overrides all other settings
- </string>
+ <string>specify the value of a particular configuration variable that overrides all other settings.</string>
<key>count</key>
<integer>2</integer>
<key>compose</key>
diff --git a/indra/newview/app_settings/settings_files.xml b/indra/newview/app_settings/settings_files.xml
index 079a54f957..bfc09286e3 100644
--- a/indra/newview/app_settings/settings_files.xml
+++ b/indra/newview/app_settings/settings_files.xml
@@ -20,7 +20,8 @@
file_name="settings.xml"
file_name_setting="ClientSettingsFile"/>
<file name="CrashSettings"
- file_name="settings_crash_behavior"/>
+ file_name="settings_crash_behavior.xml"
+ file_name_setting="CrashSettingsFile"/>
<file name="Warnings"
file_name="ignorable_dialogs.xml"
file_name_setting="WarningSettingsFile"/>
@@ -61,4 +62,4 @@
file_name="colors.xml"
file_name_setting="SkinningSettingsFile"/>
</group>
-</settings_files> \ No newline at end of file
+</settings_files>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 80ac385e3b..92e0513464 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -469,18 +469,6 @@ void request_initial_instant_messages()
}
}
-// A settings system callback for CrashSubmitBehavior
-bool handleCrashSubmitBehaviorChanged(const LLSD& newvalue)
-{
- S32 cb = newvalue.asInteger();
- const S32 NEVER_SUBMIT_REPORT = 2;
- if(cb == NEVER_SUBMIT_REPORT)
- {
- LLAppViewer::instance()->destroyMainloopTimeout();
- }
- return true;
-}
-
// Use these strictly for things that are constructed at startup,
// or for things that are performance critical. JC
static void settings_to_globals()
@@ -612,9 +600,6 @@ bool LLAppViewer::sendURLToOtherInstance(const std::string& url)
// Static members.
// The single viewer app.
LLAppViewer* LLAppViewer::sInstance = NULL;
-
-const std::string LLAppViewer::sGlobalSettingsName = "Global";
-
LLTextureCache* LLAppViewer::sTextureCache = NULL;
LLImageDecodeThread* LLAppViewer::sImageDecodeThread = NULL;
LLTextureFetch* LLAppViewer::sTextureFetch = NULL;
@@ -772,16 +757,6 @@ bool LLAppViewer::init()
LL_INFOS("InitInfo") << "J2C Engine is: " << LLImageJ2C::getEngineInfo() << LL_ENDL;
LL_INFOS("InitInfo") << "libcurl version is: " << LLCurl::getVersionString() << LL_ENDL;
- // Get the single value from the crash settings file, if it exists
- std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
- gCrashSettings.loadFromFile(crash_settings_filename);
- if(gSavedSettings.getBOOL("IgnoreAllNotifications"))
- {
- gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ALWAYS_SEND);
- gCrashSettings.saveToFile(crash_settings_filename, FALSE);
- }
- LL_INFOS("InitInfo") << "Crash settings done." << LL_ENDL ;
-
/////////////////////////////////////////////////
// OS-specific login dialogs
/////////////////////////////////////////////////
@@ -1056,7 +1031,7 @@ bool LLAppViewer::init()
//EXT-7013 - On windows for some locale (Japanese) standard
//datetime formatting functions didn't support some parameters such as "weekday".
//Names for days and months localized in xml are also useful for Polish locale(STORM-107).
- std::string language = LLControlGroup::getInstance(sGlobalSettingsName)->getString("Language");
+ std::string language = gSavedSettings.getString("Language");
if(language == "ja" || language == "pl")
{
LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames"));
@@ -1709,10 +1684,6 @@ bool LLAppViewer::cleanup()
llinfos << "Saved settings" << llendflush;
}
- std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
- // save all settings, even if equals defaults
- gCrashSettings.saveToFile(crash_settings_filename, FALSE);
-
std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings"));
gWarningSettings.saveToFile(warnings_settings_filename, TRUE);
@@ -1842,7 +1813,6 @@ bool LLAppViewer::cleanup()
gSavedSettings.cleanup();
LLUIColorTable::instance().clear();
- gCrashSettings.cleanup();
LLWatchdog::getInstance()->cleanup();
@@ -1985,7 +1955,6 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
llerrs << "Invalid settings location list" << llendl;
}
- LLControlGroup* global_settings = LLControlGroup::getInstance(sGlobalSettingsName);
for(LLInitParam::ParamIterator<SettingsGroup>::const_iterator it = mSettingsLocationList->groups.begin(), end_it = mSettingsLocationList->groups.end();
it != end_it;
++it)
@@ -2018,11 +1987,15 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
std::string full_settings_path;
if (file_it->file_name_setting.isProvided()
- && global_settings->controlExists(file_it->file_name_setting))
+ && gSavedSettings.controlExists(file_it->file_name_setting))
{
// try to find filename stored in file_name_setting control
- full_settings_path = global_settings->getString(file_it->file_name_setting);
- if (!gDirUtilp->fileExists(full_settings_path))
+ full_settings_path = gSavedSettings.getString(file_it->file_name_setting);
+ if (full_settings_path.empty())
+ {
+ continue;
+ }
+ else if (!gDirUtilp->fileExists(full_settings_path))
{
// search in default path
full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, full_settings_path);
@@ -2168,8 +2141,6 @@ bool LLAppViewer::initConfiguration()
gSavedSettings.setS32("WatchdogEnabled", 0);
#endif
- gCrashSettings.getControl(CRASH_BEHAVIOR_SETTING)->getSignal()->connect(boost::bind(&handleCrashSubmitBehaviorChanged, _2));
-
// These are warnings that appear on the first experience of that condition.
// They are already set in the settings_default.xml file, but still need to be added to LLFirstUse
// for disable/reset ability
@@ -2300,15 +2271,33 @@ bool LLAppViewer::initConfiguration()
{
const std::string& name = *itr;
const std::string& value = *(++itr);
- LLControlVariable* c = LLControlGroup::getInstance(sGlobalSettingsName)->getControl(name);
- if(c)
+ std::string name_part;
+ std::string group_part;
+ LLControlVariable* control = NULL;
+
+ // Name can be further split into ControlGroup.Name, with the default control group being Global
+ size_t pos = name.find('.');
+ if (pos != std::string::npos)
+ {
+ group_part = name.substr(0, pos);
+ name_part = name.substr(pos+1);
+ llinfos << "Setting " << group_part << "." << name_part << " to " << value << llendl;
+ LLControlGroup* g = LLControlGroup::getInstance(group_part);
+ if (g) control = g->getControl(name_part);
+ }
+ else
+ {
+ llinfos << "Setting Global." << name << " to " << value << llendl;
+ control = gSavedSettings.getControl(name);
+ }
+
+ if (control)
{
- c->setValue(value, false);
+ control->setValue(value, false);
}
else
{
- llwarns << "'--set' specified with unknown setting: '"
- << name << "'." << llendl;
+ llwarns << "Failed --set " << name << ": setting name unknown." << llendl;
}
}
}
@@ -2765,7 +2754,8 @@ void LLAppViewer::checkForCrash(void)
// Pop up a freeze or crash warning dialog
//
S32 choice;
- if(gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) == CRASH_BEHAVIOR_ASK)
+ const S32 cb = gCrashSettings.getS32("CrashSubmitBehavior");
+ if(cb == CRASH_BEHAVIOR_ASK)
{
std::ostringstream msg;
msg << LLTrans::getString("MBFrozenCrashed");
@@ -2774,7 +2764,7 @@ void LLAppViewer::checkForCrash(void)
alert,
OSMB_YESNO);
}
- else if(gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) == CRASH_BEHAVIOR_NEVER_SEND)
+ else if(cb == CRASH_BEHAVIOR_NEVER_SEND)
{
choice = OSBTN_NO;
}
@@ -2831,10 +2821,9 @@ bool LLAppViewer::initWindow()
LL_INFOS("AppInit") << "gViewerwindow created." << LL_ENDL;
// Need to load feature table before cheking to start watchdog.
- const S32 NEVER_SUBMIT_REPORT = 2;
bool use_watchdog = false;
int watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled");
- if(watchdog_enabled_setting == -1)
+ if (watchdog_enabled_setting == -1)
{
use_watchdog = !LLFeatureManager::getInstance()->isFeatureAvailable("WatchdogDisabled");
}
@@ -2844,8 +2833,7 @@ bool LLAppViewer::initWindow()
use_watchdog = bool(watchdog_enabled_setting);
}
- bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT;
- if(use_watchdog && send_reports)
+ if (use_watchdog)
{
LLWatchdog::getInstance()->init(watchdog_killer_callback);
}
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index 714e0e6163..48d02dfeaa 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -361,46 +361,35 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
}
else
{
- const S32 cb = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING);
-
- // Always generate the report, have the logger do the asking, and
- // don't wait for the logger before exiting (-> total cleanup).
- if (CRASH_BEHAVIOR_NEVER_SEND != cb)
- {
- // launch the actual crash logger
- const char* ask_dialog = "-dialog";
- if (CRASH_BEHAVIOR_ASK != cb)
- ask_dialog = ""; // omit '-dialog' option
- const char * cmdargv[] =
- {cmd.c_str(),
- ask_dialog,
- "-user",
- (char*)LLGridManager::getInstance()->getGridLabel().c_str(),
- "-name",
- LLAppViewer::instance()->getSecondLifeTitle().c_str(),
- NULL};
- fflush(NULL);
- pid_t pid = fork();
- if (pid == 0)
- { // child
- execv(cmd.c_str(), (char* const*) cmdargv); /* Flawfinder: ignore */
- llwarns << "execv failure when trying to start " << cmd << llendl;
- _exit(1); // avoid atexit()
+ // launch the actual crash logger
+ const char * cmdargv[] =
+ {cmd.c_str(),
+ "-user",
+ (char*)LLGridManager::getInstance()->getGridLabel().c_str(),
+ "-name",
+ LLAppViewer::instance()->getSecondLifeTitle().c_str(),
+ NULL};
+ fflush(NULL);
+ pid_t pid = fork();
+ if (pid == 0)
+ { // child
+ execv(cmd.c_str(), (char* const*) cmdargv); /* Flawfinder: ignore */
+ llwarns << "execv failure when trying to start " << cmd << llendl;
+ _exit(1); // avoid atexit()
+ }
+ else
+ {
+ if (pid > 0)
+ {
+ // DO NOT wait for child proc to die; we want
+ // the logger to outlive us while we quit to
+ // free up the screen/keyboard/etc.
+ ////int childExitStatus;
+ ////waitpid(pid, &childExitStatus, 0);
}
else
{
- if (pid > 0)
- {
- // DO NOT wait for child proc to die; we want
- // the logger to outlive us while we quit to
- // free up the screen/keyboard/etc.
- ////int childExitStatus;
- ////waitpid(pid, &childExitStatus, 0);
- }
- else
- {
- llwarns << "fork failure." << llendl;
- }
+ llwarns << "fork failure." << llendl;
}
}
// Sometimes signals don't seem to quit the viewer. Also, we may
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 445bd208ef..f94c843ad9 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -518,11 +518,7 @@ void LLAppViewerWin32::handleCrashReporting(bool reportFreeze)
}
else
{
- S32 cb = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING);
- if(cb != CRASH_BEHAVIOR_NEVER_SEND)
- {
- _spawnl(_P_NOWAIT, exe_path.c_str(), arg_str, NULL);
- }
+ _spawnl(_P_NOWAIT, exe_path.c_str(), arg_str, NULL);
}
}
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 7848484ac6..5fd262a720 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -751,10 +751,7 @@ void LLFloaterPreference::onBtnOK()
closeFloater(false);
LLUIColorTable::instance().saveUserSettings();
- gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
- std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
- // save all settings, even if equals defaults
- gCrashSettings.saveToFile(crash_settings_filename, FALSE);
+ gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
}
else
{
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 87ca80260f..b87ca1eaec 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -566,7 +566,7 @@ bool toggle_show_object_render_cost(const LLSD& newvalue)
return true;
}
-void toggle_updater_service_active(LLControlVariable* control, const LLSD& new_value)
+void toggle_updater_service_active(const LLSD& new_value)
{
if(new_value.asInteger())
{
@@ -735,7 +735,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2));
gSavedSettings.getControl("ShowMiniLocationPanel")->getSignal()->connect(boost::bind(&toggle_show_mini_location_panel, _2));
gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2));
- gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(&toggle_updater_service_active);
+ gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(boost::bind(&toggle_updater_service_active, _2));
gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2));
gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2));
}
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index 1c22a5c02e..e639f0dc9d 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -268,7 +268,7 @@
height="23"
layout="topleft"
left_delta="50"
- top_pad="5"
+ top_pad="5"
name="updater_service_combobox"
width="300">
<combo_box.item
diff --git a/indra/win_crash_logger/llcrashloggerwindows.cpp b/indra/win_crash_logger/llcrashloggerwindows.cpp
index 51ff754c27..170babbb98 100644
--- a/indra/win_crash_logger/llcrashloggerwindows.cpp
+++ b/indra/win_crash_logger/llcrashloggerwindows.cpp
@@ -296,6 +296,7 @@ void LLCrashLoggerWindows::gatherPlatformSpecificFiles()
bool LLCrashLoggerWindows::mainLoop()
{
+ llinfos << "CrashSubmitBehavior is " << mCrashBehavior << llendl;
// Note: parent hwnd is 0 (the desktop). No dlg proc. See Petzold (5th ed) HexCalc example, Chapter 11, p529
// win_crash_logger.rc has been edited by hand.
@@ -308,6 +309,7 @@ bool LLCrashLoggerWindows::mainLoop()
if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND)
{
+ llinfos << "Showing crash report submit progress window." << llendl;
ShowWindow(gHwndProgress, SW_SHOW );
sendCrashLogs();
}
@@ -354,7 +356,7 @@ bool LLCrashLoggerWindows::mainLoop()
void LLCrashLoggerWindows::updateApplication(const std::string& message)
{
- LLCrashLogger::updateApplication();
+ LLCrashLogger::updateApplication(message);
if(!message.empty()) show_progress(message);
update_messages();
}
@@ -370,6 +372,3 @@ bool LLCrashLoggerWindows::cleanup()
PostQuitMessage(0);
return true;
}
-
-
-
diff --git a/indra/win_crash_logger/llcrashloggerwindows.h b/indra/win_crash_logger/llcrashloggerwindows.h
index 24c564457c..5c45a998b3 100644
--- a/indra/win_crash_logger/llcrashloggerwindows.h
+++ b/indra/win_crash_logger/llcrashloggerwindows.h
@@ -41,7 +41,6 @@ public:
virtual void updateApplication(const std::string& message = LLStringUtil::null);
virtual bool cleanup();
virtual void gatherPlatformSpecificFiles();
- //void annotateCallStack();
void setHandle(HINSTANCE hInst) { mhInst = hInst; }
private:
void ProcessDlgItemText(HWND hWnd, int nIDDlgItem);
diff --git a/indra/win_crash_logger/win_crash_logger.cpp b/indra/win_crash_logger/win_crash_logger.cpp
index 5c22053317..8e916ae437 100644
--- a/indra/win_crash_logger/win_crash_logger.cpp
+++ b/indra/win_crash_logger/win_crash_logger.cpp
@@ -24,51 +24,30 @@
* $/LicenseInfo$
*/
-// win_crash_logger.cpp : Defines the entry point for the application.
-//
-
-// Must be first include, precompiled headers.
#include "linden_common.h"
-
#include "stdafx.h"
-
#include <stdlib.h>
-
#include "llcrashloggerwindows.h"
-
-
-//
-// Implementation
-//
-
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
- llinfos << "Starting crash reporter" << llendl;
+ llinfos << "Starting crash reporter." << llendl;
LLCrashLoggerWindows app;
app.setHandle(hInstance);
- bool ok = app.init();
- if(!ok)
+ app.parseCommandOptions(__argc, __argv);
+
+ if (! app.init())
{
llwarns << "Unable to initialize application." << llendl;
return -1;
}
- // Run the application main loop
- if(!LLApp::isQuitting()) app.mainLoop();
-
- if (!app.isError())
- {
- //
- // We don't want to do cleanup here if the error handler got called -
- // the assumption is that the error handler is responsible for doing
- // app cleanup if there was a problem.
- //
- app.cleanup();
- }
+ app.mainLoop();
+ app.cleanup();
+ llinfos << "Crash reporter finished normally." << llendl;
return 0;
}