SL-1028 Bugsplat based windows viewers should not overwrite log files from main instance

meow-7.2.2
Andrey Kleshchev 2021-01-11 20:40:47 +02:00
parent b3f0b0d955
commit 663e45c7ea
2 changed files with 20 additions and 7 deletions

View File

@ -3066,6 +3066,15 @@ bool LLAppViewer::initWindow()
void LLAppViewer::writeDebugInfo(bool isStatic)
{
#if LL_WINDOWS && LL_BUGSPLAT
// bugsplat does not create dump folder and debug logs are written directly
// to logs folder, so it conflicts with main instance
if (mSecondInstance)
{
return;
}
#endif
//Try to do the minimum when writing data during a crash.
std::string* debug_filename;
debug_filename = ( isStatic

View File

@ -118,17 +118,21 @@ namespace
{
if (nCode == MDSCB_EXCEPTIONCODE)
{
// send the main viewer log file
// widen to wstring, convert to __wchar_t, then pass c_str()
sBugSplatSender->sendAdditionalFile(
WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log")));
// second instance does not have own log files
if (!LLAppViewer::instance()->isSecondInstance())
{
// send the main viewer log file
// widen to wstring, convert to __wchar_t, then pass c_str()
sBugSplatSender->sendAdditionalFile(
WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log")));
sBugSplatSender->sendAdditionalFile(
WCSTR(*LLAppViewer::instance()->getStaticDebugFile()));
}
sBugSplatSender->sendAdditionalFile(
WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml")));
sBugSplatSender->sendAdditionalFile(
WCSTR(*LLAppViewer::instance()->getStaticDebugFile()));
// We don't have an email address for any user. Hijack this
// metadata field for the platform identifier.
sBugSplatSender->setDefaultUserEmail(