MAINT-8797: Resurrect BugSplat crash reporting on Windows.

The Breakpad symbol-file upload in the viewer's build.sh was failing on
BugSplat builds since we weren't generating Breakpad symbol files. That upload
was conditional on RELEASE_CRASH_REPORTING, so my first approach was to set
RELEASE_CRASH_REPORTING=OFF for BugSplat builds. Unfortunately that symbol
also propagates down into C++ compiles, and in llappviewerwin32.cpp, both
Breakpad and BugSplat crash reporting is conditional on it. So that change
inadvertently turned off the C++ logic to engage BugSplat.

Stop forcing RELEASE_CRASH_REPORTING=OFF for BugSplat builds. Instead, make
the Breakpad symbol-file upload check the BUGSPLAT_DB variable as well.

Add #pragma messages to llappviewerwin32.cpp so we can detect whether it's
being built for Breakpad or BugSplat or neither.
master
Nat Goodspeed 2018-06-28 12:39:42 -04:00
parent e766d9e697
commit f6e7893a6e
2 changed files with 7 additions and 5 deletions

View File

@ -114,8 +114,6 @@ pre_build()
if [ -n "${BUGSPLAT_DB:-}" ]
then echo export BUGSPLAT_DB
export BUGSPLAT_DB
echo RELEASE_CRASH_REPORTING=OFF
RELEASE_CRASH_REPORTING=OFF
fi
fi
set -x
@ -428,7 +426,9 @@ then
if [ "$last_built_variant" = "Release" ]
then
# nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file.
if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ]
# Likewise, BUGSPLAT_DB suppresses generating the symbol file.
if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" \
-a -z "${BUGSPLAT_DB:-}" ]
then
# Upload crash reporter file
# These names must match the set of VIEWER_SYMBOL_FILE in indra/newview/CMakeLists.txt

View File

@ -559,11 +559,13 @@ bool LLAppViewerWin32::init()
#if LL_SEND_CRASH_REPORTS
#if ! defined(LL_BUGSPLAT)
#pragma message("Building without BugSplat")
LLAppViewer* pApp = LLAppViewer::instance();
pApp->initCrashReporting();
#else // LL_BUGSPLAT
#pragma message("Building with BugSplat")
std::string build_data_fname(
gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "build_data.json"));
@ -579,7 +581,7 @@ bool LLAppViewerWin32::init()
Json::Value build_data;
if (! reader.parse(inf, build_data, false)) // don't collect comments
{
// gah, the typo is baked into their API
// gah, the typo is baked into Json::Reader API
LL_WARNS() << "Can't initialize BugSplat, can't parse '" << build_data_fname
<< "': " << reader.getFormatedErrorMessages() << LL_ENDL;
}
@ -609,7 +611,7 @@ bool LLAppViewerWin32::init()
// engage stringize() overload that converts from wstring
LL_INFOS() << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL)
<< stringize(version_string) << ')' << LL_ENDL;
<< ' ' << stringize(version_string) << ')' << LL_ENDL;
} // got BugSplat_DB
} // parsed build_data.json
} // opened build_data.json