diff --git a/autobuild.xml b/autobuild.xml index 691a857d0f1b6b81d421815d070d4f57b5b4f4b2..5712e6a524a5924cbbb0f576e6bc37d24993d891 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -273,60 +273,6 @@ <key>version</key> <string>1.76</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>ae90d19cdcddf539f6d0b41cab12f918</string> - <key>url</key> - <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/72773/702861/bugsplat-1.0.7.552580-darwin64-552580.tar.bz2</string> - </map> - <key>name</key> - <string>darwin64</string> - </map> - <key>windows</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>f5936eceb6a33ff0f1cc31996a40f29c</string> - <key>url</key> - <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/72774/702905/bugsplat-3.6.0.8.552580-windows-552580.tar.bz2</string> - </map> - <key>name</key> - <string>windows</string> - </map> - <key>windows64</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>9cd940754e53e0670030b3da5ba8f373</string> - <key>url</key> - <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/72775/702906/bugsplat-3.6.0.8.552580-windows64-552580.tar.bz2</string> - </map> - <key>name</key> - <string>windows64</string> - </map> - </map> - <key>version</key> - <string>3.6.0.8.552580</string> - </map> <key>colladadom</key> <map> <key>copyright</key> @@ -2439,6 +2385,40 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>version</key> <string>1.0.2u.942</string> </map> + <key>sentry</key> + <map> + <key>canonical_repo</key> + <string>https://git.alchemyviewer.org/alchemy/thirdparty/3p-sentry</string> + <key>copyright</key> + <string>Copyright (c) Sentry</string> + <key>description</key> + <string>The official Sentry SDK for Apple and Native</string> + <key>license</key> + <string>MIT</string> + <key>license_file</key> + <string>LICENSES/sentry.txt</string> + <key>name</key> + <string>sentry</string> + <key>platforms</key> + <map> + <key>darwin64</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>0efba1738965eae8ec392d010e884b3f37d5c1cc803d367c5090909665e087569a39dcc06839dd92d45c7b47ac8afd61</string> + <key>hash_algorithm</key> + <string>sha3_384</string> + <key>url</key> + <string>https://git.alchemyviewer.org/api/v4/projects/164/packages/generic/sentry/1.0.0.1060/sentry-1.0.0-darwin64-1060.tar.xz</string> + </map> + <key>name</key> + <string>darwin64</string> + </map> + </map> + <key>version</key> + <string>1.0.0</string> + </map> <key>slvoice</key> <map> <key>copyright</key> diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 395ed42b5da6c2ecf9a392d5f47b90d69d63300a..3ea2514d95dfb986816c319b583d758fdc5db884 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -24,7 +24,6 @@ if (NOT CMAKE_BUILD_TYPE) endif (NOT CMAKE_BUILD_TYPE) include(Variables) -include(bugsplat) include(BuildVersion) set(LEGACY_STDIO_LIBS) diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index d47ad1fd9334a845c886c368710745649c09ab3d..c441f09ab3827ae4a8aa453b85bb0241c40d3aa4 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -87,6 +87,8 @@ if(NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/ne message(STATUS "Ultimate fallback, revision was blank or not set: will use 0") set(VIEWER_VERSION_REVISION 0) endif("${VIEWER_VERSION_REVISION}" STREQUAL "") + + set(VIEWER_VERSION_AND_CHANNEL "${VIEWER_CHANNEL} ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") endif(NOT DEFINED VIEWER_SHORT_VERSION) if (NOT DEFINED VIEWER_COMMIT_LONG_SHA) diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 37591e94e6c7205ed3608d0aaa6e845fb68d2914..41a6655e3d37d55647ef90802f4ff53539efa66a 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -11,7 +11,6 @@ set(cmake_SOURCE_FILES APR.cmake Audio.cmake Boost.cmake - bugsplat.cmake BuildVersion.cmake CEFPlugin.cmake CEFPlugin.cmake @@ -76,6 +75,7 @@ set(cmake_SOURCE_FILES PulseAudio.cmake Python.cmake SDL2.cmake + Sentry.cmake TemplateCheck.cmake Tut.cmake UI.cmake diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 330f51d17dc7ed01f191007b5d41e30b73fc9ad7..2cfd3ee61b599de5da835d1191f3dc664f32358f 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -1,7 +1,7 @@ # -*- cmake -*- include(00-Common) include(LLTestCommand) -include(bugsplat) +include(Sentry) include(Tut) #***************************************************************************** @@ -84,10 +84,10 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_SOURCE_FILES ${${name}_test_SOURCE_FILES}") ENDIF(LL_TEST_VERBOSE) - if (USE_BUGSPLAT) + if (USE_SENTRY) SET_PROPERTY(SOURCE ${${name}_test_SOURCE_FILES} - APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") - endif (USE_BUGSPLAT) + APPEND PROPERTY COMPILE_DEFINITIONS "${SENTRY_DEFINE}") + endif (USE_SENTRY) # Headers GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES) @@ -232,10 +232,10 @@ FUNCTION(LL_ADD_INTEGRATION_TEST SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}") endif(USESYSTEMLIBS) - if (USE_BUGSPLAT) + if (USE_SENTRY) SET_PROPERTY(SOURCE ${source_files} - APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") - endif (USE_BUGSPLAT) + APPEND PROPERTY COMPILE_DEFINITIONS "${SENTRY_DEFINE}") + endif (USE_SENTRY) # The following was copied to llcorehttp/CMakeLists.txt's texture_load target. # Any changes made here should be replicated there. diff --git a/indra/cmake/Sentry.cmake b/indra/cmake/Sentry.cmake new file mode 100644 index 0000000000000000000000000000000000000000..fc336cb10c25ef3c5e27d2d1e799a8b67534ec15 --- /dev/null +++ b/indra/cmake/Sentry.cmake @@ -0,0 +1,26 @@ +set(USE_SENTRY "Use the Sentry crash reporting system" OFF) + +if (USE_SENTRY) + if (NOT USESYSTEMLIBS) + include(Prebuilt) + use_prebuilt_binary(sentry) + if (WINDOWS) + elseif (DARWIN) + find_library(SENTRY_LIBRARIES Sentry REQUIRED + NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") + else () + message(FATAL_ERROR "Sentry is not supported; add -DUSE_SENTRY=OFF") + endif () + else () + find_package(Sentry REQUIRED) + endif () + + if(DEFINED $ENV{SENTRY_DSN}) + set(SENTRY_DSN $ENV{SENTRY_DSN} CACHE STRING "Sentry DSN" FORCE) + else() + set(SENTRY_DSN "" CACHE STRING "Sentry DSN") + endif() + + set(SENTRY_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/sentry) + set(SENTRY_DEFINE "USE_SENTRY") +endif () diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake deleted file mode 100644 index 4edc4c59cdb630c08a4bf8bb7368979dc5e273fc..0000000000000000000000000000000000000000 --- a/indra/cmake/bugsplat.cmake +++ /dev/null @@ -1,37 +0,0 @@ -if (INSTALL_PROPRIETARY) - # Note that viewer_manifest.py makes decision based on BUGSPLAT_DB and not USE_BUGSPLAT - if (BUGSPLAT_DB) - set(USE_BUGSPLAT ON CACHE BOOL "Use the BugSplat crash reporting system") - else (BUGSPLAT_DB) - set(USE_BUGSPLAT OFF CACHE BOOL "Use the BugSplat crash reporting system") - endif (BUGSPLAT_DB) -else (INSTALL_PROPRIETARY) - set(USE_BUGSPLAT OFF CACHE BOOL "Use the BugSplat crash reporting system") -endif (INSTALL_PROPRIETARY) - -if (USE_BUGSPLAT) - if (NOT USESYSTEMLIBS) - include(Prebuilt) - use_prebuilt_binary(bugsplat) - if (WINDOWS) - set(BUGSPLAT_LIBRARIES - ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib - ) - elseif (DARWIN) - find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED - NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") - else (WINDOWS) - message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF") - endif (WINDOWS) - else (NOT USESYSTEMLIBS) - set(BUGSPLAT_FIND_QUIETLY ON) - set(BUGSPLAT_FIND_REQUIRED ON) - include(FindBUGSPLAT) - endif (NOT USESYSTEMLIBS) - - set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") - - set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat) - set(BUGSPLAT_DEFINE "LL_BUGSPLAT") -endif (USE_BUGSPLAT) - diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index b2da8b8a037bbdac96cd99421b806f81f31c0ba7..d7cc46ef0cc54a821bde70e72ad00b4ad3a2e15f 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -5,10 +5,10 @@ project(llcommon) include(00-Common) include(LLCommon) include(LLMath) -include(bugsplat) include(Linking) include(Abseil) include(Boost) +include(Sentry) include(LLSharedLibs) include(Copy3rdPartyLibs) include(ZLIB) @@ -269,10 +269,10 @@ endif (DARWIN) set_source_files_properties(${llcommon_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -if (USE_BUGSPLAT) +if (USE_SENTRY) set_source_files_properties(${llcommon_SOURCE_FILES} - PROPERTIES COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") -endif (USE_BUGSPLAT) + PROPERTIES COMPILE_DEFINITIONS "${SENTRY_DEFINE}") +endif (USE_SENTRY) list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 2e5628563e687dd004b2f9e4f3241c321b27a248..adcbb2a3a0eccc833ee749886851be8663850c95 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -371,9 +371,9 @@ void LLApp::setupErrorHandling(bool second_instance) // Error handling is done by starting up an error handling thread, which just sleeps and // occasionally checks to see if the app is in an error state, and sees if it needs to be run. -#if LL_WINDOWS +#if defined(LL_WINDOWS) -#if LL_SEND_CRASH_REPORTS && ! defined(LL_BUGSPLAT) +#if LL_SEND_CRASH_REPORTS && ! defined(USE_SENTRY) EnableCrashingOnCrashes(); // This sets a callback to handle w32 signals to the console window. @@ -381,13 +381,6 @@ void LLApp::setupErrorHandling(bool second_instance) SetConsoleCtrlHandler( (PHANDLER_ROUTINE) ConsoleCtrlHandler, TRUE); #endif // LL_SEND_CRASH_REPORTS && ! defined(LL_BUGSPLAT) #else // ! LL_WINDOWS - -#if defined(LL_BUGSPLAT) - // Don't install our own signal handlers -- BugSplat needs to hook them, - // or it's completely ineffectual. - bool installHandler = false; - -#else // ! LL_BUGSPLAT // // Start up signal handling. // @@ -395,58 +388,11 @@ void LLApp::setupErrorHandling(bool second_instance) // thread, asynchronous signals can be delivered to any thread (in theory) // setup_signals(); - - // Add google breakpad exception handler configured for Darwin/Linux. -#endif // ! LL_BUGSPLAT - -#if LL_DARWIN - - bool installHandler = true; - // For the special case of Darwin, we do not want to install the handler if - // the process is being debugged as the app will exit with value ABRT (6) if - // we do. Unfortunately, the code below which performs that test relies on - // the structure kinfo_proc which has been tagged by apple as an unstable - // API. We disable this test for shipping versions to avoid conflicts with - // future releases of Darwin. This test is really only needed for developers - // starting the app from a debugger anyway. - #ifndef LL_RELEASE_FOR_DOWNLOAD - int mib[4]; - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PID; - mib[3] = getpid(); - - struct kinfo_proc info; - memset(&info, 0, sizeof(info)); - - size_t size = sizeof(info); - int result = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0); - if((result == 0) || (errno == ENOMEM)) - { - // P_TRACED flag is set, so this process is being debugged; do not install - // the handler - if(info.kp_proc.p_flag & P_TRACED) installHandler = false; - } - else - { - // Failed to discover if the process is being debugged; default to - // installing the handler. - installHandler = true; - } - #endif // ! LL_RELEASE_FOR_DOWNLOAD - - if(installHandler) - { - } -#elif LL_LINUX - -#endif // LL_LINUX - #endif // ! LL_WINDOWS -#ifdef LL_BUGSPLAT +#if defined(USE_SENTRY) // do not start our own error thread -#else // ! LL_BUGSPLAT +#else // ! USE_SENTRY startErrorThread(); #endif } @@ -690,17 +636,21 @@ void setup_signals() act.sa_flags = SA_SIGINFO; // Synchronous signals -# ifndef LL_BUGSPLAT +#if !defined(USE_SENTRY) sigaction(SIGABRT, &act, NULL); -# endif +#endif sigaction(SIGALRM, &act, NULL); +#if !defined(USE_SENTRY) sigaction(SIGBUS, &act, NULL); sigaction(SIGFPE, &act, NULL); - sigaction(SIGHUP, &act, NULL); +#endif + sigaction(SIGHUP, &act, NULL); +#if !defined(USE_SENTRY) sigaction(SIGILL, &act, NULL); sigaction(SIGPIPE, &act, NULL); sigaction(SIGSEGV, &act, NULL); sigaction(SIGSYS, &act, NULL); +#endif sigaction(LL_HEARTBEAT_SIGNAL, &act, NULL); sigaction(LL_SMACKDOWN_SIGNAL, &act, NULL); @@ -729,17 +679,21 @@ void clear_signals() act.sa_flags = SA_SIGINFO; // Synchronous signals -# ifndef LL_BUGSPLAT +#if !defined(USE_SENTRY) sigaction(SIGABRT, &act, NULL); -# endif +#endif sigaction(SIGALRM, &act, NULL); +#if !defined(USE_SENTRY) sigaction(SIGBUS, &act, NULL); sigaction(SIGFPE, &act, NULL); - sigaction(SIGHUP, &act, NULL); +#endif + sigaction(SIGHUP, &act, NULL); +#if !defined(USE_SENTRY) sigaction(SIGILL, &act, NULL); sigaction(SIGPIPE, &act, NULL); sigaction(SIGSEGV, &act, NULL); sigaction(SIGSYS, &act, NULL); +#endif sigaction(LL_HEARTBEAT_SIGNAL, &act, NULL); sigaction(LL_SMACKDOWN_SIGNAL, &act, NULL); diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index c7014ba498b5cf32980cb0cff652f730ed2bf405..11d2fd76962fb1370c7d18cb69b3cf8cee7c5c83 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -12,7 +12,6 @@ include(LLAddBuildTest) include(LLMessage) include(LLCommon) include(Tut) -include(bugsplat) include_directories (${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index de090d1bb14b85aee231f87de68a82740b42a72c..e7dd2c438a0594a17593a449dcba79da62513aac 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -12,7 +12,6 @@ include(LLImageJ2COJ) include(WebP) include(ZLIB) include(LLAddBuildTest) -include(bugsplat) include(Tut) include_directories( diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index c1b1094f81f37b63d0448c3d6e4987896f6cc803..c76da2a6158f6bfbdb2e84c37849c7d2354f15d1 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -5,7 +5,6 @@ project(llmath) include(00-Common) include(LLCommon) include(LLMath) -include(bugsplat) include(Boost) include_directories( diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a81d3c33758d727bc91559b039c3db6b69794fc3..3da0d399a599850fb2c061f7d5839434d067de49 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -9,7 +9,6 @@ include(Linking) include(Abseil) include(Boost) -include(bugsplat) include(BuildPackagesInfo) include(BuildVersion) include(CMakeCopyIfDifferent) @@ -47,6 +46,7 @@ include(OPENAL) include(OpenGL) include(OpenSSL) include(PNG) +include(Sentry) include(TemplateCheck) include(UI) include(UnixInstall) @@ -108,11 +108,11 @@ include_directories(SYSTEM ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} ) -if (USE_BUGSPLAT) +if (USE_SENTRY) include_directories(AFTER - ${BUGSPLAT_INCLUDE_DIR} + ${SENTRY_INCLUDE_DIRS} ) -endif (USE_BUGSPLAT) +endif (USE_SENTRY) set(viewer_SOURCE_FILES alcinematicmode.cpp @@ -1510,12 +1510,6 @@ if (DARWIN) ${COREAUDIO_LIBRARY} ) - if (USE_BUGSPLAT) - list(APPEND viewer_LIBRARIES - ${BUGSPLAT_LIBRARIES} - ) - endif (USE_BUGSPLAT) - # Add resource files to the project. set(viewer_RESOURCE_FILES macview.r @@ -1809,10 +1803,15 @@ if (SDL_FOUND) ) endif (SDL_FOUND) -if (USE_BUGSPLAT) +if (USE_SENTRY) set_property(TARGET ${VIEWER_BINARY_NAME} - PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") -endif (USE_BUGSPLAT) + PROPERTY COMPILE_DEFINITIONS "${SENTRY_DEFINE}") + if (USE_SENTRY) + list(APPEND viewer_LIBRARIES + ${SENTRY_LIBRARIES} + ) + endif () +endif (USE_SENTRY) # add package files file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST @@ -2158,12 +2157,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} fmt::fmt ) -if (USE_BUGSPLAT) - target_link_libraries(${VIEWER_BINARY_NAME} - ${BUGSPLAT_LIBRARIES} - ) -endif (USE_BUGSPLAT) - set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to artwork files.") diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index ec685b63e0eec9130931f5a61e719e54deb17c59..8ad84e2eccd8bea231c51941f2c4fa702bcab23d 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -25,16 +25,12 @@ */ #import "llappdelegate-objc.h" -#if defined(LL_BUGSPLAT) -#include <boost/filesystem.hpp> -#include <vector> -@import BugsplatMac; -// derived from BugsplatMac's BugsplatTester/AppDelegate.m -@interface LLAppDelegate () <BugsplatStartupManagerDelegate> -@end +#if defined(USE_SENTRY) +#import "Sentry.h" #endif #include "llwindowmacosx-objc.h" #include "llappviewermacosx-for-objc.h" +#include "llviewerbuildconfig.h" #include <Carbon/Carbon.h> // Used for Text Input Services ("Safe" API - it's supported) @implementation LLAppDelegate @@ -60,18 +56,15 @@ // initialized, "played back" into whatever handlers have been set up. constructViewer(); -#if defined(LL_BUGSPLAT) - infos("bugsplat setup"); - // Engage BugsplatStartupManager *before* calling initViewer() to handle - // any crashes during initialization. - // https://www.bugsplat.com/docs/platforms/os-x#initialization - [BugsplatStartupManager sharedManager].autoSubmitCrashReport = YES; - [BugsplatStartupManager sharedManager].askUserDetails = NO; - [BugsplatStartupManager sharedManager].delegate = self; - [[BugsplatStartupManager sharedManager] start]; +#if defined(USE_SENTRY) + [SentrySDK startWithConfigureOptions:^(SentryOptions *options) { + options.dsn = @SENTRY_DSN; + options.debug = YES; // Enabled debug when first installing is always helpful + options.releaseName = @LL_VIEWER_CHANNEL_AND_VERSION; + options.enableOutOfMemoryTracking = NO; + }]; #endif - infos("post-bugsplat setup"); - + frameTimer = nil; [self languageUpdated]; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 54b4ee08215be02ea9e0d33fb2f8e5703fdc0753..3a2b4f60ad3ef7ea4e9d80edddf8d83e55e05d39 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -739,14 +739,10 @@ LLAppViewer::LLAppViewer() // from the previous viewer run between this constructor call and the // init() call, which will overwrite the static_debug_info.log file for // THIS run. So setDebugFileNames() early. -# ifdef LL_BUGSPLAT + // MAINT-8917: don't create a dump directory just for the // static_debug_info.log file std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); -# else // ! LL_BUGSPLAT - // write Google Breakpad minidump files to a per-run dump directory to avoid multiple viewer issues. - std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, ""); -# endif // ! LL_BUGSPLAT setDebugFileNames(logdir); } @@ -3479,18 +3475,9 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["MainloopThreadID"] = (S32)thread_id; #endif -#ifndef LL_BUGSPLAT - // "CrashNotHandled" is set here, while things are running well, - // in case of a freeze. If there is a freeze, the crash logger will be launched - // and can read this value from the debug_info.log. - // If the crash is handled by LLAppViewer::handleViewerCrash, ie not a freeze, - // then the value of "CrashNotHandled" will be set to true. - gDebugInfo["CrashNotHandled"] = LLSD::Boolean(true); -#else // LL_BUGSPLAT // "CrashNotHandled" is obsolete; it used (not very successsfully) // to try to distinguish crashes from freezes - the intent here to to avoid calling it a freeze gDebugInfo["CrashNotHandled"] = LLSD::Boolean(false); -#endif // ! LL_BUGSPLAT // Insert crash host url (url to post crash log to) if configured. This insures // that the crash report will go to the proper location in the case of a diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 68c7c59b8dcab93031e8330a361b458b4e592093..68d4c6c8042adb7678191aaac76a6e3c6d3a2ec0 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -311,18 +311,22 @@ bool LLAppViewerMacOSX::restoreErrorTrap() #define SET_SIG(SIGNAL) sigaction(SIGNAL, &act, &old_act); \ if(act.sa_sigaction != old_act.sa_sigaction) ++reset_count; // Synchronous signals -# ifndef LL_BUGSPLAT +#if !defined(USE_SENTRY) SET_SIG(SIGABRT) // let bugsplat catch this -# endif +#endif SET_SIG(SIGALRM) +#if !defined(USE_SENTRY) SET_SIG(SIGBUS) SET_SIG(SIGFPE) - SET_SIG(SIGHUP) +#endif + SET_SIG(SIGHUP) +#if !defined(USE_SENTRY) SET_SIG(SIGILL) SET_SIG(SIGPIPE) SET_SIG(SIGSEGV) SET_SIG(SIGSYS) - +#endif + SET_SIG(LL_HEARTBEAT_SIGNAL) SET_SIG(LL_SMACKDOWN_SIGNAL) @@ -344,8 +348,8 @@ bool LLAppViewerMacOSX::restoreErrorTrap() void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze) { -#if defined LL_BUGSPLAT - LL_DEBUGS("InitOSX", "Bugsplat") << "using BugSplat crash logger" << LL_ENDL; +#if defined(USE_SENTRY) + LL_DEBUGS("InitOSX", "Sentry") << "using Sentry crash logger" << LL_ENDL; #else LL_DEBUGS("InitOSX") << "No crash logger enabled" << LL_ENDL; #endif // ! LL_BUGSPLAT diff --git a/indra/newview/llviewerbuildconfig.h.in b/indra/newview/llviewerbuildconfig.h.in index c4e72b06dd2c6bbec4018026781847f131621d2f..09e01a0fcf210e277d3a33ed654fcab576b8a2de 100644 --- a/indra/newview/llviewerbuildconfig.h.in +++ b/indra/newview/llviewerbuildconfig.h.in @@ -37,11 +37,15 @@ // Version Information #define LL_VIEWER_CHANNEL "@VIEWER_CHANNEL@" #define LL_VIEWER_CHANNEL_CODENAME "@VIEWER_CHANNEL_CODENAME_INTERNAL@" +#define LL_VIEWER_CHANNEL_AND_VERSION "@VIEWER_VERSION_AND_CHANNEL@" #define LL_VIEWER_VERSION_MAJOR @VIEWER_VERSION_MAJOR@ #define LL_VIEWER_VERSION_MINOR @VIEWER_VERSION_MINOR@ #define LL_VIEWER_VERSION_PATCH @VIEWER_VERSION_PATCH@ #define LL_VIEWER_VERSION_BUILD @VIEWER_VERSION_REVISION@ +// Sentry +#define SENTRY_DSN "@SENTRY_DSN@" + // Graphics Utils #cmakedefine01 USE_NVAPI diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 451fc1967e8a8c46e761b613293ee404eb1f79c5..2c78360eb4ec068fc503c9f2f571441f74411b03 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -3,6 +3,7 @@ project (lltest) include(00-Common) +include(Sentry) include(LLCommon) include(LLCoreHttp) include(LLInventory) @@ -13,7 +14,7 @@ include(LLXML) include(Linking) include(Tut) include(LLAddBuildTest) -include(bugsplat) + include_directories( ${LLCOMMON_INCLUDE_DIRS} ${LLCOREHTTP_INCLUDE_DIRS} @@ -80,9 +81,9 @@ list(APPEND test_SOURCE_FILES ${test_HEADER_FILES}) add_executable(lltest ${test_SOURCE_FILES}) -if (USE_BUGSPLAT) - set_target_properties(lltest PROPERTIES COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") -endif (USE_BUGSPLAT) +if (USE_SENTRY) + set_target_properties(lltest PROPERTIES COMPILE_DEFINITIONS "${SENTRY_DEFINE}") +endif (USE_SENTRY) target_link_libraries(lltest ${LEGACY_STDIO_LIBS}