summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autobuild.xml54
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake12
-rw-r--r--indra/cmake/bugsplat.cmake20
-rw-r--r--indra/llcommon/CMakeLists.txt10
-rw-r--r--indra/llcommon/llapp.cpp60
-rw-r--r--indra/llcommon/llapp.h10
-rw-r--r--indra/newview/CMakeLists.txt3
-rwxr-xr-xindra/newview/viewer_manifest.py212
8 files changed, 275 insertions, 106 deletions
diff --git a/autobuild.xml b/autobuild.xml
index cea8b51ec5..25bc8d8af9 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -225,6 +225,60 @@
<key>version</key>
<string>1.57</string>
</map>
+ <key>bugsplat</key>
+ <map>
+ <key>copyright</key>
+ <string>Copyright 2003-2017, BugSplat</string>
+ <key>description</key>
+ <string>Bugsplat crash reporting package</string>
+ <key>license</key>
+ <string>Proprietary</string>
+ <key>license_file</key>
+ <string>LICENSES/BUGSPLAT_LICENSE.txt</string>
+ <key>name</key>
+ <string>bugsplat</string>
+ <key>platforms</key>
+ <map>
+ <key>darwin64</key>
+ <map>
+ <key>archive</key>
+ <map>
+ <key>hash</key>
+ <string>9a14b64569c998fb7ef6e3bb690eda29</string>
+ <key>url</key>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/17916/122458/bugsplat-1.0.2.515327-darwin64-515327.tar.bz2</string>
+ </map>
+ <key>name</key>
+ <string>darwin64</string>
+ </map>
+ <key>windows</key>
+ <map>
+ <key>archive</key>
+ <map>
+ <key>hash</key>
+ <string>90d85d1ac17f0049c8c48110e790a61f</string>
+ <key>url</key>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/17918/122472/bugsplat-3.5.0.5.515327-windows-515327.tar.bz2</string>
+ </map>
+ <key>name</key>
+ <string>windows</string>
+ </map>
+ <key>windows64</key>
+ <map>
+ <key>archive</key>
+ <map>
+ <key>hash</key>
+ <string>9af7c080ebf0b961d7a4ccac7a303508</string>
+ <key>url</key>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/17917/122466/bugsplat-3.5.0.5.515327-windows64-515327.tar.bz2</string>
+ </map>
+ <key>name</key>
+ <string>windows64</string>
+ </map>
+ </map>
+ <key>version</key>
+ <string>1.0.2.515327</string>
+ </map>
<key>chardet</key>
<map>
<key>copyright</key>
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 09a97fc03e..7f708bc27a 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -49,6 +49,18 @@ if(WINDOWS)
libhunspell.dll
)
+ # Filenames are different for 32/64 bit BugSplat file and we don't
+ # have any control over them so need to branch.
+ if(ADDRESS_SIZE EQUAL 32)
+ set(release_files ${release_files} BugSplat.dll)
+ set(release_files ${release_files} BugSplatRc.dll)
+ set(release_files ${release_files} BsSndRpt.exe)
+ else(ADDRESS_SIZE EQUAL 32)
+ set(release_files ${release_files} BugSplat64.dll)
+ set(release_files ${release_files} BugSplatRc64.dll)
+ set(release_files ${release_files} BsSndRpt64.exe)
+ endif(ADDRESS_SIZE EQUAL 32)
+
if (FMODEX)
if(ADDRESS_SIZE EQUAL 32)
diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake
new file mode 100644
index 0000000000..e993979902
--- /dev/null
+++ b/indra/cmake/bugsplat.cmake
@@ -0,0 +1,20 @@
+include(Prebuilt)
+
+set(BUGSPLAT_FIND_QUIETLY ON)
+set(BUGSPLAT_FIND_REQUIRED ON)
+
+if (USESYSTEMLIBS)
+ include(FindBUGSPLAT)
+else (USESYSTEMLIBS)
+ use_prebuilt_binary(bugsplat)
+ if (WINDOWS)
+ set(BUGSPLAT_LIBRARIES
+ ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
+ )
+ elseif (DARWIN)
+
+ else (WINDOWS)
+
+ endif (WINDOWS)
+ set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat)
+endif (USESYSTEMLIBS)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index d9eb13d65a..4eba1d5451 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -13,6 +13,7 @@ include(GoogleBreakpad)
include(Copy3rdPartyLibs)
include(ZLIB)
include(URIPARSER)
+include(BuildVersion)
include_directories(
${EXPAT_INCLUDE_DIRS}
@@ -253,7 +254,14 @@ set(llcommon_HEADER_FILES
)
set_source_files_properties(${llcommon_HEADER_FILES}
- PROPERTIES HEADER_FILE_ONLY TRUE)
+ PROPERTIES HEADER_FILE_ONLY TRUE
+ )
+
+# bring in version information for BugSplat crash reporting
+set_source_files_properties(${llcommon_SOURCE_FILES}
+ PROPERTIES
+ COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
+ )
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index 6cc9e804d4..3e652dbdb5 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -49,6 +49,20 @@
#include "google_breakpad/exception_handler.h"
#include "stringize.h"
#include "llcleanup.h"
+#include "BugSplat.h"
+
+// TESTING ONLY - REMOVE FOR PRODUCTION
+// (Want to only invoke BugSplat crash reporting in the same way we did for Breakpad - for Release viewers
+// but need to test here in a ReleaseWithDebugInfo environment)
+#if BUGSPLAT_ENABLED
+#define LL_SEND_CRASH_REPORTS 1
+#endif
+
+// BugSplat crash reporting tool - http://bugsplat.com
+#if BUGSPLAT_ENABLED
+bool BugSplatExceptionCallback(unsigned int nCode, void* lpVal1, void* lpVal2);
+MiniDmpSender *gBugSplatSender;
+#endif
//
// Signal handling
@@ -385,6 +399,26 @@ void EnableCrashingOnCrashes()
}
#endif
+#if BUGSPLAT_ENABLED
+bool BugSplatExceptionCallback(unsigned int nCode, void* lpVal1, void* lpVal2)
+{
+ switch (nCode)
+ {
+ case MDSCB_EXCEPTIONCODE:
+ {
+ // send the main viewer log file (Clearly a temporary hack since we don't have access to the gDir*** set of functions in newview
+ const std::string appdata = std::string(getenv("APPDATA"));
+ const std::string logfile = appdata + "\\SecondLife\\logs\\Secondlife.log";
+ const std::wstring wide_logfile(logfile.begin(), logfile.end());
+ gBugSplatSender->sendAdditionalFile((const __wchar_t *)wide_logfile.c_str());
+ }
+ break;
+ }
+
+ return false;
+}
+#endif
+
void LLApp::setupErrorHandling(bool second_instance)
{
// Error handling is done by starting up an error handling thread, which just sleeps and
@@ -393,6 +427,25 @@ void LLApp::setupErrorHandling(bool second_instance)
#if LL_WINDOWS
#if LL_SEND_CRASH_REPORTS
+
+#if BUGSPLAT_ENABLED
+ // TODOCP: populate these fields correctly
+ static const wchar_t *bugdb_name = L"second_life_callum_test";
+
+ // build (painfully) the app/channel name
+ #define stringize_inner(x) L#x
+ #define stringize_outer(x) stringize_inner(x)
+ std::wstring app_name(stringize_outer(LL_VIEWER_CHANNEL));
+
+ // build in real app version now we leveraged CMake to build in BuildVersion.cmake into LLCommon
+ wchar_t version_string[MAX_STRING];
+ wsprintf(version_string, L"%d.%d.%d.%d", LL_VIEWER_VERSION_MAJOR, LL_VIEWER_VERSION_MINOR, LL_VIEWER_VERSION_PATCH, LL_VIEWER_VERSION_BUILD);
+
+ gBugSplatSender = new MiniDmpSender((const __wchar_t *)bugdb_name, (const __wchar_t *)app_name.c_str(), (const __wchar_t *)version_string, NULL);
+
+ gBugSplatSender->setCallback(BugSplatExceptionCallback);
+#else
+
EnableCrashingOnCrashes();
// This sets a callback to handle w32 signals to the console window.
@@ -454,8 +507,9 @@ void LLApp::setupErrorHandling(bool second_instance)
mExceptionHandler->set_handle_debug_exceptions(true);
}
}
-#endif
-#else
+#endif // BUGSPLAT_ENABLED
+#endif // LL_SEND_CRASH_REPORTS
+#else // not LL_WINDOWS
//
// Start up signal handling.
//
@@ -516,7 +570,7 @@ void LLApp::setupErrorHandling(bool second_instance)
}
#endif
-#endif
+#endif // LL_WINDOWS
startErrorThread();
}
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index acd829d864..5a4b7f13df 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -30,6 +30,7 @@
#include <map>
#include "llrun.h"
#include "llsd.h"
+
// Forward declarations
template <typename Type> class LLAtomic32;
typedef LLAtomic32<U32> LLAtomicU32;
@@ -39,6 +40,14 @@ class LLLiveFile;
#include <signal.h>
#endif
+// first version of Bugsplat (http://bugsplat.com) crash reporting tool
+// is only supported on Windows - macOS to follow.
+#define BUGSPLAT_ENABLED LL_WINDOWS
+
+#if BUGSPLAT_ENABLED
+class __declspec(dllexport) MiniDmpSender;
+#endif
+
typedef void (*LLAppErrorHandler)();
#if !LL_WINDOWS
@@ -316,7 +325,6 @@ private:
google_breakpad::ExceptionHandler * mExceptionHandler;
-
#if !LL_WINDOWS
friend void default_unix_signal_handler(int signum, siginfo_t *info, void *);
#endif
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 6b16713add..1fd0af0558 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -4,6 +4,7 @@ project(viewer)
include(00-Common)
include(Boost)
+include(bugsplat)
include(BuildPackagesInfo)
include(BuildVersion)
include(CMakeCopyIfDifferent)
@@ -91,6 +92,7 @@ include_directories(
${LIBS_PREBUILT_DIR}/include/collada/1.4
${LLAPPEARANCE_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
+ ${BUGSPLAT_INCLUDE_DIR}
)
include_directories(SYSTEM
@@ -1976,6 +1978,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${LLPHYSICS_LIBRARIES}
${LLPHYSICSEXTENSIONS_LIBRARIES}
${LLAPPEARANCE_LIBRARIES}
+ ${BUGSPLAT_LIBRARIES}
)
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index e823228681..3375d4e071 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -581,6 +581,16 @@ class WindowsManifest(ViewerManifest):
# Hunspell
self.path("libhunspell.dll")
+ # BugSplat
+ if(self.address_size == 64):
+ self.path("BsSndRpt64.exe")
+ self.path("BugSplat64.dll")
+ self.path("BugSplatRc64.dll")
+ else:
+ self.path("BsSndRpt.exe")
+ self.path("BugSplat.dll")
+ self.path("BugSplatRc.dll")
+
# For google-perftools tcmalloc allocator.
try:
if self.args['configuration'].lower() == 'debug':
@@ -590,112 +600,112 @@ class WindowsManifest(ViewerManifest):
except:
print "Skipping libtcmalloc_minimal.dll"
-
self.path(src="licenses-win32.txt", dst="licenses.txt")
self.path("featuretable.txt")
self.path("ca-bundle.crt")
# Media plugins - CEF
- with self.prefix(src='../media_plugins/cef/%s' % self.args['configuration'], dst="llplugin"):
- self.path("media_plugin_cef.dll")
-
- # Media plugins - LibVLC
- with self.prefix(src='../media_plugins/libvlc/%s' % self.args['configuration'], dst="llplugin"):
- self.path("media_plugin_libvlc.dll")
-
- # Media plugins - Example (useful for debugging - not shipped with release viewer)
- if self.channel_type() != 'release':
- with self.prefix(src='../media_plugins/example/%s' % self.args['configuration'], dst="llplugin"):
- self.path("media_plugin_example.dll")
-
- # CEF runtime files - debug
- # CEF runtime files - not debug (release, relwithdebinfo etc.)
- config = 'debug' if self.args['configuration'].lower() == 'debug' else 'release'
- with self.prefix(src=os.path.join(pkgdir, 'bin', config), dst="llplugin"):
- self.path("chrome_elf.dll")
- self.path("d3dcompiler_43.dll")
- self.path("d3dcompiler_47.dll")
- self.path("libcef.dll")
- self.path("libEGL.dll")
- self.path("libGLESv2.dll")
- self.path("dullahan_host.exe")
- self.path("natives_blob.bin")
- self.path("snapshot_blob.bin")
- self.path("widevinecdmadapter.dll")
-
- # MSVC DLLs needed for CEF and have to be in same directory as plugin
- with self.prefix(src=os.path.join(os.pardir, 'sharedlibs', 'Release'), dst="llplugin"):
- self.path("msvcp120.dll")
- self.path("msvcr120.dll")
-
- # CEF files common to all configurations
- with self.prefix(src=os.path.join(pkgdir, 'resources'), dst="llplugin"):
- self.path("cef.pak")
- self.path("cef_100_percent.pak")
- self.path("cef_200_percent.pak")
- self.path("cef_extensions.pak")
- self.path("devtools_resources.pak")
- self.path("icudtl.dat")
-
- with self.prefix(src=os.path.join(pkgdir, 'resources', 'locales'), dst=os.path.join('llplugin', 'locales')):
- self.path("am.pak")
- self.path("ar.pak")
- self.path("bg.pak")
- self.path("bn.pak")
- self.path("ca.pak")
- self.path("cs.pak")
- self.path("da.pak")
- self.path("de.pak")
- self.path("el.pak")
- self.path("en-GB.pak")
- self.path("en-US.pak")
- self.path("es-419.pak")
- self.path("es.pak")
- self.path("et.pak")
- self.path("fa.pak")
- self.path("fi.pak")
- self.path("fil.pak")
- self.path("fr.pak")
- self.path("gu.pak")
- self.path("he.pak")
- self.path("hi.pak")
- self.path("hr.pak")
- self.path("hu.pak")
- self.path("id.pak")
- self.path("it.pak")
- self.path("ja.pak")
- self.path("kn.pak")
- self.path("ko.pak")
- self.path("lt.pak")
- self.path("lv.pak")
- self.path("ml.pak")
- self.path("mr.pak")
- self.path("ms.pak")
- self.path("nb.pak")
- self.path("nl.pak")
- self.path("pl.pak")
- self.path("pt-BR.pak")
- self.path("pt-PT.pak")
- self.path("ro.pak")
- self.path("ru.pak")
- self.path("sk.pak")
- self.path("sl.pak")
- self.path("sr.pak")
- self.path("sv.pak")
- self.path("sw.pak")
- self.path("ta.pak")
- self.path("te.pak")
- self.path("th.pak")
- self.path("tr.pak")
- self.path("uk.pak")
- self.path("vi.pak")
- self.path("zh-CN.pak")
- self.path("zh-TW.pak")
-
- with self.prefix(src=os.path.join(pkgdir, 'bin', 'release'), dst="llplugin"):
- self.path("libvlc.dll")
- self.path("libvlccore.dll")
- self.path("plugins/")
+ with self.prefix(dst="llplugin"):
+ with self.prefix(src='../media_plugins/cef/%s' % self.args['configuration']):
+ self.path("media_plugin_cef.dll")
+
+ # Media plugins - LibVLC
+ with self.prefix(src='../media_plugins/libvlc/%s' % self.args['configuration']):
+ self.path("media_plugin_libvlc.dll")
+
+ # Media plugins - Example (useful for debugging - not shipped with release viewer)
+ if self.channel_type() != 'release':
+ with self.prefix(src='../media_plugins/example/%s' % self.args['configuration']):
+ self.path("media_plugin_example.dll")
+
+ # CEF runtime files - debug
+ # CEF runtime files - not debug (release, relwithdebinfo etc.)
+ config = 'debug' if self.args['configuration'].lower() == 'debug' else 'release'
+ with self.prefix(src=os.path.join(pkgdir, 'bin', config)):
+ self.path("chrome_elf.dll")
+ self.path("d3dcompiler_43.dll")
+ self.path("d3dcompiler_47.dll")
+ self.path("libcef.dll")
+ self.path("libEGL.dll")
+ self.path("libGLESv2.dll")
+ self.path("dullahan_host.exe")
+ self.path("natives_blob.bin")
+ self.path("snapshot_blob.bin")
+ self.path("widevinecdmadapter.dll")
+
+ # MSVC DLLs needed for CEF and have to be in same directory as plugin
+ with self.prefix(src=os.path.join(os.pardir, 'sharedlibs', 'Release')):
+ self.path("msvcp120.dll")
+ self.path("msvcr120.dll")
+
+ # CEF files common to all configurations
+ with self.prefix(src=os.path.join(pkgdir, 'resources')):
+ self.path("cef.pak")
+ self.path("cef_100_percent.pak")
+ self.path("cef_200_percent.pak")
+ self.path("cef_extensions.pak")
+ self.path("devtools_resources.pak")
+ self.path("icudtl.dat")
+
+ with self.prefix(src=os.path.join(pkgdir, 'resources', 'locales'), dst='locales'):
+ self.path("am.pak")
+ self.path("ar.pak")
+ self.path("bg.pak")
+ self.path("bn.pak")
+ self.path("ca.pak")
+ self.path("cs.pak")
+ self.path("da.pak")
+ self.path("de.pak")
+ self.path("el.pak")
+ self.path("en-GB.pak")
+ self.path("en-US.pak")
+ self.path("es-419.pak")
+ self.path("es.pak")
+ self.path("et.pak")
+ self.path("fa.pak")
+ self.path("fi.pak")
+ self.path("fil.pak")
+ self.path("fr.pak")
+ self.path("gu.pak")
+ self.path("he.pak")
+ self.path("hi.pak")
+ self.path("hr.pak")
+ self.path("hu.pak")
+ self.path("id.pak")
+ self.path("it.pak")
+ self.path("ja.pak")
+ self.path("kn.pak")
+ self.path("ko.pak")
+ self.path("lt.pak")
+ self.path("lv.pak")
+ self.path("ml.pak")
+ self.path("mr.pak")
+ self.path("ms.pak")
+ self.path("nb.pak")
+ self.path("nl.pak")
+ self.path("pl.pak")
+ self.path("pt-BR.pak")
+ self.path("pt-PT.pak")
+ self.path("ro.pak")
+ self.path("ru.pak")
+ self.path("sk.pak")
+ self.path("sl.pak")
+ self.path("sr.pak")
+ self.path("sv.pak")
+ self.path("sw.pak")
+ self.path("ta.pak")
+ self.path("te.pak")
+ self.path("th.pak")
+ self.path("tr.pak")
+ self.path("uk.pak")
+ self.path("vi.pak")
+ self.path("zh-CN.pak")
+ self.path("zh-TW.pak")
+
+ with self.prefix(src=os.path.join(pkgdir, 'bin', 'release')):
+ self.path("libvlc.dll")
+ self.path("libvlccore.dll")
+ self.path("plugins/")
# pull in the crash logger and updater from other projects
# tag:"crash-logger" here as a cue to the exporter