Merge branch 'master' into DRTVWR-522-maint
# Conflicts: # doc/contributions.txt # indra/newview/llappcorehttp.cpp # indra/newview/llappcorehttp.hmaster
commit
2ded530f93
|
|
@ -2187,18 +2187,18 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>40a87f5d505a141b2ec79513a6197c35</string>
|
||||
<string>0a6349b11c8e9d34f0c80b8081736e75</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>md5</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/76516/728250/llca-202102021657.555615-common-555615.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/79438/751815/llca-202104010215.557744-common-557744.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>common</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>202102021657.555615</string>
|
||||
<string>202104010215.557744</string>
|
||||
</map>
|
||||
<key>llphysicsextensions_source</key>
|
||||
<map>
|
||||
|
|
|
|||
22
build.sh
22
build.sh
|
|
@ -129,11 +129,6 @@ pre_build()
|
|||
then # show that we're doing this, just not the contents
|
||||
echo source "$bugsplat_sh"
|
||||
source "$bugsplat_sh"
|
||||
# important: we test this and use its value in [grand-]child processes
|
||||
if [ -n "${BUGSPLAT_DB:-}" ]
|
||||
then echo export BUGSPLAT_DB
|
||||
export BUGSPLAT_DB
|
||||
fi
|
||||
fi
|
||||
set -x
|
||||
|
||||
|
|
@ -429,6 +424,15 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Some of the uploads takes a long time to finish in the codeticket backend,
|
||||
# causing the next codeticket upload attempt to fail.
|
||||
# Inserting this after each potentially large upload may prevent those errors.
|
||||
# JJ is making changes to Codeticket that we hope will eliminate this failure, then this can be removed
|
||||
wait_for_codeticket()
|
||||
{
|
||||
sleep $(( 60 * 6 ))
|
||||
}
|
||||
|
||||
# check status and upload results to S3
|
||||
if $succeeded
|
||||
then
|
||||
|
|
@ -445,6 +449,7 @@ then
|
|||
# Upload base package.
|
||||
python_cmd "$helpers/codeticket.py" addoutput Installer "$package" \
|
||||
|| fatal "Upload of installer failed"
|
||||
wait_for_codeticket
|
||||
|
||||
# Upload additional packages.
|
||||
for package_id in $additional_packages
|
||||
|
|
@ -454,6 +459,7 @@ then
|
|||
then
|
||||
python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \
|
||||
|| fatal "Upload of installer $package_id failed"
|
||||
wait_for_codeticket
|
||||
else
|
||||
record_failure "Failed to find additional package for '$package_id'."
|
||||
fi
|
||||
|
|
@ -467,6 +473,7 @@ then
|
|||
# Upload crash reporter file
|
||||
python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \
|
||||
|| fatal "Upload of symbolfile failed"
|
||||
wait_for_codeticket
|
||||
fi
|
||||
|
||||
# Upload the llphysicsextensions_tpv package, if one was produced
|
||||
|
|
@ -474,6 +481,9 @@ then
|
|||
if [ -r "$build_dir/llphysicsextensions_package" ]
|
||||
then
|
||||
llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package)
|
||||
# This next upload is a frequent failure; see if giving the last one some time helps
|
||||
# JJ is making changes to Codeticket that we hope will eliminate this failure soon
|
||||
sleep 300
|
||||
python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \
|
||||
|| fatal "Upload of physics extensions package failed"
|
||||
fi
|
||||
|
|
@ -486,6 +496,7 @@ then
|
|||
begin_section "Upload Extension $extension"
|
||||
. $extension
|
||||
[ $? -eq 0 ] || fatal "Upload of extension $extension failed"
|
||||
wait_for_codeticket
|
||||
end_section "Upload Extension $extension"
|
||||
done
|
||||
fi
|
||||
|
|
@ -495,7 +506,6 @@ then
|
|||
record_event "skipping upload of installer"
|
||||
fi
|
||||
|
||||
|
||||
else
|
||||
record_event "skipping upload of installer due to failed build"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -226,6 +226,7 @@ Ansariel Hiller
|
|||
SL-13364
|
||||
SL-13858
|
||||
SL-13697
|
||||
SL-13395
|
||||
SL-3136
|
||||
Aralara Rajal
|
||||
Arare Chantilly
|
||||
|
|
@ -268,6 +269,7 @@ Beq Janus
|
|||
SL-11300
|
||||
SL-13583
|
||||
SL-14766
|
||||
SL-14927
|
||||
SL-11300
|
||||
Beth Walcher
|
||||
Bezilon Kasei
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ project(${ROOT_PROJECT_NAME})
|
|||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include(Variables)
|
||||
include(bugsplat)
|
||||
include(BuildVersion)
|
||||
|
||||
set(LEGACY_STDIO_LIBS)
|
||||
|
|
@ -50,7 +51,10 @@ endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
|
|||
|
||||
add_custom_target(viewer)
|
||||
|
||||
if (NOT USE_BUGSPLAT)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
|
||||
endif (NOT USE_BUGSPLAT)
|
||||
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
|
||||
|
|
@ -64,29 +68,18 @@ add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
|
|||
endif (ENABLE_MEDIA_PLUGINS)
|
||||
|
||||
if (LINUX)
|
||||
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
|
||||
if (INSTALL_PROPRIETARY)
|
||||
include(LLAppearanceUtility)
|
||||
add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
|
||||
endif (INSTALL_PROPRIETARY)
|
||||
add_dependencies(viewer linux-crash-logger-strip-target)
|
||||
elseif (DARWIN)
|
||||
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
|
||||
add_dependencies(viewer mac-crash-logger)
|
||||
elseif (WINDOWS)
|
||||
add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
|
||||
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
|
||||
if (EXISTS ${VIEWER_DIR}win_setup)
|
||||
add_subdirectory(${VIEWER_DIR}win_setup)
|
||||
endif (EXISTS ${VIEWER_DIR}win_setup)
|
||||
# add_dependencies(viewer windows-setup windows-crash-logger)
|
||||
add_dependencies(viewer windows-crash-logger)
|
||||
endif (LINUX)
|
||||
|
||||
add_subdirectory(${VIEWER_PREFIX}newview)
|
||||
add_dependencies(viewer secondlife-bin)
|
||||
|
||||
add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL)
|
||||
if (WINDOWS)
|
||||
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
|
||||
if (EXISTS ${VIEWER_DIR}win_setup)
|
||||
add_subdirectory(${VIEWER_DIR}win_setup)
|
||||
endif (EXISTS ${VIEWER_DIR}win_setup)
|
||||
endif (WINDOWS)
|
||||
|
||||
# sets the 'startup project' for debugging from visual studio.
|
||||
set_property(
|
||||
|
|
@ -94,6 +87,32 @@ set_property(
|
|||
PROPERTY VS_STARTUP_PROJECT secondlife-bin
|
||||
)
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
if (BUGSPLAT_DB)
|
||||
message(STATUS "Building with BugSplat; database '${BUGSPLAT_DB}'")
|
||||
else (BUGSPLAT_DB)
|
||||
message(WARNING "Building with BugSplat, but no database name set (BUGSPLAT_DB)")
|
||||
endif (BUGSPLAT_DB)
|
||||
else (USE_BUGSPLAT)
|
||||
message(STATUS "Not building with BugSplat")
|
||||
if (LINUX)
|
||||
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
|
||||
add_dependencies(viewer linux-crash-logger-strip-target)
|
||||
elseif (DARWIN)
|
||||
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
|
||||
add_dependencies(viewer mac-crash-logger)
|
||||
elseif (WINDOWS)
|
||||
add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
|
||||
# add_dependencies(viewer windows-setup windows-crash-logger)
|
||||
add_dependencies(viewer windows-crash-logger)
|
||||
endif (LINUX)
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
add_subdirectory(${VIEWER_PREFIX}newview)
|
||||
add_dependencies(viewer secondlife-bin)
|
||||
|
||||
add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL)
|
||||
|
||||
if (LL_TESTS)
|
||||
# Define after the custom targets are created so
|
||||
# individual apps can add themselves as dependencies
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ if(WINDOWS)
|
|||
|
||||
# Filenames are different for 32/64 bit BugSplat file and we don't
|
||||
# have any control over them so need to branch.
|
||||
if (BUGSPLAT_DB)
|
||||
if (USE_BUGSPLAT)
|
||||
if(ADDRESS_SIZE EQUAL 32)
|
||||
set(release_files ${release_files} BugSplat.dll)
|
||||
set(release_files ${release_files} BugSplatRc.dll)
|
||||
|
|
@ -76,7 +76,7 @@ if(WINDOWS)
|
|||
set(release_files ${release_files} BugSplatRc64.dll)
|
||||
set(release_files ${release_files} BsSndRpt64.exe)
|
||||
endif(ADDRESS_SIZE EQUAL 32)
|
||||
endif (BUGSPLAT_DB)
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
if (FMODSTUDIO)
|
||||
set(debug_files ${debug_files} fmodL.dll)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
include(00-Common)
|
||||
include(LLTestCommand)
|
||||
include(GoogleMock)
|
||||
include(bugsplat)
|
||||
include(Tut)
|
||||
|
||||
#*****************************************************************************
|
||||
|
|
@ -22,7 +23,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
|
|||
# there is another branch that will conflict heavily with any changes here.
|
||||
INCLUDE(GoogleMock)
|
||||
|
||||
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
|
|
@ -87,6 +87,12 @@ INCLUDE(GoogleMock)
|
|||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_SOURCE_FILES ${${name}_test_SOURCE_FILES}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
SET_PROPERTY(SOURCE ${${name}_test_SOURCE_FILES}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
# Headers
|
||||
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES)
|
||||
SET(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES})
|
||||
|
|
@ -224,6 +230,11 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
|
|||
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
|
||||
endif(USESYSTEMLIBS)
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
SET_PROPERTY(SOURCE ${source_files}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
# The following was copied to llcorehttp/CMakeLists.txt's texture_load target.
|
||||
# Any changes made here should be replicated there.
|
||||
if (WINDOWS)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ set(LL_TESTS ON CACHE BOOL "Build and run unit and integration tests (disable fo
|
|||
set(INCREMENTAL_LINK OFF CACHE BOOL "Use incremental linking on win32 builds (enable for faster links on some machines)")
|
||||
set(ENABLE_MEDIA_PLUGINS ON CACHE BOOL "Turn off building media plugins if they are imported by third-party library mechanism")
|
||||
set(VIEWER_SYMBOL_FILE "" CACHE STRING "Name of tarball into which to place symbol files")
|
||||
set(BUGSPLAT_DB "" CACHE STRING "BugSplat database name, if BugSplat crash reporting is desired")
|
||||
|
||||
if(LIBS_CLOSED_DIR)
|
||||
file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR)
|
||||
|
|
|
|||
|
|
@ -1,25 +1,37 @@
|
|||
# BugSplat is engaged by setting BUGSPLAT_DB to the target BugSplat database
|
||||
# name.
|
||||
if (BUGSPLAT_DB)
|
||||
if (USESYSTEMLIBS)
|
||||
message(STATUS "Looking for system BugSplat")
|
||||
set(BUGSPLAT_FIND_QUIETLY ON)
|
||||
set(BUGSPLAT_FIND_REQUIRED ON)
|
||||
include(FindBUGSPLAT)
|
||||
else (USESYSTEMLIBS)
|
||||
message(STATUS "Engaging autobuild BugSplat")
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(bugsplat)
|
||||
if (WINDOWS)
|
||||
set(BUGSPLAT_LIBRARIES
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
|
||||
)
|
||||
elseif (DARWIN)
|
||||
find_library(BUGSPLAT_LIBRARIES BugsplatMac
|
||||
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
else (WINDOWS)
|
||||
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")
|
||||
|
||||
endif (WINDOWS)
|
||||
set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat)
|
||||
endif (USESYSTEMLIBS)
|
||||
endif (BUGSPLAT_DB)
|
||||
set(BUGSPLAT_DEFINE "LL_BUGSPLAT")
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
This component is no longer used in Linden Lab builds.
|
||||
Change requests to support continued use by open source
|
||||
builds are welcome.
|
||||
|
|
@ -4,6 +4,7 @@ project(llcommon)
|
|||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(bugsplat)
|
||||
include(Linking)
|
||||
include(Boost)
|
||||
include(LLSharedLibs)
|
||||
|
|
@ -260,10 +261,10 @@ set(llcommon_HEADER_FILES
|
|||
set_source_files_properties(${llcommon_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
if (BUGSPLAT_DB)
|
||||
set_source_files_properties(llapp.cpp
|
||||
PROPERTIES COMPILE_DEFINITIONS "LL_BUGSPLAT")
|
||||
endif (BUGSPLAT_DB)
|
||||
if (USE_BUGSPLAT)
|
||||
set_source_files_properties(${llcommon_SOURCE_FILES}
|
||||
PROPERTIES COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
|
||||
|
||||
|
|
|
|||
|
|
@ -528,7 +528,12 @@ void LLApp::setupErrorHandling(bool second_instance)
|
|||
#endif // LL_LINUX
|
||||
|
||||
#endif // ! LL_WINDOWS
|
||||
|
||||
#ifdef LL_BUGSPLAT
|
||||
// do not start our own error thread
|
||||
#else // ! LL_BUGSPLAT
|
||||
startErrorThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
void LLApp::startErrorThread()
|
||||
|
|
@ -808,7 +813,9 @@ void setup_signals()
|
|||
act.sa_flags = SA_SIGINFO;
|
||||
|
||||
// Synchronous signals
|
||||
# ifndef LL_BUGSPLAT
|
||||
sigaction(SIGABRT, &act, NULL);
|
||||
# endif
|
||||
sigaction(SIGALRM, &act, NULL);
|
||||
sigaction(SIGBUS, &act, NULL);
|
||||
sigaction(SIGFPE, &act, NULL);
|
||||
|
|
@ -845,7 +852,9 @@ void clear_signals()
|
|||
act.sa_flags = SA_SIGINFO;
|
||||
|
||||
// Synchronous signals
|
||||
# ifndef LL_BUGSPLAT
|
||||
sigaction(SIGABRT, &act, NULL);
|
||||
# endif
|
||||
sigaction(SIGALRM, &act, NULL);
|
||||
sigaction(SIGBUS, &act, NULL);
|
||||
sigaction(SIGFPE, &act, NULL);
|
||||
|
|
@ -898,6 +907,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
|
|||
|
||||
return;
|
||||
case SIGABRT:
|
||||
// Note that this handler is not set for SIGABRT when using Bugsplat
|
||||
// Abort just results in termination of the app, no funky error handling.
|
||||
if (LLApp::sLogInSignal)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -259,6 +259,10 @@ public:
|
|||
*/
|
||||
LLRunner& getRunner() { return mRunner; }
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
virtual void reportCrashToBugsplat(void* pExcepInfo /*EXCEPTION_POINTERS*/) { }
|
||||
#endif
|
||||
|
||||
public:
|
||||
typedef std::map<std::string, std::string> string_map;
|
||||
string_map mOptionMap; // Contains all command-line options and arguments in a map
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@
|
|||
#include "stringize.h"
|
||||
#include "llexception.h"
|
||||
|
||||
#if LL_WINDOWS
|
||||
#include <excpt.h>
|
||||
#endif
|
||||
|
||||
// static
|
||||
LLCoros::CoroData& LLCoros::get_CoroData(const std::string& caller)
|
||||
{
|
||||
|
|
@ -249,29 +253,58 @@ std::string LLCoros::launch(const std::string& prefix, const callable_t& callabl
|
|||
|
||||
#if LL_WINDOWS
|
||||
|
||||
void LLCoros::winlevel(const callable_t& callable)
|
||||
static const U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific
|
||||
|
||||
U32 cpp_exception_filter(U32 code, struct _EXCEPTION_POINTERS *exception_infop, const std::string& name)
|
||||
{
|
||||
// C++ exceptions were logged in toplevelTryWrapper, but not SEH
|
||||
// log SEH exceptions here, to make sure it gets into bugsplat's
|
||||
// report and because __try won't allow std::string operations
|
||||
if (code != STATUS_MSC_EXCEPTION)
|
||||
{
|
||||
LL_WARNS() << "SEH crash in " << name << ", code: " << code << LL_ENDL;
|
||||
}
|
||||
// Handle bugsplat here, since GetExceptionInformation() can only be
|
||||
// called from within filter for __except(filter), not from __except's {}
|
||||
// Bugsplat should get all exceptions, C++ and SEH
|
||||
LLApp::instance()->reportCrashToBugsplat(exception_infop);
|
||||
|
||||
// Only convert non C++ exceptions.
|
||||
if (code == STATUS_MSC_EXCEPTION)
|
||||
{
|
||||
// C++ exception, go on
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
else
|
||||
{
|
||||
// handle it
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
}
|
||||
|
||||
void LLCoros::winlevel(const std::string& name, const callable_t& callable)
|
||||
{
|
||||
__try
|
||||
{
|
||||
callable();
|
||||
toplevelTryWrapper(name, callable);
|
||||
}
|
||||
__except (msc_exception_filter(GetExceptionCode(), GetExceptionInformation()))
|
||||
__except (cpp_exception_filter(GetExceptionCode(), GetExceptionInformation(), name))
|
||||
{
|
||||
// convert to C++ styled exception
|
||||
// convert to C++ styled exception for handlers other than bugsplat
|
||||
// Note: it might be better to use _se_set_translator
|
||||
// if you want exception to inherit full callstack
|
||||
char integer_string[32];
|
||||
sprintf(integer_string, "SEH, code: %lu\n", GetExceptionCode());
|
||||
//
|
||||
// in case of bugsplat this will get to exceptionTerminateHandler and
|
||||
// looks like fiber will terminate application after that
|
||||
char integer_string[512];
|
||||
sprintf(integer_string, "SEH crash in %s, code: %lu\n", name.c_str(), GetExceptionCode());
|
||||
throw std::exception(integer_string);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Top-level wrapper around caller's coroutine callable.
|
||||
// Normally we like to pass strings and such by const reference -- but in this
|
||||
// case, we WANT to copy both the name and the callable to our local stack!
|
||||
void LLCoros::toplevel(std::string name, callable_t callable)
|
||||
void LLCoros::toplevelTryWrapper(const std::string& name, const callable_t& callable)
|
||||
{
|
||||
// keep the CoroData on this top-level function's stack frame
|
||||
CoroData corodata(name);
|
||||
|
|
@ -281,16 +314,12 @@ void LLCoros::toplevel(std::string name, callable_t callable)
|
|||
// run the code the caller actually wants in the coroutine
|
||||
try
|
||||
{
|
||||
#if LL_WINDOWS && LL_RELEASE_FOR_DOWNLOAD
|
||||
winlevel(callable);
|
||||
#else
|
||||
callable();
|
||||
#endif
|
||||
}
|
||||
catch (const Stop& exc)
|
||||
{
|
||||
LL_INFOS("LLCoros") << "coroutine " << name << " terminating because "
|
||||
<< exc.what() << LL_ENDL;
|
||||
<< exc.what() << LL_ENDL;
|
||||
}
|
||||
catch (const LLContinueError&)
|
||||
{
|
||||
|
|
@ -303,10 +332,25 @@ void LLCoros::toplevel(std::string name, callable_t callable)
|
|||
{
|
||||
// Any OTHER kind of uncaught exception will cause the viewer to
|
||||
// crash, hopefully informatively.
|
||||
CRASH_ON_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << name));
|
||||
LOG_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << name));
|
||||
// to not modify callstack
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
// Top-level wrapper around caller's coroutine callable.
|
||||
// Normally we like to pass strings and such by const reference -- but in this
|
||||
// case, we WANT to copy both the name and the callable to our local stack!
|
||||
void LLCoros::toplevel(std::string name, callable_t callable)
|
||||
{
|
||||
#if LL_WINDOWS
|
||||
// Can not use __try in functions that require unwinding, so use one more wrapper
|
||||
winlevel(name, callable);
|
||||
#else
|
||||
toplevelTryWrapper(name, callable);
|
||||
#endif
|
||||
}
|
||||
|
||||
//static
|
||||
void LLCoros::checkStop()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -290,11 +290,12 @@ public:
|
|||
|
||||
private:
|
||||
std::string generateDistinctName(const std::string& prefix) const;
|
||||
#if LL_WINDOWS
|
||||
void winlevel(const std::string& name, const callable_t& callable);
|
||||
#endif
|
||||
void toplevelTryWrapper(const std::string& name, const callable_t& callable);
|
||||
void toplevel(std::string name, callable_t callable);
|
||||
struct CoroData;
|
||||
#if LL_WINDOWS
|
||||
static void winlevel(const callable_t& callable);
|
||||
#endif
|
||||
static CoroData& get_CoroData(const std::string& caller);
|
||||
|
||||
S32 mStackSize;
|
||||
|
|
|
|||
|
|
@ -442,8 +442,6 @@ namespace
|
|||
protected:
|
||||
Globals();
|
||||
public:
|
||||
std::ostringstream messageStream;
|
||||
bool messageStreamInUse;
|
||||
std::string mFatalMessage;
|
||||
|
||||
void addCallSite(LLError::CallSite&);
|
||||
|
|
@ -453,12 +451,7 @@ namespace
|
|||
CallSiteVector callSites;
|
||||
};
|
||||
|
||||
Globals::Globals()
|
||||
: messageStream(),
|
||||
messageStreamInUse(false),
|
||||
callSites()
|
||||
{
|
||||
}
|
||||
Globals::Globals() {}
|
||||
|
||||
Globals* Globals::getInstance()
|
||||
{
|
||||
|
|
@ -549,7 +542,7 @@ namespace LLError
|
|||
mFileLevelMap(),
|
||||
mTagLevelMap(),
|
||||
mUniqueLogMessages(),
|
||||
mCrashFunction(NULL),
|
||||
mCrashFunction([](const std::string&){}),
|
||||
mTimeFunction(NULL),
|
||||
mRecorders(),
|
||||
mShouldLogCallCounter(0)
|
||||
|
|
@ -728,7 +721,6 @@ namespace
|
|||
LLError::setDefaultLevel(LLError::LEVEL_INFO);
|
||||
LLError::setAlwaysFlush(true);
|
||||
LLError::setEnabledLogTypesMask(0xFFFFFFFF);
|
||||
LLError::setFatalFunction(LLError::crashAndLoop);
|
||||
LLError::setTimeFunction(LLError::utcTime);
|
||||
|
||||
// log_to_stderr is only false in the unit and integration tests to keep builds quieter
|
||||
|
|
@ -1360,57 +1352,7 @@ namespace LLError
|
|||
}
|
||||
|
||||
|
||||
std::ostringstream* Log::out()
|
||||
{
|
||||
LLMutexTrylock lock(getMutex<LOG_MUTEX>(),5);
|
||||
|
||||
if (lock.isLocked())
|
||||
{
|
||||
Globals* g = Globals::getInstance();
|
||||
|
||||
if (!g->messageStreamInUse)
|
||||
{
|
||||
g->messageStreamInUse = true;
|
||||
return &g->messageStream;
|
||||
}
|
||||
}
|
||||
|
||||
return new std::ostringstream;
|
||||
}
|
||||
|
||||
void Log::flush(std::ostringstream* out, char* message)
|
||||
{
|
||||
LLMutexTrylock lock(getMutex<LOG_MUTEX>(),5);
|
||||
if (!lock.isLocked())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(strlen(out->str().c_str()) < 128)
|
||||
{
|
||||
strcpy(message, out->str().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy(message, out->str().c_str(), 127);
|
||||
message[127] = '\0' ;
|
||||
}
|
||||
|
||||
Globals* g = Globals::getInstance();
|
||||
if (out == &g->messageStream)
|
||||
{
|
||||
g->messageStream.clear();
|
||||
g->messageStream.str("");
|
||||
g->messageStreamInUse = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete out;
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
void Log::flush(std::ostringstream* out, const CallSite& site)
|
||||
void Log::flush(const std::ostringstream& out, const CallSite& site)
|
||||
{
|
||||
LLMutexTrylock lock(getMutex<LOG_MUTEX>(),5);
|
||||
if (!lock.isLocked())
|
||||
|
|
@ -1421,22 +1363,11 @@ namespace LLError
|
|||
Globals* g = Globals::getInstance();
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
|
||||
std::string message = out->str();
|
||||
if (out == &g->messageStream)
|
||||
{
|
||||
g->messageStream.clear();
|
||||
g->messageStream.str("");
|
||||
g->messageStreamInUse = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete out;
|
||||
}
|
||||
|
||||
std::string message = out.str();
|
||||
|
||||
if (site.mPrintOnce)
|
||||
{
|
||||
std::ostringstream message_stream;
|
||||
std::ostringstream message_stream;
|
||||
|
||||
std::map<std::string, unsigned int>::iterator messageIter = s->mUniqueLogMessages.find(message);
|
||||
if (messageIter != s->mUniqueLogMessages.end())
|
||||
|
|
@ -1457,8 +1388,8 @@ namespace LLError
|
|||
message_stream << "ONCE: ";
|
||||
s->mUniqueLogMessages[message] = 1;
|
||||
}
|
||||
message_stream << message;
|
||||
message = message_stream.str();
|
||||
message_stream << message;
|
||||
message = message_stream.str();
|
||||
}
|
||||
|
||||
writeToRecorders(site, message);
|
||||
|
|
@ -1466,10 +1397,7 @@ namespace LLError
|
|||
if (site.mLevel == LEVEL_ERROR)
|
||||
{
|
||||
g->mFatalMessage = message;
|
||||
if (s->mCrashFunction)
|
||||
{
|
||||
s->mCrashFunction(message);
|
||||
}
|
||||
s->mCrashFunction(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1533,29 +1461,6 @@ namespace LLError
|
|||
return s->mShouldLogCallCounter;
|
||||
}
|
||||
|
||||
#if LL_WINDOWS
|
||||
// VC80 was optimizing the error away.
|
||||
#pragma optimize("", off)
|
||||
#endif
|
||||
void crashAndLoop(const std::string& message)
|
||||
{
|
||||
// Now, we go kaboom!
|
||||
int* make_me_crash = NULL;
|
||||
|
||||
*make_me_crash = 0;
|
||||
|
||||
while(true)
|
||||
{
|
||||
// Loop forever, in case the crash didn't work?
|
||||
}
|
||||
|
||||
// this is an attempt to let Coverity and other semantic scanners know that this function won't be returning ever.
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#if LL_WINDOWS
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
std::string utcTime()
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
|
|
@ -1572,33 +1477,7 @@ namespace LLError
|
|||
|
||||
namespace LLError
|
||||
{
|
||||
char** LLCallStacks::sBuffer = NULL ;
|
||||
S32 LLCallStacks::sIndex = 0 ;
|
||||
|
||||
//static
|
||||
void LLCallStacks::allocateStackBuffer()
|
||||
{
|
||||
if(sBuffer == NULL)
|
||||
{
|
||||
sBuffer = new char*[512] ;
|
||||
sBuffer[0] = new char[512 * 128] ;
|
||||
for(S32 i = 1 ; i < 512 ; i++)
|
||||
{
|
||||
sBuffer[i] = sBuffer[i-1] + 128 ;
|
||||
}
|
||||
sIndex = 0 ;
|
||||
}
|
||||
}
|
||||
|
||||
void LLCallStacks::freeStackBuffer()
|
||||
{
|
||||
if(sBuffer != NULL)
|
||||
{
|
||||
delete [] sBuffer[0] ;
|
||||
delete [] sBuffer ;
|
||||
sBuffer = NULL ;
|
||||
}
|
||||
}
|
||||
LLCallStacks::StringVector LLCallStacks::sBuffer ;
|
||||
|
||||
//static
|
||||
void LLCallStacks::push(const char* function, const int line)
|
||||
|
|
@ -1609,33 +1488,24 @@ namespace LLError
|
|||
return;
|
||||
}
|
||||
|
||||
if(sBuffer == NULL)
|
||||
{
|
||||
allocateStackBuffer();
|
||||
}
|
||||
|
||||
if(sIndex > 511)
|
||||
if(sBuffer.size() > 511)
|
||||
{
|
||||
clear() ;
|
||||
}
|
||||
|
||||
strcpy(sBuffer[sIndex], function) ;
|
||||
sprintf(sBuffer[sIndex] + strlen(function), " line: %d ", line) ;
|
||||
sIndex++ ;
|
||||
|
||||
return ;
|
||||
std::ostringstream out;
|
||||
insert(out, function, line);
|
||||
sBuffer.push_back(out.str());
|
||||
}
|
||||
|
||||
//static
|
||||
std::ostringstream* LLCallStacks::insert(const char* function, const int line)
|
||||
void LLCallStacks::insert(std::ostream& out, const char* function, const int line)
|
||||
{
|
||||
std::ostringstream* _out = LLError::Log::out();
|
||||
*_out << function << " line " << line << " " ;
|
||||
return _out ;
|
||||
out << function << " line " << line << " " ;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLCallStacks::end(std::ostringstream* _out)
|
||||
void LLCallStacks::end(const std::ostringstream& out)
|
||||
{
|
||||
LLMutexTrylock lock(getMutex<STACKS_MUTEX>(), 5);
|
||||
if (!lock.isLocked())
|
||||
|
|
@ -1643,17 +1513,12 @@ namespace LLError
|
|||
return;
|
||||
}
|
||||
|
||||
if(sBuffer == NULL)
|
||||
{
|
||||
allocateStackBuffer();
|
||||
}
|
||||
|
||||
if(sIndex > 511)
|
||||
if(sBuffer.size() > 511)
|
||||
{
|
||||
clear() ;
|
||||
}
|
||||
|
||||
LLError::Log::flush(_out, sBuffer[sIndex++]) ;
|
||||
sBuffer.push_back(out.str());
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
@ -1665,33 +1530,30 @@ namespace LLError
|
|||
return;
|
||||
}
|
||||
|
||||
if(sIndex > 0)
|
||||
if(! sBuffer.empty())
|
||||
{
|
||||
LL_INFOS() << " ************* PRINT OUT LL CALL STACKS ************* " << LL_ENDL;
|
||||
while(sIndex > 0)
|
||||
for (StringVector::const_reverse_iterator ri(sBuffer.rbegin()), re(sBuffer.rend());
|
||||
ri != re; ++ri)
|
||||
{
|
||||
sIndex-- ;
|
||||
LL_INFOS() << sBuffer[sIndex] << LL_ENDL;
|
||||
LL_INFOS() << (*ri) << LL_ENDL;
|
||||
}
|
||||
LL_INFOS() << " *************** END OF LL CALL STACKS *************** " << LL_ENDL;
|
||||
}
|
||||
|
||||
if(sBuffer != NULL)
|
||||
{
|
||||
freeStackBuffer();
|
||||
}
|
||||
cleanup();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLCallStacks::clear()
|
||||
{
|
||||
sIndex = 0 ;
|
||||
sBuffer.clear();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLCallStacks::cleanup()
|
||||
{
|
||||
freeStackBuffer();
|
||||
clear();
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const LLStacktrace&)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@
|
|||
#define LL_LLERROR_H
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <typeinfo>
|
||||
#include <vector>
|
||||
|
||||
#include "stdtypes.h"
|
||||
|
||||
|
|
@ -198,9 +200,7 @@ namespace LLError
|
|||
{
|
||||
public:
|
||||
static bool shouldLog(CallSite&);
|
||||
static std::ostringstream* out();
|
||||
static void flush(std::ostringstream* out, char* message);
|
||||
static void flush(std::ostringstream*, const CallSite&);
|
||||
static void flush(const std::ostringstream&, const CallSite&);
|
||||
static std::string demangle(const char* mangled);
|
||||
/// classname<TYPE>()
|
||||
template <typename T>
|
||||
|
|
@ -281,18 +281,15 @@ namespace LLError
|
|||
class LL_COMMON_API LLCallStacks
|
||||
{
|
||||
private:
|
||||
static char** sBuffer ;
|
||||
static S32 sIndex ;
|
||||
|
||||
static void allocateStackBuffer();
|
||||
static void freeStackBuffer();
|
||||
typedef std::vector<std::string> StringVector;
|
||||
static StringVector sBuffer ;
|
||||
|
||||
public:
|
||||
static void push(const char* function, const int line) ;
|
||||
static std::ostringstream* insert(const char* function, const int line) ;
|
||||
static void insert(std::ostream& out, const char* function, const int line) ;
|
||||
static void print() ;
|
||||
static void clear() ;
|
||||
static void end(std::ostringstream* _out) ;
|
||||
static void end(const std::ostringstream& out) ;
|
||||
static void cleanup();
|
||||
};
|
||||
|
||||
|
|
@ -306,10 +303,11 @@ namespace LLError
|
|||
//this is cheaper than llcallstacks if no need to output other variables to call stacks.
|
||||
#define LL_PUSH_CALLSTACKS() LLError::LLCallStacks::push(__FUNCTION__, __LINE__)
|
||||
|
||||
#define llcallstacks \
|
||||
{ \
|
||||
std::ostringstream* _out = LLError::LLCallStacks::insert(__FUNCTION__, __LINE__) ; \
|
||||
(*_out)
|
||||
#define llcallstacks \
|
||||
{ \
|
||||
std::ostringstream _out; \
|
||||
LLError::LLCallStacks::insert(_out, __FUNCTION__, __LINE__) ; \
|
||||
_out
|
||||
|
||||
#define llcallstacksendl \
|
||||
LLError::End(); \
|
||||
|
|
@ -355,11 +353,11 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
|
|||
static LLError::CallSite _site(lllog_site_args_(level, once, tags)); \
|
||||
lllog_test_()
|
||||
|
||||
#define lllog_test_() \
|
||||
if (LL_UNLIKELY(_site.shouldLog())) \
|
||||
{ \
|
||||
std::ostringstream* _out = LLError::Log::out(); \
|
||||
(*_out)
|
||||
#define lllog_test_() \
|
||||
if (LL_UNLIKELY(_site.shouldLog())) \
|
||||
{ \
|
||||
std::ostringstream _out; \
|
||||
_out
|
||||
|
||||
#define lllog_site_args_(level, once, tags) \
|
||||
level, __FILE__, __LINE__, typeid(_LL_CLASS_TO_LOG), \
|
||||
|
|
@ -378,15 +376,27 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
|
|||
// LL_CONT << " for " << t << " seconds" << LL_ENDL;
|
||||
//
|
||||
//Such computation is done iff the message will be logged.
|
||||
#define LL_CONT (*_out)
|
||||
#define LL_CONT _out
|
||||
|
||||
#define LL_NEWLINE '\n'
|
||||
|
||||
#define LL_ENDL \
|
||||
LLError::End(); \
|
||||
LLError::Log::flush(_out, _site); \
|
||||
} \
|
||||
} while(0)
|
||||
// Use this only in LL_ERRS or in a place that LL_ERRS may not be used
|
||||
#define LLERROR_CRASH \
|
||||
{ \
|
||||
int* make_me_crash = NULL;\
|
||||
*make_me_crash = 0; \
|
||||
exit(*make_me_crash); \
|
||||
}
|
||||
|
||||
#define LL_ENDL \
|
||||
LLError::End(); \
|
||||
LLError::Log::flush(_out, _site); \
|
||||
if (_site.mLevel == LLError::LEVEL_ERROR) \
|
||||
{ \
|
||||
LLERROR_CRASH \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
// NEW Macros for debugging, allow the passing of a string tag
|
||||
|
||||
|
|
|
|||
|
|
@ -94,14 +94,16 @@ namespace LLError
|
|||
*/
|
||||
|
||||
typedef boost::function<void(const std::string&)> FatalFunction;
|
||||
LL_COMMON_API void crashAndLoop(const std::string& message);
|
||||
// Default fatal function: access null pointer and loops forever
|
||||
|
||||
LL_COMMON_API void setFatalFunction(const FatalFunction&);
|
||||
// The fatal function will be called when an message of LEVEL_ERROR
|
||||
// The fatal function will be called after an message of LEVEL_ERROR
|
||||
// is logged. Note: supressing a LEVEL_ERROR message from being logged
|
||||
// (by, for example, setting a class level to LEVEL_NONE), will keep
|
||||
// the that message from causing the fatal funciton to be invoked.
|
||||
// that message from causing the fatal function to be invoked.
|
||||
// The passed FatalFunction will be the LAST log function called
|
||||
// before LL_ERRS crashes its caller. A FatalFunction can throw an
|
||||
// exception, or call exit(), to bypass the crash. It MUST disrupt the
|
||||
// flow of control because no caller expects LL_ERRS to return.
|
||||
|
||||
LL_COMMON_API FatalFunction getFatalFunction();
|
||||
// Retrieve the previously-set FatalFunction
|
||||
|
|
@ -147,14 +149,14 @@ namespace LLError
|
|||
virtual void recordMessage(LLError::ELevel, const std::string& message) = 0;
|
||||
// use the level for better display, not for filtering
|
||||
|
||||
virtual bool enabled() { return true; }
|
||||
virtual bool enabled() { return true; }
|
||||
|
||||
bool wantsTime();
|
||||
bool wantsTags();
|
||||
bool wantsLevel();
|
||||
bool wantsLocation();
|
||||
bool wantsFunctionName();
|
||||
bool wantsMultiline();
|
||||
bool wantsMultiline();
|
||||
|
||||
void showTime(bool show);
|
||||
void showTags(bool show);
|
||||
|
|
@ -165,15 +167,35 @@ namespace LLError
|
|||
|
||||
protected:
|
||||
bool mWantsTime;
|
||||
bool mWantsTags;
|
||||
bool mWantsLevel;
|
||||
bool mWantsLocation;
|
||||
bool mWantsFunctionName;
|
||||
bool mWantsMultiline;
|
||||
bool mWantsTags;
|
||||
bool mWantsLevel;
|
||||
bool mWantsLocation;
|
||||
bool mWantsFunctionName;
|
||||
bool mWantsMultiline;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Recorder> RecorderPtr;
|
||||
|
||||
/**
|
||||
* Instantiate GenericRecorder with a callable(level, message) to get
|
||||
* control on every log message without having to code an explicit
|
||||
* Recorder subclass.
|
||||
*/
|
||||
template <typename CALLABLE>
|
||||
class GenericRecorder: public Recorder
|
||||
{
|
||||
public:
|
||||
GenericRecorder(const CALLABLE& callable):
|
||||
mCallable(callable)
|
||||
{}
|
||||
void recordMessage(LLError::ELevel level, const std::string& message) override
|
||||
{
|
||||
mCallable(level, message);
|
||||
}
|
||||
private:
|
||||
CALLABLE mCallable;
|
||||
};
|
||||
|
||||
/**
|
||||
* @NOTE: addRecorder() and removeRecorder() uses the boost::shared_ptr to allow for shared ownership
|
||||
* while still ensuring that the allocated memory is eventually freed
|
||||
|
|
@ -181,6 +203,19 @@ namespace LLError
|
|||
LL_COMMON_API void addRecorder(RecorderPtr);
|
||||
LL_COMMON_API void removeRecorder(RecorderPtr);
|
||||
// each error message is passed to each recorder via recordMessage()
|
||||
/**
|
||||
* Call addGenericRecorder() with a callable(level, message) to get
|
||||
* control on every log message without having to code an explicit
|
||||
* Recorder subclass. Save the returned RecorderPtr if you later want to
|
||||
* call removeRecorder().
|
||||
*/
|
||||
template <typename CALLABLE>
|
||||
RecorderPtr addGenericRecorder(const CALLABLE& callable)
|
||||
{
|
||||
RecorderPtr ptr{ new GenericRecorder<CALLABLE>(callable) };
|
||||
addRecorder(ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
LL_COMMON_API void logToFile(const std::string& filename);
|
||||
LL_COMMON_API void logToStderr();
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ public:
|
|||
// pump name -- so it should NOT need tweaking for uniqueness.
|
||||
mReplyPump(LLUUID::generateNewID().asString()),
|
||||
mExpect(0),
|
||||
mPrevFatalFunction(LLError::getFatalFunction()),
|
||||
// Instantiate a distinct LLLeapListener for this plugin. (Every
|
||||
// plugin will want its own collection of managed listeners, etc.)
|
||||
// Pass it a callback to our connect() method, so it can send events
|
||||
|
|
@ -146,7 +145,9 @@ public:
|
|||
.listen("LLLeap", boost::bind(&LLLeapImpl::rstderr, this, _1));
|
||||
|
||||
// For our lifespan, intercept any LL_ERRS so we can notify plugin
|
||||
LLError::setFatalFunction(boost::bind(&LLLeapImpl::fatalFunction, this, _1));
|
||||
mRecorder = LLError::addGenericRecorder(
|
||||
[this](LLError::ELevel level, const std::string& message)
|
||||
{ onError(level, message); });
|
||||
|
||||
// Send child a preliminary event reporting our own reply-pump name --
|
||||
// which would otherwise be pretty tricky to guess!
|
||||
|
|
@ -162,8 +163,7 @@ public:
|
|||
virtual ~LLLeapImpl()
|
||||
{
|
||||
LL_DEBUGS("LLLeap") << "destroying LLLeap(\"" << mDesc << "\")" << LL_ENDL;
|
||||
// Restore original FatalFunction
|
||||
LLError::setFatalFunction(mPrevFatalFunction);
|
||||
LLError::removeRecorder(mRecorder);
|
||||
}
|
||||
|
||||
// Listener for failed launch attempt
|
||||
|
|
@ -377,28 +377,28 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
void fatalFunction(const std::string& error)
|
||||
void onError(LLError::ELevel level, const std::string& error)
|
||||
{
|
||||
// Notify plugin
|
||||
LLSD event;
|
||||
event["type"] = "error";
|
||||
event["error"] = error;
|
||||
mReplyPump.post(event);
|
||||
|
||||
// All the above really accomplished was to buffer the serialized
|
||||
// event in our WritePipe. Have to pump mainloop a couple times to
|
||||
// really write it out there... but time out in case we can't write.
|
||||
LLProcess::WritePipe& childin(mChild->getWritePipe(LLProcess::STDIN));
|
||||
LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
|
||||
LLSD nop;
|
||||
F64 until = (LLTimer::getElapsedSeconds() + 2).value();
|
||||
while (childin.size() && LLTimer::getElapsedSeconds() < until)
|
||||
if (level == LLError::LEVEL_ERROR)
|
||||
{
|
||||
mainloop.post(nop);
|
||||
}
|
||||
// Notify plugin
|
||||
LLSD event;
|
||||
event["type"] = "error";
|
||||
event["error"] = error;
|
||||
mReplyPump.post(event);
|
||||
|
||||
// forward the call to the previous FatalFunction
|
||||
mPrevFatalFunction(error);
|
||||
// All the above really accomplished was to buffer the serialized
|
||||
// event in our WritePipe. Have to pump mainloop a couple times to
|
||||
// really write it out there... but time out in case we can't write.
|
||||
LLProcess::WritePipe& childin(mChild->getWritePipe(LLProcess::STDIN));
|
||||
LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
|
||||
LLSD nop;
|
||||
F64 until = (LLTimer::getElapsedSeconds() + 2).value();
|
||||
while (childin.size() && LLTimer::getElapsedSeconds() < until)
|
||||
{
|
||||
mainloop.post(nop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -421,7 +421,7 @@ private:
|
|||
mStdinConnection, mStdoutConnection, mStdoutDataConnection, mStderrConnection;
|
||||
boost::scoped_ptr<LLEventPump::Blocker> mBlocker;
|
||||
LLProcess::ReadPipe::size_type mExpect;
|
||||
LLError::FatalFunction mPrevFatalFunction;
|
||||
LLError::RecorderPtr mRecorder;
|
||||
boost::scoped_ptr<LLLeapListener> mListener;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -38,11 +38,6 @@
|
|||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace {
|
||||
void log(LLError::ELevel level,
|
||||
const char* p1, const char* p2, const char* p3, const char* p4);
|
||||
} // anonymous namespace
|
||||
|
||||
// Our master list of all LLSingletons is itself an LLSingleton. We used to
|
||||
// store it in a function-local static, but that could get destroyed before
|
||||
// the last of the LLSingletons -- and ~LLSingletonBase() definitely wants to
|
||||
|
|
@ -218,8 +213,8 @@ void LLSingletonBase::pop_initializing()
|
|||
|
||||
if (list.empty())
|
||||
{
|
||||
logerrs("Underflow in stack of currently-initializing LLSingletons at ",
|
||||
classname(this).c_str(), "::getInstance()");
|
||||
logerrs({"Underflow in stack of currently-initializing LLSingletons at ",
|
||||
classname(this), "::getInstance()"});
|
||||
}
|
||||
|
||||
// Now we know list.back() exists: capture it
|
||||
|
|
@ -240,9 +235,9 @@ void LLSingletonBase::pop_initializing()
|
|||
// Now validate the newly-popped LLSingleton.
|
||||
if (back != this)
|
||||
{
|
||||
logerrs("Push/pop mismatch in stack of currently-initializing LLSingletons: ",
|
||||
classname(this).c_str(), "::getInstance() trying to pop ",
|
||||
classname(back).c_str());
|
||||
logerrs({"Push/pop mismatch in stack of currently-initializing LLSingletons: ",
|
||||
classname(this), "::getInstance() trying to pop ",
|
||||
classname(back)});
|
||||
}
|
||||
|
||||
// log AFTER popping so logging singletons don't cry circularity
|
||||
|
|
@ -331,15 +326,15 @@ void LLSingletonBase::capture_dependency()
|
|||
//
|
||||
// Example: LLNotifications singleton initializes default channels.
|
||||
// Channels register themselves with singleton once done.
|
||||
logdebugs("LLSingleton circularity: ", out.str().c_str(),
|
||||
classname(this).c_str(), "");
|
||||
logdebugs({"LLSingleton circularity: ", out.str(),
|
||||
classname(this)});
|
||||
}
|
||||
else
|
||||
{
|
||||
// Actual circularity with other singleton (or single singleton is used extensively).
|
||||
// Dependency can be unclear.
|
||||
logwarns("LLSingleton circularity: ", out.str().c_str(),
|
||||
classname(this).c_str(), "");
|
||||
logwarns({"LLSingleton circularity: ", out.str(),
|
||||
classname(this)});
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -352,8 +347,8 @@ void LLSingletonBase::capture_dependency()
|
|||
if (current->mDepends.insert(this).second)
|
||||
{
|
||||
// only log the FIRST time we hit this dependency!
|
||||
logdebugs(classname(current).c_str(),
|
||||
" depends on ", classname(this).c_str());
|
||||
logdebugs({classname(current),
|
||||
" depends on ", classname(this)});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -401,7 +396,7 @@ LLSingletonBase::vec_t LLSingletonBase::dep_sort()
|
|||
|
||||
void LLSingletonBase::cleanup_()
|
||||
{
|
||||
logdebugs("calling ", classname(this).c_str(), "::cleanupSingleton()");
|
||||
logdebugs({"calling ", classname(this), "::cleanupSingleton()"});
|
||||
try
|
||||
{
|
||||
cleanupSingleton();
|
||||
|
|
@ -427,23 +422,23 @@ void LLSingletonBase::deleteAll()
|
|||
if (! sp->mDeleteSingleton)
|
||||
{
|
||||
// This Should Not Happen... but carry on.
|
||||
logwarns(name.c_str(), "::mDeleteSingleton not initialized!");
|
||||
logwarns({name, "::mDeleteSingleton not initialized!"});
|
||||
}
|
||||
else
|
||||
{
|
||||
// properly initialized: call it.
|
||||
logdebugs("calling ", name.c_str(), "::deleteSingleton()");
|
||||
logdebugs({"calling ", name, "::deleteSingleton()"});
|
||||
// From this point on, DO NOT DEREFERENCE sp!
|
||||
sp->mDeleteSingleton();
|
||||
}
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
logwarns("Exception in ", name.c_str(), "::deleteSingleton(): ", e.what());
|
||||
logwarns({"Exception in ", name, "::deleteSingleton(): ", e.what()});
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
logwarns("Unknown exception in ", name.c_str(), "::deleteSingleton()");
|
||||
logwarns({"Unknown exception in ", name, "::deleteSingleton()"});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -451,49 +446,40 @@ void LLSingletonBase::deleteAll()
|
|||
/*---------------------------- Logging helpers -----------------------------*/
|
||||
namespace {
|
||||
|
||||
void log(LLError::ELevel level,
|
||||
const char* p1, const char* p2, const char* p3, const char* p4)
|
||||
std::ostream& operator<<(std::ostream& out, const LLSingletonBase::string_params& args)
|
||||
{
|
||||
LL_VLOGS(level, "LLSingleton") << p1 << p2 << p3 << p4 << LL_ENDL;
|
||||
// However many args there are in args, stream each of them to 'out'.
|
||||
for (auto arg : args)
|
||||
{
|
||||
out << arg;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
//static
|
||||
void LLSingletonBase::logwarns(const char* p1, const char* p2, const char* p3, const char* p4)
|
||||
void LLSingletonBase::logwarns(const string_params& args)
|
||||
{
|
||||
log(LLError::LEVEL_WARN, p1, p2, p3, p4);
|
||||
LL_WARNS("LLSingleton") << args << LL_ENDL;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLSingletonBase::loginfos(const char* p1, const char* p2, const char* p3, const char* p4)
|
||||
void LLSingletonBase::loginfos(const string_params& args)
|
||||
{
|
||||
log(LLError::LEVEL_INFO, p1, p2, p3, p4);
|
||||
LL_INFOS("LLSingleton") << args << LL_ENDL;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLSingletonBase::logdebugs(const char* p1, const char* p2, const char* p3, const char* p4)
|
||||
void LLSingletonBase::logdebugs(const string_params& args)
|
||||
{
|
||||
log(LLError::LEVEL_DEBUG, p1, p2, p3, p4);
|
||||
LL_DEBUGS("LLSingleton") << args << LL_ENDL;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLSingletonBase::logerrs(const char* p1, const char* p2, const char* p3, const char* p4)
|
||||
void LLSingletonBase::logerrs(const string_params& args)
|
||||
{
|
||||
log(LLError::LEVEL_ERROR, p1, p2, p3, p4);
|
||||
// The other important side effect of LL_ERRS() is
|
||||
// https://www.youtube.com/watch?v=OMG7paGJqhQ (emphasis on OMG)
|
||||
std::ostringstream out;
|
||||
out << p1 << p2 << p3 << p4;
|
||||
auto crash = LLError::getFatalFunction();
|
||||
if (crash)
|
||||
{
|
||||
crash(out.str());
|
||||
}
|
||||
else
|
||||
{
|
||||
LLError::crashAndLoop(out.str());
|
||||
}
|
||||
LL_ERRS("LLSingleton") << args << LL_ENDL;
|
||||
}
|
||||
|
||||
std::string LLSingletonBase::demangle(const char* mangled)
|
||||
|
|
|
|||
|
|
@ -27,9 +27,10 @@
|
|||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <initializer_list>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <typeinfo>
|
||||
#include <vector>
|
||||
#include "mutex.h"
|
||||
#include "lockstatic.h"
|
||||
#include "llthread.h" // on_main_thread()
|
||||
|
|
@ -111,14 +112,13 @@ protected:
|
|||
void capture_dependency();
|
||||
|
||||
// delegate logging calls to llsingleton.cpp
|
||||
static void logerrs(const char* p1, const char* p2="",
|
||||
const char* p3="", const char* p4="");
|
||||
static void logwarns(const char* p1, const char* p2="",
|
||||
const char* p3="", const char* p4="");
|
||||
static void loginfos(const char* p1, const char* p2="",
|
||||
const char* p3="", const char* p4="");
|
||||
static void logdebugs(const char* p1, const char* p2="",
|
||||
const char* p3="", const char* p4="");
|
||||
public:
|
||||
typedef std::initializer_list<const std::string> string_params;
|
||||
protected:
|
||||
static void logerrs (const string_params&);
|
||||
static void logwarns (const string_params&);
|
||||
static void loginfos (const string_params&);
|
||||
static void logdebugs(const string_params&);
|
||||
static std::string demangle(const char* mangled);
|
||||
// these classname() declarations restate template functions declared in
|
||||
// llerror.h because we avoid #including that here
|
||||
|
|
@ -327,8 +327,8 @@ private:
|
|||
// init stack to its previous size BEFORE logging so log-machinery
|
||||
// LLSingletons don't record a dependency on DERIVED_TYPE!
|
||||
LLSingleton_manage_master<DERIVED_TYPE>().reset_initializing(prev_size);
|
||||
logwarns("Error constructing ", classname<DERIVED_TYPE>().c_str(),
|
||||
": ", err.what());
|
||||
logwarns({"Error constructing ", classname<DERIVED_TYPE>(),
|
||||
": ", err.what()});
|
||||
// There isn't a separate EInitState value meaning "we attempted
|
||||
// to construct this LLSingleton subclass but could not," so use
|
||||
// DELETED. That seems slightly more appropriate than UNINITIALIZED.
|
||||
|
|
@ -356,8 +356,8 @@ private:
|
|||
// BEFORE logging, so log-machinery LLSingletons don't record a
|
||||
// dependency on DERIVED_TYPE!
|
||||
pop_initializing(lk->mInstance);
|
||||
logwarns("Error in ", classname<DERIVED_TYPE>().c_str(),
|
||||
"::initSingleton(): ", err.what());
|
||||
logwarns({"Error in ", classname<DERIVED_TYPE>(),
|
||||
"::initSingleton(): ", err.what()});
|
||||
// Get rid of the instance entirely. This call depends on our
|
||||
// recursive_mutex. We could have a deleteSingleton(LockStatic&)
|
||||
// overload and pass lk, but we don't strictly need it.
|
||||
|
|
@ -506,9 +506,9 @@ public:
|
|||
case CONSTRUCTING:
|
||||
// here if DERIVED_TYPE's constructor (directly or indirectly)
|
||||
// calls DERIVED_TYPE::getInstance()
|
||||
logerrs("Tried to access singleton ",
|
||||
classname<DERIVED_TYPE>().c_str(),
|
||||
" from singleton constructor!");
|
||||
logerrs({"Tried to access singleton ",
|
||||
classname<DERIVED_TYPE>(),
|
||||
" from singleton constructor!"});
|
||||
return nullptr;
|
||||
|
||||
case INITIALIZING:
|
||||
|
|
@ -523,9 +523,9 @@ public:
|
|||
|
||||
case DELETED:
|
||||
// called after deleteSingleton()
|
||||
logwarns("Trying to access deleted singleton ",
|
||||
classname<DERIVED_TYPE>().c_str(),
|
||||
" -- creating new instance");
|
||||
logwarns({"Trying to access deleted singleton ",
|
||||
classname<DERIVED_TYPE>(),
|
||||
" -- creating new instance"});
|
||||
// fall through
|
||||
case UNINITIALIZED:
|
||||
case QUEUED:
|
||||
|
|
@ -552,8 +552,8 @@ public:
|
|||
} // unlock 'lk'
|
||||
|
||||
// Per the comment block above, dispatch to the main thread.
|
||||
loginfos(classname<DERIVED_TYPE>().c_str(),
|
||||
"::getInstance() dispatching to main thread");
|
||||
loginfos({classname<DERIVED_TYPE>(),
|
||||
"::getInstance() dispatching to main thread"});
|
||||
auto instance = LLMainThreadTask::dispatch(
|
||||
[](){
|
||||
// VERY IMPORTANT to call getInstance() on the main thread,
|
||||
|
|
@ -563,16 +563,16 @@ public:
|
|||
// the main thread processes them, only the FIRST such request
|
||||
// actually constructs the instance -- every subsequent one
|
||||
// simply returns the existing instance.
|
||||
loginfos(classname<DERIVED_TYPE>().c_str(),
|
||||
"::getInstance() on main thread");
|
||||
loginfos({classname<DERIVED_TYPE>(),
|
||||
"::getInstance() on main thread"});
|
||||
return getInstance();
|
||||
});
|
||||
// record the dependency chain tracked on THIS thread, not the main
|
||||
// thread (consider a getInstance() overload with a tag param that
|
||||
// suppresses dep tracking when dispatched to the main thread)
|
||||
capture_dependency(instance);
|
||||
loginfos(classname<DERIVED_TYPE>().c_str(),
|
||||
"::getInstance() returning on requesting thread");
|
||||
loginfos({classname<DERIVED_TYPE>(),
|
||||
"::getInstance() returning on requesting thread"});
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
|
@ -641,16 +641,16 @@ private:
|
|||
// For organizational purposes this function shouldn't be called twice
|
||||
if (lk->mInitState != super::UNINITIALIZED)
|
||||
{
|
||||
super::logerrs("Tried to initialize singleton ",
|
||||
super::template classname<DERIVED_TYPE>().c_str(),
|
||||
" twice!");
|
||||
super::logerrs({"Tried to initialize singleton ",
|
||||
super::template classname<DERIVED_TYPE>(),
|
||||
" twice!"});
|
||||
return nullptr;
|
||||
}
|
||||
else if (on_main_thread())
|
||||
{
|
||||
// on the main thread, simply construct instance while holding lock
|
||||
super::logdebugs(super::template classname<DERIVED_TYPE>().c_str(),
|
||||
"::initParamSingleton()");
|
||||
super::logdebugs({super::template classname<DERIVED_TYPE>(),
|
||||
"::initParamSingleton()"});
|
||||
super::constructSingleton(lk, std::forward<Args>(args)...);
|
||||
return lk->mInstance;
|
||||
}
|
||||
|
|
@ -662,8 +662,8 @@ private:
|
|||
lk->mInitState = super::QUEUED;
|
||||
// very important to unlock here so main thread can actually process
|
||||
lk.unlock();
|
||||
super::loginfos(super::template classname<DERIVED_TYPE>().c_str(),
|
||||
"::initParamSingleton() dispatching to main thread");
|
||||
super::loginfos({super::template classname<DERIVED_TYPE>(),
|
||||
"::initParamSingleton() dispatching to main thread"});
|
||||
// Normally it would be the height of folly to reference-bind
|
||||
// 'args' into a lambda to be executed on some other thread! By
|
||||
// the time that thread executed the lambda, the references would
|
||||
|
|
@ -674,12 +674,12 @@ private:
|
|||
// references.
|
||||
auto instance = LLMainThreadTask::dispatch(
|
||||
[&](){
|
||||
super::loginfos(super::template classname<DERIVED_TYPE>().c_str(),
|
||||
"::initParamSingleton() on main thread");
|
||||
super::loginfos({super::template classname<DERIVED_TYPE>(),
|
||||
"::initParamSingleton() on main thread"});
|
||||
return initParamSingleton_(std::forward<Args>(args)...);
|
||||
});
|
||||
super::loginfos(super::template classname<DERIVED_TYPE>().c_str(),
|
||||
"::initParamSingleton() returning on requesting thread");
|
||||
super::loginfos({super::template classname<DERIVED_TYPE>(),
|
||||
"::initParamSingleton() returning on requesting thread"});
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
|
@ -707,14 +707,14 @@ public:
|
|||
{
|
||||
case super::UNINITIALIZED:
|
||||
case super::QUEUED:
|
||||
super::logerrs("Uninitialized param singleton ",
|
||||
super::template classname<DERIVED_TYPE>().c_str());
|
||||
super::logerrs({"Uninitialized param singleton ",
|
||||
super::template classname<DERIVED_TYPE>()});
|
||||
break;
|
||||
|
||||
case super::CONSTRUCTING:
|
||||
super::logerrs("Tried to access param singleton ",
|
||||
super::template classname<DERIVED_TYPE>().c_str(),
|
||||
" from singleton constructor!");
|
||||
super::logerrs({"Tried to access param singleton ",
|
||||
super::template classname<DERIVED_TYPE>(),
|
||||
" from singleton constructor!"});
|
||||
break;
|
||||
|
||||
case super::INITIALIZING:
|
||||
|
|
@ -726,8 +726,8 @@ public:
|
|||
return lk->mInstance;
|
||||
|
||||
case super::DELETED:
|
||||
super::logerrs("Trying to access deleted param singleton ",
|
||||
super::template classname<DERIVED_TYPE>().c_str());
|
||||
super::logerrs({"Trying to access deleted param singleton ",
|
||||
super::template classname<DERIVED_TYPE>()});
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -354,8 +354,9 @@ void LLThread::setQuitting()
|
|||
{
|
||||
mStatus = QUITTING;
|
||||
}
|
||||
// It's only safe to remove mRunCondition if all locked threads were notified
|
||||
mRunCondition->broadcast();
|
||||
mDataLock->unlock();
|
||||
wake();
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ std::string LLURI::escapePathAndData(const std::string &str)
|
|||
std::string fragment;
|
||||
|
||||
size_t fragment_pos = str.find('#');
|
||||
if (fragment_pos != std::string::npos)
|
||||
if ((fragment_pos != std::string::npos) && (fragment_pos > delim_pos))
|
||||
{
|
||||
query = str.substr(path_size, fragment_pos - path_size);
|
||||
fragment = str.substr(fragment_pos);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
|
|
@ -69,21 +70,41 @@ namespace
|
|||
|
||||
namespace
|
||||
{
|
||||
static bool fatalWasCalled;
|
||||
void fatalCall(const std::string&) { fatalWasCalled = true; }
|
||||
static bool fatalWasCalled = false;
|
||||
struct FatalWasCalled: public std::runtime_error
|
||||
{
|
||||
FatalWasCalled(const std::string& what): std::runtime_error(what) {}
|
||||
};
|
||||
void fatalCall(const std::string& msg) { throw FatalWasCalled(msg); }
|
||||
}
|
||||
|
||||
// Because we use LLError::setFatalFunction(fatalCall), any LL_ERRS call we
|
||||
// issue will throw FatalWasCalled. But we want the test program to continue.
|
||||
// So instead of writing:
|
||||
// LL_ERRS("tag") << "some message" << LL_ENDL;
|
||||
// write:
|
||||
// CATCH(LL_ERRS("tag"), "some message");
|
||||
#define CATCH(logcall, expr) \
|
||||
try \
|
||||
{ \
|
||||
logcall << expr << LL_ENDL; \
|
||||
} \
|
||||
catch (const FatalWasCalled&) \
|
||||
{ \
|
||||
fatalWasCalled = true; \
|
||||
}
|
||||
|
||||
namespace tut
|
||||
{
|
||||
class TestRecorder : public LLError::Recorder
|
||||
{
|
||||
public:
|
||||
TestRecorder()
|
||||
{
|
||||
showTime(false);
|
||||
}
|
||||
{
|
||||
showTime(false);
|
||||
}
|
||||
virtual ~TestRecorder()
|
||||
{}
|
||||
{}
|
||||
|
||||
virtual void recordMessage(LLError::ELevel level,
|
||||
const std::string& message)
|
||||
|
|
@ -252,7 +273,7 @@ namespace
|
|||
LL_DEBUGS("WriteTag","AnotherTag") << "one" << LL_ENDL;
|
||||
LL_INFOS("WriteTag") << "two" << LL_ENDL;
|
||||
LL_WARNS("WriteTag") << "three" << LL_ENDL;
|
||||
LL_ERRS("WriteTag") << "four" << LL_ENDL;
|
||||
CATCH(LL_ERRS("WriteTag"), "four");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -380,7 +401,7 @@ namespace
|
|||
|
||||
std::string errorReturningLocation()
|
||||
{
|
||||
LL_ERRS() << "die" << LL_ENDL; int this_line = __LINE__;
|
||||
int this_line = __LINE__; CATCH(LL_ERRS(), "die");
|
||||
return locationString(this_line);
|
||||
}
|
||||
}
|
||||
|
|
@ -701,7 +722,7 @@ public:
|
|||
static void doDebug() { LL_DEBUGS() << "add dice" << LL_ENDL; }
|
||||
static void doInfo() { LL_INFOS() << "any idea" << LL_ENDL; }
|
||||
static void doWarn() { LL_WARNS() << "aim west" << LL_ENDL; }
|
||||
static void doError() { LL_ERRS() << "ate eels" << LL_ENDL; }
|
||||
static void doError() { CATCH(LL_ERRS(), "ate eels"); }
|
||||
static void doAll() { doDebug(); doInfo(); doWarn(); doError(); }
|
||||
};
|
||||
|
||||
|
|
@ -712,7 +733,7 @@ public:
|
|||
static void doDebug() { LL_DEBUGS() << "bed down" << LL_ENDL; }
|
||||
static void doInfo() { LL_INFOS() << "buy iron" << LL_ENDL; }
|
||||
static void doWarn() { LL_WARNS() << "bad word" << LL_ENDL; }
|
||||
static void doError() { LL_ERRS() << "big easy" << LL_ENDL; }
|
||||
static void doError() { CATCH(LL_ERRS(), "big easy"); }
|
||||
static void doAll() { doDebug(); doInfo(); doWarn(); doError(); }
|
||||
};
|
||||
|
||||
|
|
@ -874,13 +895,10 @@ namespace tut
|
|||
namespace
|
||||
{
|
||||
std::string writeTagWithSpaceReturningLocation()
|
||||
{
|
||||
LL_DEBUGS("Write Tag") << "not allowed" << LL_ENDL; int this_line = __LINE__;
|
||||
|
||||
std::ostringstream location;
|
||||
location << LLError::abbreviateFile(__FILE__).c_str() << "(" << this_line << ")";
|
||||
return location.str();
|
||||
}
|
||||
{
|
||||
int this_line = __LINE__; CATCH(LL_DEBUGS("Write Tag"), "not allowed");
|
||||
return locationString(this_line);
|
||||
}
|
||||
};
|
||||
|
||||
namespace tut
|
||||
|
|
@ -894,9 +912,9 @@ namespace tut
|
|||
|
||||
std::string location = writeTagWithSpaceReturningLocation();
|
||||
std::string expected = "Space is not allowed in a log tag at " + location;
|
||||
ensure_message_field_equals(0, LEVEL_FIELD, "ERROR");
|
||||
ensure_message_field_equals(0, MSG_FIELD, expected);
|
||||
ensure("fatal callback called", fatalWasCalled);
|
||||
ensure_message_field_equals(0, LEVEL_FIELD, "ERROR");
|
||||
ensure_message_field_equals(0, MSG_FIELD, expected);
|
||||
ensure("fatal callback called", fatalWasCalled);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@
|
|||
#include <list>
|
||||
#include <string>
|
||||
|
||||
// statically reference the function in test.cpp... it's short, we could
|
||||
// replicate, but better to reuse
|
||||
extern void wouldHaveCrashed(const std::string& message);
|
||||
|
||||
struct WrapLLErrs
|
||||
{
|
||||
WrapLLErrs():
|
||||
|
|
@ -59,7 +55,8 @@ struct WrapLLErrs
|
|||
mPriorFatal(LLError::getFatalFunction())
|
||||
{
|
||||
// Make LL_ERRS call our own operator() method
|
||||
LLError::setFatalFunction(boost::bind(&WrapLLErrs::operator(), this, _1));
|
||||
LLError::setFatalFunction(
|
||||
[this](const std::string& message){ (*this)(message); });
|
||||
}
|
||||
|
||||
~WrapLLErrs()
|
||||
|
|
@ -199,11 +196,13 @@ public:
|
|||
// with that output. If it turns out that saveAndResetSettings() has
|
||||
// some bad effect, give up and just let the DEBUG level log messages
|
||||
// display.
|
||||
: boost::noncopyable(),
|
||||
: boost::noncopyable(),
|
||||
mFatalFunction(LLError::getFatalFunction()),
|
||||
mOldSettings(LLError::saveAndResetSettings()),
|
||||
mRecorder(new CaptureLogRecorder())
|
||||
mRecorder(new CaptureLogRecorder())
|
||||
{
|
||||
LLError::setFatalFunction(wouldHaveCrashed);
|
||||
// reinstate the FatalFunction we just reset
|
||||
LLError::setFatalFunction(mFatalFunction);
|
||||
LLError::setDefaultLevel(level);
|
||||
LLError::addRecorder(mRecorder);
|
||||
}
|
||||
|
|
@ -219,17 +218,18 @@ public:
|
|||
/// for the sought string.
|
||||
std::string messageWith(const std::string& search, bool required=true)
|
||||
{
|
||||
return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->messageWith(search, required);
|
||||
return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->messageWith(search, required);
|
||||
}
|
||||
|
||||
std::ostream& streamto(std::ostream& out) const
|
||||
{
|
||||
return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->streamto(out);
|
||||
return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->streamto(out);
|
||||
}
|
||||
|
||||
private:
|
||||
LLError::FatalFunction mFatalFunction;
|
||||
LLError::SettingsStoragePtr mOldSettings;
|
||||
LLError::RecorderPtr mRecorder;
|
||||
LLError::RecorderPtr mRecorder;
|
||||
};
|
||||
|
||||
#endif /* ! defined(LL_WRAPLLERRS_H) */
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ include(LLAddBuildTest)
|
|||
include(LLMessage)
|
||||
include(LLCommon)
|
||||
include(Tut)
|
||||
include(bugsplat)
|
||||
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ void HttpReplyQueue::addOp(const HttpReplyQueue::opPtr_t &op)
|
|||
|
||||
mQueue.push_back(op);
|
||||
}
|
||||
mQueueCV.notify_all();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ protected:
|
|||
|
||||
OpContainer mQueue;
|
||||
LLCoreInt::HttpMutex mQueueMutex;
|
||||
LLCoreInt::HttpConditionVariable mQueueCV;
|
||||
|
||||
}; // end class HttpReplyQueue
|
||||
|
||||
|
|
|
|||
|
|
@ -142,13 +142,19 @@ void HttpRequestQueue::wakeAll()
|
|||
}
|
||||
|
||||
|
||||
void HttpRequestQueue::stopQueue()
|
||||
bool HttpRequestQueue::stopQueue()
|
||||
{
|
||||
{
|
||||
HttpScopedLock lock(mQueueMutex);
|
||||
|
||||
mQueueStopped = true;
|
||||
wakeAll();
|
||||
if (!mQueueStopped)
|
||||
{
|
||||
mQueueStopped = true;
|
||||
wakeAll();
|
||||
return true;
|
||||
}
|
||||
wakeAll();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public:
|
|||
/// them on their way.
|
||||
///
|
||||
/// Threading: callable by any thread.
|
||||
void stopQueue();
|
||||
bool stopQueue();
|
||||
|
||||
protected:
|
||||
static HttpRequestQueue * sInstance;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,11 @@ HttpService::~HttpService()
|
|||
// is a bit tricky.
|
||||
if (mRequestQueue)
|
||||
{
|
||||
mRequestQueue->stopQueue();
|
||||
if (mRequestQueue->stopQueue())
|
||||
{
|
||||
// Give mRequestQueue a chance to finish
|
||||
ms_sleep(10);
|
||||
}
|
||||
}
|
||||
|
||||
if (mThread)
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
namespace LLCore
|
||||
{
|
||||
|
||||
bool HttpOptions::sDefaultVerifyPeer = false;
|
||||
|
||||
HttpOptions::HttpOptions() :
|
||||
mWantHeaders(false),
|
||||
|
|
@ -43,7 +44,7 @@ HttpOptions::HttpOptions() :
|
|||
mMaxRetryBackoff(HTTP_RETRY_BACKOFF_MAX_DEFAULT),
|
||||
mUseRetryAfter(HTTP_USE_RETRY_AFTER_DEFAULT),
|
||||
mFollowRedirects(true),
|
||||
mVerifyPeer(false),
|
||||
mVerifyPeer(sDefaultVerifyPeer),
|
||||
mVerifyHost(false),
|
||||
mDNSCacheTimeout(-1L),
|
||||
mNoBody(false)
|
||||
|
|
@ -122,7 +123,15 @@ void HttpOptions::setHeadersOnly(bool nobody)
|
|||
{
|
||||
mNoBody = nobody;
|
||||
if (mNoBody)
|
||||
{
|
||||
setWantHeaders(true);
|
||||
setSSLVerifyPeer(false);
|
||||
}
|
||||
}
|
||||
|
||||
void HttpOptions::setDefaultSSLVerifyPeer(bool verify)
|
||||
{
|
||||
sDefaultVerifyPeer = verify;
|
||||
}
|
||||
|
||||
} // end namespace LLCore
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ public:
|
|||
|
||||
/// Instructs the LLCore::HTTPRequest to verify that the exchanged security
|
||||
/// certificate is authentic.
|
||||
/// Default: false
|
||||
/// Default: sDefaultVerifyPeer
|
||||
void setSSLVerifyPeer(bool verify);
|
||||
bool getSSLVerifyPeer() const
|
||||
{
|
||||
|
|
@ -177,6 +177,13 @@ public:
|
|||
{
|
||||
return mNoBody;
|
||||
}
|
||||
|
||||
/// Sets default behavior for verifying that the name in the
|
||||
/// security certificate matches the name of the host contacted.
|
||||
/// Defaults false if not set, but should be set according to
|
||||
/// viewer's initialization options and command argunments, see
|
||||
/// NoVerifySSLCert
|
||||
static void setDefaultSSLVerifyPeer(bool verify);
|
||||
|
||||
protected:
|
||||
bool mWantHeaders;
|
||||
|
|
@ -192,6 +199,8 @@ protected:
|
|||
bool mVerifyHost;
|
||||
int mDNSCacheTimeout;
|
||||
bool mNoBody;
|
||||
|
||||
static bool sDefaultVerifyPeer;
|
||||
}; // end class HttpOptions
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
This component is no longer used in Linden Lab builds.
|
||||
Change requests to support continued use by open source
|
||||
builds are welcome.
|
||||
|
|
@ -411,6 +411,7 @@ bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg
|
|||
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
|
||||
|
||||
httpOpts->setTimeout(timeout);
|
||||
httpOpts->setSSLVerifyPeer(false);
|
||||
|
||||
for(int i = 0; i < retries; ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ include(LLKDU)
|
|||
include(LLImageJ2COJ)
|
||||
include(ZLIB)
|
||||
include(LLAddBuildTest)
|
||||
include(bugsplat)
|
||||
include(Tut)
|
||||
|
||||
include_directories(
|
||||
|
|
|
|||
|
|
@ -103,60 +103,104 @@ LLVector3 LLLandmark::getRegionPos() const
|
|||
|
||||
|
||||
// static
|
||||
LLLandmark* LLLandmark::constructFromString(const char *buffer)
|
||||
LLLandmark* LLLandmark::constructFromString(const char *buffer, const S32 buffer_size)
|
||||
{
|
||||
const char* cur = buffer;
|
||||
S32 chars_read = 0;
|
||||
S32 chars_read_total = 0;
|
||||
S32 count = 0;
|
||||
U32 version = 0;
|
||||
|
||||
bool bad_block = false;
|
||||
LLLandmark* result = NULL;
|
||||
|
||||
// read version
|
||||
count = sscanf( cur, "Landmark version %u\n%n", &version, &chars_read );
|
||||
if(count != 1)
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
count = sscanf( buffer, "Landmark version %u\n%n", &version, &chars_read );
|
||||
chars_read_total += chars_read;
|
||||
|
||||
if(version == 1)
|
||||
{
|
||||
LLVector3d pos;
|
||||
cur += chars_read;
|
||||
// read position
|
||||
count = sscanf( cur, "position %lf %lf %lf\n%n", pos.mdV+VX, pos.mdV+VY, pos.mdV+VZ, &chars_read );
|
||||
if( count != 3 )
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
cur += chars_read;
|
||||
// LL_INFOS() << "Landmark read: " << pos << LL_ENDL;
|
||||
|
||||
return new LLLandmark(pos);
|
||||
}
|
||||
else if(version == 2)
|
||||
{
|
||||
// *NOTE: Changing the buffer size will require changing the
|
||||
// scanf call below.
|
||||
char region_id_str[MAX_STRING]; /* Flawfinder: ignore */
|
||||
LLVector3 pos;
|
||||
cur += chars_read;
|
||||
count = sscanf( /* Flawfinder: ignore */
|
||||
cur,
|
||||
"region_id %254s\n%n",
|
||||
region_id_str, &chars_read);
|
||||
if(count != 1) goto error;
|
||||
cur += chars_read;
|
||||
count = sscanf(cur, "local_pos %f %f %f\n%n", pos.mV+VX, pos.mV+VY, pos.mV+VZ, &chars_read);
|
||||
if(count != 3) goto error;
|
||||
cur += chars_read;
|
||||
LLLandmark* lm = new LLLandmark;
|
||||
lm->mRegionID.set(region_id_str);
|
||||
lm->mRegionPos = pos;
|
||||
return lm;
|
||||
}
|
||||
if (count != 1
|
||||
|| chars_read_total >= buffer_size)
|
||||
{
|
||||
bad_block = true;
|
||||
}
|
||||
|
||||
error:
|
||||
LL_INFOS() << "Bad Landmark Asset: bad _DATA_ block." << LL_ENDL;
|
||||
return NULL;
|
||||
if (!bad_block)
|
||||
{
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
LLVector3d pos;
|
||||
// read position
|
||||
count = sscanf(buffer + chars_read_total, "position %lf %lf %lf\n%n", pos.mdV + VX, pos.mdV + VY, pos.mdV + VZ, &chars_read);
|
||||
if (count != 3)
|
||||
{
|
||||
bad_block = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("Landmark") << "Landmark read: " << pos << LL_ENDL;
|
||||
result = new LLLandmark(pos);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
// *NOTE: Changing the buffer size will require changing the
|
||||
// scanf call below.
|
||||
char region_id_str[MAX_STRING];
|
||||
LLVector3 pos;
|
||||
LLUUID region_id;
|
||||
count = sscanf( buffer + chars_read_total,
|
||||
"region_id %254s\n%n",
|
||||
region_id_str,
|
||||
&chars_read);
|
||||
chars_read_total += chars_read;
|
||||
|
||||
if (count != 1
|
||||
|| chars_read_total >= buffer_size
|
||||
|| !LLUUID::validate(region_id_str))
|
||||
{
|
||||
bad_block = true;
|
||||
}
|
||||
|
||||
if (!bad_block)
|
||||
{
|
||||
region_id.set(region_id_str);
|
||||
if (region_id.isNull())
|
||||
{
|
||||
bad_block = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bad_block)
|
||||
{
|
||||
count = sscanf(buffer + chars_read_total, "local_pos %f %f %f\n%n", pos.mV + VX, pos.mV + VY, pos.mV + VZ, &chars_read);
|
||||
if (count != 3)
|
||||
{
|
||||
bad_block = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = new LLLandmark;
|
||||
result->mRegionID = region_id;
|
||||
result->mRegionPos = pos;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
LL_INFOS("Landmark") << "Encountered Unknown landmark version " << version << LL_ENDL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bad_block)
|
||||
{
|
||||
LL_INFOS("Landmark") << "Bad Landmark Asset: bad _DATA_ block." << LL_ENDL;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -176,7 +220,7 @@ void LLLandmark::requestRegionHandle(
|
|||
if(region_id.isNull())
|
||||
{
|
||||
// don't bother with checking - it's 0.
|
||||
LL_DEBUGS() << "requestRegionHandle: null" << LL_ENDL;
|
||||
LL_DEBUGS("Landmark") << "requestRegionHandle: null" << LL_ENDL;
|
||||
if(callback)
|
||||
{
|
||||
const U64 U64_ZERO = 0;
|
||||
|
|
@ -187,7 +231,7 @@ void LLLandmark::requestRegionHandle(
|
|||
{
|
||||
if(region_id == mLocalRegion.first)
|
||||
{
|
||||
LL_DEBUGS() << "requestRegionHandle: local" << LL_ENDL;
|
||||
LL_DEBUGS("Landmark") << "requestRegionHandle: local" << LL_ENDL;
|
||||
if(callback)
|
||||
{
|
||||
callback(region_id, mLocalRegion.second);
|
||||
|
|
@ -198,13 +242,13 @@ void LLLandmark::requestRegionHandle(
|
|||
region_map_t::iterator it = mRegions.find(region_id);
|
||||
if(it == mRegions.end())
|
||||
{
|
||||
LL_DEBUGS() << "requestRegionHandle: upstream" << LL_ENDL;
|
||||
LL_DEBUGS("Landmark") << "requestRegionHandle: upstream" << LL_ENDL;
|
||||
if(callback)
|
||||
{
|
||||
region_callback_map_t::value_type vt(region_id, callback);
|
||||
sRegionCallbackMap.insert(vt);
|
||||
}
|
||||
LL_DEBUGS() << "Landmark requesting information about: "
|
||||
LL_DEBUGS("Landmark") << "Landmark requesting information about: "
|
||||
<< region_id << LL_ENDL;
|
||||
msg->newMessage("RegionHandleRequest");
|
||||
msg->nextBlock("RequestBlock");
|
||||
|
|
@ -214,7 +258,7 @@ void LLLandmark::requestRegionHandle(
|
|||
else if(callback)
|
||||
{
|
||||
// we have the answer locally - just call the callack.
|
||||
LL_DEBUGS() << "requestRegionHandle: ready" << LL_ENDL;
|
||||
LL_DEBUGS("Landmark") << "requestRegionHandle: ready" << LL_ENDL;
|
||||
callback(region_id, (*it).second.mRegionHandle);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
|
||||
// constructs a new LLLandmark from a string
|
||||
// return NULL if there's an error
|
||||
static LLLandmark* constructFromString(const char *buffer);
|
||||
static LLLandmark* constructFromString(const char *buffer, const S32 buffer_size);
|
||||
|
||||
// register callbacks that this class handles
|
||||
static void registerCallbacks(LLMessageSystem* msg);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ project(llmath)
|
|||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(bugsplat)
|
||||
include(Boost)
|
||||
|
||||
include_directories(
|
||||
|
|
|
|||
|
|
@ -138,13 +138,24 @@ LLCoprocedureManager::~LLCoprocedureManager()
|
|||
close();
|
||||
}
|
||||
|
||||
LLCoprocedureManager::poolPtr_t LLCoprocedureManager::initializePool(const std::string &poolName)
|
||||
void LLCoprocedureManager::initializePool(const std::string &poolName)
|
||||
{
|
||||
poolMap_t::iterator it = mPoolMap.find(poolName);
|
||||
|
||||
if (it != mPoolMap.end())
|
||||
{
|
||||
// Pools are not supposed to be initialized twice
|
||||
// Todo: ideally restrict init to STATE_FIRST
|
||||
LL_ERRS() << "Pool is already present " << poolName << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
// Attempt to look up a pool size in the configuration. If found use that
|
||||
std::string keyName = "PoolSize" + poolName;
|
||||
int size = 0;
|
||||
|
||||
LL_ERRS_IF(poolName.empty(), "CoprocedureManager") << "Poolname must not be empty" << LL_ENDL;
|
||||
LL_INFOS("CoprocedureManager") << "Initializing pool " << poolName << LL_ENDL;
|
||||
|
||||
if (mPropertyQueryFn)
|
||||
{
|
||||
|
|
@ -171,8 +182,6 @@ LLCoprocedureManager::poolPtr_t LLCoprocedureManager::initializePool(const std::
|
|||
|
||||
bool inserted = mPoolMap.emplace(poolName, pool).second;
|
||||
LL_ERRS_IF(!inserted, "CoprocedureManager") << "Unable to add pool named \"" << poolName << "\" to map. FATAL!" << LL_ENDL;
|
||||
|
||||
return pool;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -182,20 +191,28 @@ LLUUID LLCoprocedureManager::enqueueCoprocedure(const std::string &pool, const s
|
|||
// not exist, create it.
|
||||
poolMap_t::iterator it = mPoolMap.find(pool);
|
||||
|
||||
poolPtr_t targetPool = (it != mPoolMap.end()) ? it->second : initializePool(pool);
|
||||
if (it == mPoolMap.end())
|
||||
{
|
||||
// initializing pools in enqueueCoprocedure is not thread safe,
|
||||
// at the moment pools need to be initialized manually
|
||||
LL_ERRS() << "Uninitialized pool " << pool << LL_ENDL;
|
||||
}
|
||||
|
||||
poolPtr_t targetPool = it->second;
|
||||
return targetPool->enqueueCoprocedure(name, proc);
|
||||
}
|
||||
|
||||
void LLCoprocedureManager::setPropertyMethods(SettingQuery_t queryfn, SettingUpdate_t updatefn)
|
||||
{
|
||||
// functions to discover and store the pool sizes
|
||||
// Might be a better idea to make an initializePool(name, size) to init everything externally
|
||||
mPropertyQueryFn = queryfn;
|
||||
mPropertyDefineFn = updatefn;
|
||||
|
||||
// workaround until we get mutex into initializePool
|
||||
initializePool("AssetStorage");
|
||||
initializePool("Upload");
|
||||
initializePool("AIS"); // it might be better to have some kind of on-demand initialization for AIS
|
||||
// "ExpCache" pool gets initialized in LLExperienceCache
|
||||
// asset storage pool gets initialized in LLViewerAssetStorage
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ public:
|
|||
|
||||
void close();
|
||||
void close(const std::string &pool);
|
||||
|
||||
void initializePool(const std::string &poolName);
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -87,8 +89,6 @@ private:
|
|||
|
||||
poolMap_t mPoolMap;
|
||||
|
||||
poolPtr_t initializePool(const std::string &poolName);
|
||||
|
||||
SettingQuery_t mPropertyQueryFn;
|
||||
SettingUpdate_t mPropertyDefineFn;
|
||||
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ void LLExperienceCache::initSingleton()
|
|||
cache_stream >> (*this);
|
||||
}
|
||||
|
||||
LLCoprocedureManager::instance().initializePool("ExpCache");
|
||||
|
||||
LLCoros::instance().launch("LLExperienceCache::idleCoro",
|
||||
boost::bind(&LLExperienceCache::idleCoro, this));
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ namespace tut
|
|||
{
|
||||
Sync sync;
|
||||
int foo = 0;
|
||||
LLCoprocedureManager::instance().initializePool("PoolName");
|
||||
LLUUID queueId = LLCoprocedureManager::instance().enqueueCoprocedure("PoolName", "ProcName",
|
||||
[&foo, &sync] (LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t & ptr, const LLUUID & id) {
|
||||
sync.bump();
|
||||
|
|
|
|||
|
|
@ -154,9 +154,9 @@ void LLPluginProcessParent::shutdown()
|
|||
{
|
||||
EState state = (*it).second->mState;
|
||||
if (state != STATE_CLEANUP
|
||||
|| state != STATE_EXITING
|
||||
|| state != STATE_DONE
|
||||
|| state != STATE_ERROR)
|
||||
&& state != STATE_EXITING
|
||||
&& state != STATE_DONE
|
||||
&& state != STATE_ERROR)
|
||||
{
|
||||
(*it).second->setState(STATE_GOODBYE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ U32 LLRender::sUIVerts = 0;
|
|||
U32 LLTexUnit::sWhiteTexture = 0;
|
||||
bool LLRender::sGLCoreProfile = false;
|
||||
bool LLRender::sNsightDebugSupport = false;
|
||||
LLVector2 LLRender::sUIGLScaleFactor = LLVector2(1.f, 1.f);
|
||||
|
||||
static const U32 LL_NUM_TEXTURE_LAYERS = 32;
|
||||
static const U32 LL_NUM_LIGHT_UNITS = 8;
|
||||
|
|
|
|||
|
|
@ -463,6 +463,7 @@ public:
|
|||
static U32 sUIVerts;
|
||||
static bool sGLCoreProfile;
|
||||
static bool sNsightDebugSupport;
|
||||
static LLVector2 sUIGLScaleFactor;
|
||||
|
||||
private:
|
||||
friend class LLLightState;
|
||||
|
|
|
|||
|
|
@ -106,11 +106,10 @@ void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixe
|
|||
top += LLFontGL::sCurOrigin.mY;
|
||||
|
||||
gGL.loadUIIdentity();
|
||||
LLRender2D *r2d_inst = LLRender2D::getInstance();
|
||||
gl_rect_2d(llfloor((F32)left * r2d_inst->mGLScaleFactor.mV[VX]) - pixel_offset,
|
||||
llfloor((F32)top * r2d_inst->mGLScaleFactor.mV[VY]) + pixel_offset,
|
||||
llfloor((F32)right * r2d_inst->mGLScaleFactor.mV[VX]) + pixel_offset,
|
||||
llfloor((F32)bottom * r2d_inst->mGLScaleFactor.mV[VY]) - pixel_offset,
|
||||
gl_rect_2d(llfloor((F32)left * LLRender::sUIGLScaleFactor.mV[VX]) - pixel_offset,
|
||||
llfloor((F32)top * LLRender::sUIGLScaleFactor.mV[VY]) + pixel_offset,
|
||||
llfloor((F32)right * LLRender::sUIGLScaleFactor.mV[VX]) + pixel_offset,
|
||||
llfloor((F32)bottom * LLRender::sUIGLScaleFactor.mV[VY]) - pixel_offset,
|
||||
filled);
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
|
|
@ -1568,7 +1567,6 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
|
||||
LLRender2D::LLRender2D(LLImageProviderInterface* image_provider)
|
||||
{
|
||||
mGLScaleFactor = LLVector2(1.f, 1.f);
|
||||
mImageProvider = image_provider;
|
||||
if(mImageProvider)
|
||||
{
|
||||
|
|
@ -1585,7 +1583,7 @@ LLRender2D::~LLRender2D()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLRender2D::translate(F32 x, F32 y, F32 z)
|
||||
{
|
||||
gGL.translateUI(x,y,z);
|
||||
|
|
@ -1594,12 +1592,14 @@ void LLRender2D::translate(F32 x, F32 y, F32 z)
|
|||
LLFontGL::sCurDepth += z;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLRender2D::pushMatrix()
|
||||
{
|
||||
gGL.pushUIMatrix();
|
||||
LLFontGL::sOriginStack.push_back(std::make_pair(LLFontGL::sCurOrigin, LLFontGL::sCurDepth));
|
||||
}
|
||||
|
||||
// static
|
||||
void LLRender2D::popMatrix()
|
||||
{
|
||||
gGL.popUIMatrix();
|
||||
|
|
@ -1608,6 +1608,7 @@ void LLRender2D::popMatrix()
|
|||
LLFontGL::sOriginStack.pop_back();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLRender2D::loadIdentity()
|
||||
{
|
||||
gGL.loadUIIdentity();
|
||||
|
|
@ -1616,15 +1617,11 @@ void LLRender2D::loadIdentity()
|
|||
LLFontGL::sCurDepth = 0.f;
|
||||
}
|
||||
|
||||
void LLRender2D::setScaleFactor(const LLVector2 &scale_factor)
|
||||
{
|
||||
mGLScaleFactor = scale_factor;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLRender2D::setLineWidth(F32 width)
|
||||
{
|
||||
gGL.flush();
|
||||
glLineWidth(width * lerp(mGLScaleFactor.mV[VX], mGLScaleFactor.mV[VY], 0.5f));
|
||||
glLineWidth(width * lerp(LLRender::sUIGLScaleFactor.mV[VX], LLRender::sUIGLScaleFactor.mV[VY], 0.5f));
|
||||
}
|
||||
|
||||
LLPointer<LLUIImage> LLRender2D::getUIImageByID(const LLUUID& image_id, S32 priority)
|
||||
|
|
|
|||
|
|
@ -128,19 +128,16 @@ class LLRender2D : public LLParamSingleton<LLRender2D>
|
|||
LOG_CLASS(LLRender2D);
|
||||
~LLRender2D();
|
||||
public:
|
||||
void pushMatrix();
|
||||
void popMatrix();
|
||||
void loadIdentity();
|
||||
void translate(F32 x, F32 y, F32 z = 0.0f);
|
||||
static void pushMatrix();
|
||||
static void popMatrix();
|
||||
static void loadIdentity();
|
||||
static void translate(F32 x, F32 y, F32 z = 0.0f);
|
||||
|
||||
void setLineWidth(F32 width);
|
||||
void setScaleFactor(const LLVector2& scale_factor);
|
||||
static void setLineWidth(F32 width);
|
||||
|
||||
LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0);
|
||||
LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0);
|
||||
|
||||
LLVector2 mGLScaleFactor;
|
||||
|
||||
protected:
|
||||
// since LLRender2D has no control of image provider's lifecycle
|
||||
// we need a way to tell LLRender2D that provider died and
|
||||
|
|
|
|||
|
|
@ -1006,7 +1006,7 @@ void LLAccordionCtrlTab::drawChild(const LLRect& root_rect,LLView* child)
|
|||
LLRect screen_rect;
|
||||
localRectToScreen(child->getRect(),&screen_rect);
|
||||
|
||||
if ( root_rect.overlaps(screen_rect) && LLUI::getInstance()->mDirtyRect.overlaps(screen_rect))
|
||||
if ( root_rect.overlaps(screen_rect) && sDirtyRect.overlaps(screen_rect))
|
||||
{
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
LLUI::pushMatrix();
|
||||
|
|
|
|||
|
|
@ -180,7 +180,9 @@ void LLConsole::draw()
|
|||
|
||||
LLUIImagePtr imagep = LLUI::getUIImage("transparent");
|
||||
|
||||
F32 console_opacity = llclamp(LLUI::getInstance()->mSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
|
||||
static LLCachedControl<F32> console_bg_opacity(*LLUI::getInstance()->mSettingGroups["config"], "ConsoleBackgroundOpacity", 0.7f);
|
||||
F32 console_opacity = llclamp(console_bg_opacity(), 0.f, 1.f);
|
||||
|
||||
LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
|
||||
color.mV[VALPHA] *= console_opacity;
|
||||
|
||||
|
|
|
|||
|
|
@ -381,13 +381,15 @@ void LLFloater::layoutDragHandle()
|
|||
// static
|
||||
void LLFloater::updateActiveFloaterTransparency()
|
||||
{
|
||||
sActiveControlTransparency = LLUI::getInstance()->mSettingGroups["config"]->getF32("ActiveFloaterTransparency");
|
||||
static LLCachedControl<F32> active_transparency(*LLUI::getInstance()->mSettingGroups["config"], "ActiveFloaterTransparency", 1.f);
|
||||
sActiveControlTransparency = active_transparency;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloater::updateInactiveFloaterTransparency()
|
||||
{
|
||||
sInactiveControlTransparency = LLUI::getInstance()->mSettingGroups["config"]->getF32("InactiveFloaterTransparency");
|
||||
static LLCachedControl<F32> inactive_transparency(*LLUI::getInstance()->mSettingGroups["config"], "InactiveFloaterTransparency", 0.95f);
|
||||
sInactiveControlTransparency = inactive_transparency;
|
||||
}
|
||||
|
||||
void LLFloater::addResizeCtrls()
|
||||
|
|
|
|||
|
|
@ -342,9 +342,9 @@ static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View");
|
|||
void LLFolderView::filter( LLFolderViewFilter& filter )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FILTER);
|
||||
static LLCachedControl<S32> filter_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
|
||||
static LLCachedControl<S32> filter_hidden(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1);
|
||||
filter.resetTime(llclamp(mParentPanel.get()->getVisible() ? filter_visible() : filter_hidden(), 1, 100));
|
||||
static LLCachedControl<S32> time_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
|
||||
static LLCachedControl<S32> time_invisible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1);
|
||||
filter.resetTime(llclamp((mParentPanel.get()->getVisible() ? time_visible() : time_invisible()), 1, 100));
|
||||
|
||||
// Note: we filter the model, not the view
|
||||
getViewModelItem()->filter(filter);
|
||||
|
|
@ -663,7 +663,8 @@ void LLFolderView::draw()
|
|||
closeAutoOpenedFolders();
|
||||
}
|
||||
|
||||
if (mSearchTimer.getElapsedTimeF32() > LLUI::getInstance()->mSettingGroups["config"]->getF32("TypeAheadTimeout") || !mSearchString.size())
|
||||
static LLCachedControl<F32> type_ahead_timeout(*LLUI::getInstance()->mSettingGroups["config"], "TypeAheadTimeout", 1.5f);
|
||||
if (mSearchTimer.getElapsedTimeF32() > type_ahead_timeout || !mSearchString.size())
|
||||
{
|
||||
mSearchString.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -962,9 +962,10 @@ void LLFolderViewItem::draw()
|
|||
//
|
||||
if (filter_string_length > 0)
|
||||
{
|
||||
F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mViewModelItem->getFilterStringOffset());
|
||||
S32 filter_offset = mViewModelItem->getFilterStringOffset();
|
||||
F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, filter_offset + filter_string_length) - font->getWidthF32(combined_string, filter_offset, filter_string_length);
|
||||
F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
|
||||
font->renderUTF8( combined_string, mViewModelItem->getFilterStringOffset(), match_string_left, yy,
|
||||
font->renderUTF8( combined_string, filter_offset, match_string_left, yy,
|
||||
sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
|
||||
filter_string_length, S32_MAX, &right_x, FALSE );
|
||||
}
|
||||
|
|
@ -1607,7 +1608,7 @@ void LLFolderViewFolder::destroyView()
|
|||
|
||||
// extractItem() removes the specified item from the folder, but
|
||||
// doesn't delete it.
|
||||
void LLFolderViewFolder::extractItem( LLFolderViewItem* item )
|
||||
void LLFolderViewFolder::extractItem( LLFolderViewItem* item, bool deparent_model )
|
||||
{
|
||||
if (item->isSelected())
|
||||
getRoot()->clearSelection();
|
||||
|
|
@ -1630,7 +1631,11 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item )
|
|||
mItems.erase(it);
|
||||
}
|
||||
//item has been removed, need to update filter
|
||||
getViewModelItem()->removeChild(item->getViewModelItem());
|
||||
if (deparent_model)
|
||||
{
|
||||
// in some cases model does not belong to parent view, is shared between views
|
||||
getViewModelItem()->removeChild(item->getViewModelItem());
|
||||
}
|
||||
//because an item is going away regardless of filter status, force rearrange
|
||||
requestArrange();
|
||||
removeChild(item);
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ public:
|
|||
|
||||
// extractItem() removes the specified item from the folder, but
|
||||
// doesn't delete it.
|
||||
virtual void extractItem( LLFolderViewItem* item );
|
||||
virtual void extractItem( LLFolderViewItem* item, bool deparent_model = true);
|
||||
|
||||
// This function is called by a child that needs to be resorted.
|
||||
void resort(LLFolderViewItem* item);
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ std::string LLFolderViewModelCommon::getStatusText()
|
|||
|
||||
void LLFolderViewModelCommon::filter()
|
||||
{
|
||||
static LLCachedControl<S32> filter_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
|
||||
getFilter().resetTime(llclamp(filter_visible(), 1, 100));
|
||||
mFolderView->getViewModelItem()->filter(getFilter());
|
||||
static LLCachedControl<S32> max_time(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
|
||||
getFilter().resetTime(llclamp(max_time(), 1, 100));
|
||||
mFolderView->getViewModelItem()->filter(getFilter());
|
||||
}
|
||||
|
||||
bool LLFolderViewModelItemCommon::hasFilterStringMatch()
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ LLMultiSlider::LLMultiSlider(const LLMultiSlider::Params& p)
|
|||
}
|
||||
}
|
||||
|
||||
mRoundedSquareImgp = LLUI::getUIImage("Rounded_Square");
|
||||
if (p.thumb_image.isProvided())
|
||||
{
|
||||
mThumbImagep = LLUI::getUIImage(p.thumb_image());
|
||||
|
|
@ -666,8 +667,6 @@ void LLMultiSlider::draw()
|
|||
F32 opacity = getEnabled() ? 1.f : 0.3f;
|
||||
|
||||
// Track
|
||||
LLUIImagePtr thumb_imagep = LLUI::getUIImage("Rounded_Square");
|
||||
|
||||
static LLUICachedControl<S32> multi_track_height_width ("UIMultiTrackHeight", 0);
|
||||
S32 height_offset = 0;
|
||||
S32 width_offset = 0;
|
||||
|
|
@ -685,7 +684,7 @@ void LLMultiSlider::draw()
|
|||
if(mDrawTrack)
|
||||
{
|
||||
track_rect.stretch(-1);
|
||||
thumb_imagep->draw(track_rect, mTrackColor.get() % opacity);
|
||||
mRoundedSquareImgp->draw(track_rect, mTrackColor.get() % opacity);
|
||||
}
|
||||
|
||||
// if we're supposed to use a drawn triangle
|
||||
|
|
@ -704,7 +703,7 @@ void LLMultiSlider::draw()
|
|||
mTriangleColor.get() % opacity, TRUE);
|
||||
}
|
||||
}
|
||||
else if (!thumb_imagep && !mThumbImagep)
|
||||
else if (!mRoundedSquareImgp && !mThumbImagep)
|
||||
{
|
||||
// draw all the thumbs
|
||||
curSldrIt = mThumbRects.end();
|
||||
|
|
@ -757,7 +756,7 @@ void LLMultiSlider::draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
thumb_imagep->drawSolid(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f);
|
||||
mRoundedSquareImgp->drawSolid(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -772,7 +771,7 @@ void LLMultiSlider::draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
thumb_imagep->drawBorder(mThumbRects[mCurSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth());
|
||||
mRoundedSquareImgp->drawBorder(mThumbRects[mCurSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -784,7 +783,7 @@ void LLMultiSlider::draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
thumb_imagep->drawBorder(mThumbRects[mHoverSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth());
|
||||
mRoundedSquareImgp->drawBorder(mThumbRects[mHoverSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -822,11 +821,11 @@ void LLMultiSlider::draw()
|
|||
}
|
||||
else if (capture == this)
|
||||
{
|
||||
thumb_imagep->drawSolid(mIt->second, curThumbColor);
|
||||
mRoundedSquareImgp->drawSolid(mIt->second, curThumbColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
thumb_imagep->drawSolid(mIt->second, curThumbColor % opacity);
|
||||
mRoundedSquareImgp->drawSolid(mIt->second, curThumbColor % opacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -846,11 +845,11 @@ void LLMultiSlider::draw()
|
|||
}
|
||||
else if (capture == this)
|
||||
{
|
||||
thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get());
|
||||
mRoundedSquareImgp->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get());
|
||||
}
|
||||
else
|
||||
{
|
||||
thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get() % opacity);
|
||||
mRoundedSquareImgp->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get() % opacity);
|
||||
}
|
||||
}
|
||||
if(hoverSldrIt != mThumbRects.end())
|
||||
|
|
@ -861,7 +860,7 @@ void LLMultiSlider::draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
thumb_imagep->drawSolid(hoverSldrIt->second, mThumbCenterSelectedColor.get());
|
||||
mRoundedSquareImgp->drawSolid(hoverSldrIt->second, mThumbCenterSelectedColor.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ protected:
|
|||
LLUIColor mDisabledThumbColor;
|
||||
LLUIColor mTriangleColor;
|
||||
LLUIImagePtr mThumbImagep; //blimps on the slider, for now no 'disabled' support
|
||||
LLUIImagePtr mRoundedSquareImgp; //blimps on the slider, for now no 'disabled' support
|
||||
|
||||
const EOrientation mOrientation;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,9 +27,8 @@
|
|||
|
||||
// Many classes just store a single LLNotificationPtr
|
||||
// and llnotifications.h is very large, so define this ligher header.
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
class LLNotification;
|
||||
typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
|
||||
typedef std::shared_ptr<LLNotification> LLNotificationPtr;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@
|
|||
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
|
@ -305,7 +304,7 @@ typedef boost::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibility
|
|||
*/
|
||||
class LLNotification :
|
||||
boost::noncopyable,
|
||||
public boost::enable_shared_from_this<LLNotification>
|
||||
public std::enable_shared_from_this<LLNotification>
|
||||
{
|
||||
LOG_CLASS(LLNotification);
|
||||
friend class LLNotifications;
|
||||
|
|
@ -744,7 +743,10 @@ public:
|
|||
: mFilter(filter),
|
||||
mItems()
|
||||
{}
|
||||
virtual ~LLNotificationChannelBase() {}
|
||||
virtual ~LLNotificationChannelBase()
|
||||
{
|
||||
mItems.clear();
|
||||
}
|
||||
// you can also connect to a Channel, so you can be notified of
|
||||
// changes to this channel
|
||||
LLBoundListener connectChanged(const LLEventListener& slot)
|
||||
|
|
@ -874,6 +876,7 @@ class LLNotifications :
|
|||
{
|
||||
LLSINGLETON(LLNotifications);
|
||||
LOG_CLASS(LLNotifications);
|
||||
virtual ~LLNotifications() {}
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -1071,7 +1074,11 @@ public:
|
|||
LLPersistentNotificationChannel()
|
||||
: LLNotificationChannel("Persistent", "Visible", ¬ificationFilter)
|
||||
{}
|
||||
virtual ~LLPersistentNotificationChannel() {}
|
||||
|
||||
virtual ~LLPersistentNotificationChannel()
|
||||
{
|
||||
mHistory.clear();
|
||||
}
|
||||
|
||||
typedef std::vector<LLNotificationPtr> history_list_t;
|
||||
history_list_t::iterator beginHistory() { sortHistory(); return mHistory.begin(); }
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ void LLScrollColumnHeader::updateResizeBars()
|
|||
for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++)
|
||||
{
|
||||
LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
|
||||
if (columnp->mHeader && columnp->mHeader->canResize())
|
||||
if (columnp && columnp->mHeader && columnp->mHeader->canResize())
|
||||
{
|
||||
num_resizable_columns++;
|
||||
}
|
||||
|
|
@ -269,7 +269,7 @@ void LLScrollColumnHeader::updateResizeBars()
|
|||
for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++)
|
||||
{
|
||||
LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
|
||||
if (!columnp->mHeader) continue;
|
||||
if (!columnp || !columnp->mHeader) continue;
|
||||
BOOL enable = num_resizable_columns >= 2 && num_resizers_enabled < (num_resizable_columns - 1) && columnp->mHeader->canResize();
|
||||
columnp->mHeader->enableResizeBar(enable);
|
||||
if (enable)
|
||||
|
|
|
|||
|
|
@ -743,12 +743,12 @@ void LLScrollListCtrl::updateColumns(bool force_update)
|
|||
LLScrollColumnHeader* last_header = NULL;
|
||||
for (column_ordered_it = mColumnsIndexed.begin(); column_ordered_it != mColumnsIndexed.end(); ++column_ordered_it)
|
||||
{
|
||||
if ((*column_ordered_it)->getWidth() < 0)
|
||||
LLScrollListColumn* column = *column_ordered_it;
|
||||
if (!column || column->getWidth() < 0)
|
||||
{
|
||||
// skip hidden columns
|
||||
continue;
|
||||
}
|
||||
LLScrollListColumn* column = *column_ordered_it;
|
||||
|
||||
if (column->mHeader)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1129,7 +1129,7 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
|
|||
BOOL handled = FALSE;
|
||||
|
||||
S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY);
|
||||
S32 drag_threshold = LLUI::getInstance()->mSettingGroups["config"]->getS32("DragAndDropDistanceThreshold");
|
||||
static LLCachedControl<S32> drag_threshold(*LLUI::getInstance()->mSettingGroups["config"], "DragAndDropDistanceThreshold", 3);
|
||||
if (mouse_distance_squared > drag_threshold * drag_threshold
|
||||
&& hasMouseCapture() &&
|
||||
mStartDragItemCallback && mHandleDragItemCallback)
|
||||
|
|
|
|||
|
|
@ -358,8 +358,8 @@ void LLToolTip::draw()
|
|||
|
||||
if (mFadeTimer.getStarted())
|
||||
{
|
||||
F32 tool_tip_fade_time = LLUI::getInstance()->mSettingGroups["config"]->getF32("ToolTipFadeTime");
|
||||
alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, tool_tip_fade_time, 1.f, 0.f);
|
||||
static LLCachedControl<F32> tool_tip_fade_time(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFadeTime", 0.2f);
|
||||
alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, tool_tip_fade_time(), 1.f, 0.f);
|
||||
if (alpha == 0.f)
|
||||
{
|
||||
// finished fading out, so hide ourselves
|
||||
|
|
|
|||
|
|
@ -154,7 +154,6 @@ mAudioCallback(audio_callback),
|
|||
mDeferredAudioCallback(deferred_audio_callback),
|
||||
mWindow(NULL), // set later in startup
|
||||
mRootView(NULL),
|
||||
mDirty(FALSE),
|
||||
mHelpImpl(NULL)
|
||||
{
|
||||
LLRender2D::initParamSingleton(image_provider);
|
||||
|
|
@ -203,19 +202,6 @@ void LLUI::setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t& rem
|
|||
mClearPopupsFunc = clear_popups;
|
||||
}
|
||||
|
||||
void LLUI::dirtyRect(LLRect rect)
|
||||
{
|
||||
if (!mDirty)
|
||||
{
|
||||
mDirtyRect = rect;
|
||||
mDirty = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
mDirtyRect.unionWith(rect);
|
||||
}
|
||||
}
|
||||
|
||||
void LLUI::setMousePositionScreen(S32 x, S32 y)
|
||||
{
|
||||
#if defined(LL_DARWIN)
|
||||
|
|
@ -510,6 +496,18 @@ const LLView* LLUI::resolvePath(const LLView* context, const std::string& path)
|
|||
return context;
|
||||
}
|
||||
|
||||
//static
|
||||
LLVector2& LLUI::getScaleFactor()
|
||||
{
|
||||
return LLRender::sUIGLScaleFactor;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLUI::setScaleFactor(const LLVector2& scale_factor)
|
||||
{
|
||||
LLRender::sUIGLScaleFactor = scale_factor;
|
||||
}
|
||||
|
||||
|
||||
// LLLocalClipRect and LLScreenClipRect moved to lllocalcliprect.h/cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -245,10 +245,6 @@ public:
|
|||
|
||||
void setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t&, const clear_popups_t& );
|
||||
|
||||
LLRect mDirtyRect;
|
||||
BOOL mDirty;
|
||||
void dirtyRect(LLRect rect);
|
||||
|
||||
// Return the ISO639 language name ("en", "ko", etc.) for the viewer UI.
|
||||
// http://www.loc.gov/standards/iso639-2/php/code_list.php
|
||||
std::string getUILanguage();
|
||||
|
|
@ -313,14 +309,14 @@ public:
|
|||
void positionViewNearMouse(LLView* view, S32 spawn_x = S32_MAX, S32 spawn_y = S32_MAX);
|
||||
|
||||
// LLRender2D wrappers
|
||||
static void pushMatrix() { LLRender2D::getInstance()->pushMatrix(); }
|
||||
static void popMatrix() { LLRender2D::getInstance()->popMatrix(); }
|
||||
static void loadIdentity() { LLRender2D::getInstance()->loadIdentity(); }
|
||||
static void translate(F32 x, F32 y, F32 z = 0.0f) { LLRender2D::getInstance()->translate(x, y, z); }
|
||||
static void pushMatrix() { LLRender2D::pushMatrix(); }
|
||||
static void popMatrix() { LLRender2D::popMatrix(); }
|
||||
static void loadIdentity() { LLRender2D::loadIdentity(); }
|
||||
static void translate(F32 x, F32 y, F32 z = 0.0f) { LLRender2D::translate(x, y, z); }
|
||||
|
||||
static LLVector2& getScaleFactor() { return LLRender2D::getInstance()->mGLScaleFactor; }
|
||||
static void setScaleFactor(const LLVector2& scale_factor) { LLRender2D::getInstance()->setScaleFactor(scale_factor); }
|
||||
static void setLineWidth(F32 width) { LLRender2D::getInstance()->setLineWidth(width); }
|
||||
static LLVector2& getScaleFactor();
|
||||
static void setScaleFactor(const LLVector2& scale_factor);
|
||||
static void setLineWidth(F32 width) { LLRender2D::setLineWidth(width); }
|
||||
static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0)
|
||||
{ return LLRender2D::getInstance()->getUIImageByID(image_id, priority); }
|
||||
static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0)
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ void LLUrlEntryBase::callObservers(const std::string &id,
|
|||
bool LLUrlEntryBase::isLinkDisabled() const
|
||||
{
|
||||
// this allows us to have a global setting to turn off text hyperlink highlighting/action
|
||||
bool globally_disabled = LLUI::getInstance()->mSettingGroups["config"]->getBOOL("DisableTextHyperlinkActions");
|
||||
static LLCachedControl<bool> globally_disabled(*LLUI::getInstance()->mSettingGroups["config"], "DisableTextHyperlinkActions", false);
|
||||
|
||||
return globally_disabled;
|
||||
}
|
||||
|
|
@ -465,7 +465,9 @@ LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL()
|
|||
"|"
|
||||
"(https://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com(:\\d{1,5})?)"
|
||||
"|"
|
||||
"(https://([-\\w\\.]*\\.)?secondlifegrid\\.net(:\\d{1,5})?))"
|
||||
"(https://([-\\w\\.]*\\.)?secondlifegrid\\.net(:\\d{1,5})?)"
|
||||
"|"
|
||||
"(https?://([-\\w\\.]*\\.)?secondlife\\.io(:\\d{1,5})?))"
|
||||
"\\/\\S*",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
|
||||
|
|
@ -1128,7 +1130,7 @@ std::string LLUrlEntryPlace::getLocation(const std::string &url) const
|
|||
//
|
||||
LLUrlEntryRegion::LLUrlEntryRegion()
|
||||
{
|
||||
mPattern = boost::regex("secondlife:///app/region/[^/\\s]+(/\\d+)?(/\\d+)?(/\\d+)?/?",
|
||||
mPattern = boost::regex("secondlife:///app/region/[A-Za-z0-9()_%]+(/\\d+)?(/\\d+)?(/\\d+)?/?",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
mMenuName = "menu_url_slurl.xml";
|
||||
mTooltip = LLTrans::getString("TooltipSLURL");
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ static const S32 LINE_HEIGHT = 15;
|
|||
|
||||
S32 LLView::sDepth = 0;
|
||||
bool LLView::sDebugRects = false;
|
||||
bool LLView::sIsRectDirty = false;
|
||||
LLRect LLView::sDirtyRect;
|
||||
bool LLView::sDebugRectsShowNames = true;
|
||||
bool LLView::sDebugKeys = false;
|
||||
bool LLView::sDebugMouseHandling = false;
|
||||
|
|
@ -885,14 +887,16 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
std::string tooltip = getToolTip();
|
||||
if (!tooltip.empty())
|
||||
{
|
||||
static LLCachedControl<F32> tooltip_fast_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFastDelay", 0.1f);
|
||||
static LLCachedControl<F32> tooltip_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipDelay", 0.7f);
|
||||
static LLCachedControl<bool> allow_ui_tooltips(*LLUI::getInstance()->mSettingGroups["config"], "BasicUITooltips", true);
|
||||
// allow "scrubbing" over ui by showing next tooltip immediately
|
||||
// if previous one was still visible
|
||||
F32 timeout = LLToolTipMgr::instance().toolTipVisible()
|
||||
? LLUI::getInstance()->mSettingGroups["config"]->getF32( "ToolTipFastDelay" )
|
||||
: LLUI::getInstance()->mSettingGroups["config"]->getF32( "ToolTipDelay" );
|
||||
? tooltip_fast_delay
|
||||
: tooltip_delay;
|
||||
|
||||
// Even if we don't show tooltips, consume the event, nothing below should show tooltip
|
||||
bool allow_ui_tooltips = LLUI::getInstance()->mSettingGroups["config"]->getBOOL("BasicUITooltips");
|
||||
if (allow_ui_tooltips)
|
||||
{
|
||||
LLToolTipMgr::instance().show(LLToolTip::Params()
|
||||
|
|
@ -1189,7 +1193,7 @@ void LLView::drawChildren()
|
|||
if (viewp->getVisible() && viewp->getRect().isValid())
|
||||
{
|
||||
LLRect screen_rect = viewp->calcScreenRect();
|
||||
if ( rootp->getLocalRect().overlaps(screen_rect) && LLUI::getInstance()->mDirtyRect.overlaps(screen_rect))
|
||||
if ( rootp->getLocalRect().overlaps(screen_rect) && sDirtyRect.overlaps(screen_rect))
|
||||
{
|
||||
LLUI::pushMatrix();
|
||||
{
|
||||
|
|
@ -1231,7 +1235,15 @@ void LLView::dirtyRect()
|
|||
parent = parent->getParent();
|
||||
}
|
||||
|
||||
LLUI::getInstance()->dirtyRect(cur->calcScreenRect());
|
||||
if (!sIsRectDirty)
|
||||
{
|
||||
sDirtyRect = cur->calcScreenRect();
|
||||
sIsRectDirty = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sDirtyRect.unionWith(cur->calcScreenRect());
|
||||
}
|
||||
}
|
||||
|
||||
//Draw a box for debugging.
|
||||
|
|
|
|||
|
|
@ -657,6 +657,9 @@ public:
|
|||
// Draw debug rectangles around widgets to help with alignment and spacing
|
||||
static bool sDebugRects;
|
||||
|
||||
static bool sIsRectDirty;
|
||||
static LLRect sDirtyRect;
|
||||
|
||||
// Draw widget names and sizes when drawing debug rectangles, turning this
|
||||
// off is useful to make the rectangles themselves easier to see.
|
||||
static bool sDebugRectsShowNames;
|
||||
|
|
|
|||
|
|
@ -739,11 +739,6 @@ namespace tut
|
|||
"XXX secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30 XXX",
|
||||
"secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30");
|
||||
|
||||
// DEV-35459: SLURLs and teleport Links not parsed properly
|
||||
testRegex("Region with quote", url,
|
||||
"XXX secondlife:///app/region/A'ksha%20Oasis/41/166/701 XXX",
|
||||
"secondlife:///app/region/A%27ksha%20Oasis/41/166/701");
|
||||
|
||||
// Rendering tests.
|
||||
testLabel("Render /app/region/Ahern/50/50/50/", url,
|
||||
"secondlife:///app/region/Ahern/50/50/50/",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
This component is no longer used in Linden Lab builds.
|
||||
Change requests to support continued use by open source
|
||||
builds are welcome.
|
||||
|
|
@ -8,9 +8,7 @@ include(00-Common)
|
|||
include(Linking)
|
||||
|
||||
include(Boost)
|
||||
if (BUGSPLAT_DB)
|
||||
include(bugsplat)
|
||||
endif (BUGSPLAT_DB)
|
||||
include(bugsplat)
|
||||
include(BuildPackagesInfo)
|
||||
include(BuildVersion)
|
||||
include(CMakeCopyIfDifferent)
|
||||
|
|
@ -96,18 +94,18 @@ include_directories(
|
|||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if (BUGSPLAT_DB)
|
||||
include_directories(
|
||||
${BUGSPLAT_INCLUDE_DIR}
|
||||
)
|
||||
endif (BUGSPLAT_DB)
|
||||
|
||||
include_directories(SYSTEM
|
||||
${LLCOMMON_SYSTEM_INCLUDE_DIRS}
|
||||
${LLXML_SYSTEM_INCLUDE_DIRS}
|
||||
${LLPHYSICSEXTENSIONS_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
include_directories(AFTER
|
||||
${BUGSPLAT_INCLUDE_DIR}
|
||||
)
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
set(viewer_SOURCE_FILES
|
||||
groupchatlistener.cpp
|
||||
llaccountingcostmanager.cpp
|
||||
|
|
@ -1423,11 +1421,11 @@ if (DARWIN)
|
|||
${COREAUDIO_LIBRARY}
|
||||
)
|
||||
|
||||
if (BUGSPLAT_DB)
|
||||
if (USE_BUGSPLAT)
|
||||
list(APPEND viewer_LIBRARIES
|
||||
${BUGSPLAT_LIBRARIES}
|
||||
)
|
||||
endif (BUGSPLAT_DB)
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
# Add resource files to the project.
|
||||
set(viewer_RESOURCE_FILES
|
||||
|
|
@ -1765,10 +1763,10 @@ if (SDL_FOUND)
|
|||
)
|
||||
endif (SDL_FOUND)
|
||||
|
||||
if (BUGSPLAT_DB)
|
||||
if (USE_BUGSPLAT)
|
||||
set_property(TARGET ${VIEWER_BINARY_NAME}
|
||||
PROPERTY COMPILE_DEFINITIONS "LL_BUGSPLAT")
|
||||
endif (BUGSPLAT_DB)
|
||||
PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
# add package files
|
||||
file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST
|
||||
|
|
@ -1847,9 +1845,12 @@ if (WINDOWS)
|
|||
media_plugin_libvlc
|
||||
media_plugin_example
|
||||
winmm_shim
|
||||
windows-crash-logger
|
||||
)
|
||||
|
||||
if (NOT USE_BUGSPLAT)
|
||||
LIST(APPEND COPY_INPUT_DEPENDENCIES windows-crash-logger)
|
||||
endif (NOT USE_BUGSPLAT)
|
||||
|
||||
if (ADDRESS_SIZE EQUAL 64)
|
||||
list(APPEND COPY_INPUT_DEPENDENCIES
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk_x64.dll
|
||||
|
|
@ -1912,10 +1913,11 @@ if (WINDOWS)
|
|||
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
|
||||
endif (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
|
||||
|
||||
add_dependencies(${VIEWER_BINARY_NAME}
|
||||
SLPlugin
|
||||
windows-crash-logger
|
||||
)
|
||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin)
|
||||
|
||||
if (NOT USE_BUGSPLAT)
|
||||
add_dependencies(${VIEWER_BINARY_NAME} windows-crash-logger)
|
||||
endif (NOT USE_BUGSPLAT)
|
||||
|
||||
# sets the 'working directory' for debugging from visual studio.
|
||||
# Condition for version can be moved to requirements once build agents will be updated (see TOOL-3865)
|
||||
|
|
@ -2067,11 +2069,11 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
|||
${LLAPPEARANCE_LIBRARIES}
|
||||
)
|
||||
|
||||
if (BUGSPLAT_DB)
|
||||
if (USE_BUGSPLAT)
|
||||
target_link_libraries(${VIEWER_BINARY_NAME}
|
||||
${BUGSPLAT_LIBRARIES}
|
||||
)
|
||||
endif (BUGSPLAT_DB)
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
|
||||
"Path to artwork files.")
|
||||
|
|
@ -2082,13 +2084,16 @@ if (LINUX)
|
|||
# These are the generated targets that are copied to package/
|
||||
set(COPY_INPUT_DEPENDENCIES
|
||||
${VIEWER_BINARY_NAME}
|
||||
linux-crash-logger
|
||||
SLPlugin
|
||||
media_plugin_gstreamer010
|
||||
media_plugin_libvlc
|
||||
llcommon
|
||||
)
|
||||
|
||||
if (NOT USE_BUGSPLAT)
|
||||
LIST(APPEND COPY_INPUT_DEPENDENCIES linux-crash-logger)
|
||||
endif (NOT USE_BUGSPLAT)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${product}.tar.bz2
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
|
|
@ -2219,8 +2224,11 @@ if (DARWIN)
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
)
|
||||
|
||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef mac-crash-logger)
|
||||
add_dependencies(${VIEWER_BINARY_NAME} mac-crash-logger)
|
||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
|
||||
|
||||
if (NOT USE_BUGSPLAT)
|
||||
add_dependencies(${VIEWER_BINARY_NAME} mac-crash-logger)
|
||||
endif (NOT USE_BUGSPLAT)
|
||||
|
||||
if (ENABLE_SIGNING)
|
||||
set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}")
|
||||
|
|
@ -2263,7 +2271,7 @@ endif (INSTALL)
|
|||
|
||||
# Note that the conventional VIEWER_SYMBOL_FILE is set by ../../build.sh
|
||||
if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIEWER_SYMBOL_FILE)
|
||||
if (NOT BUGSPLAT_DB)
|
||||
if (NOT USE_BUGSPLAT)
|
||||
# Breakpad symbol-file generation
|
||||
set(SYMBOL_SEARCH_DIRS "")
|
||||
if (WINDOWS)
|
||||
|
|
@ -2280,7 +2288,7 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
|
|||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}")
|
||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_crash_logger/${CMAKE_CFG_INTDIR}")
|
||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}")
|
||||
set(VIEWER_EXE_GLOBS "'${product}' SLPlugin mac-crash-logger")
|
||||
set(VIEWER_EXE_GLOBS "'${product}' SLPlugin")
|
||||
set(VIEWER_EXE_GLOBS "'${product}' mac-crash-logger")
|
||||
set(VIEWER_LIB_GLOB "*.dylib")
|
||||
endif (DARWIN)
|
||||
|
|
@ -2318,7 +2326,7 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
|
|||
add_dependencies(generate_symbols "${VIEWER_COPY_MANIFEST}")
|
||||
endif (WINDOWS OR LINUX)
|
||||
|
||||
else (NOT BUGSPLAT_DB)
|
||||
else (NOT USE_BUGSPLAT)
|
||||
# BugSplat symbol-file generation
|
||||
if (WINDOWS)
|
||||
# Just pack up a tarball containing only the .pdb file for the
|
||||
|
|
@ -2402,9 +2410,9 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
|
|||
if (LINUX)
|
||||
# TBD
|
||||
endif (LINUX)
|
||||
endif (NOT BUGSPLAT_DB)
|
||||
endif (NOT USE_BUGSPLAT)
|
||||
|
||||
# for both BUGSPLAT_DB and Breakpad
|
||||
# for both Bugsplat and Breakpad
|
||||
add_dependencies(llpackage generate_symbols)
|
||||
endif ()
|
||||
|
||||
|
|
@ -2537,6 +2545,10 @@ if (LL_TESTS)
|
|||
${BOOST_CONTEXT_LIBRARY}
|
||||
)
|
||||
|
||||
LL_ADD_INTEGRATION_TEST(cppfeatures
|
||||
""
|
||||
"${test_libs}"
|
||||
)
|
||||
LL_ADD_INTEGRATION_TEST(llsechandler_basic
|
||||
llsechandler_basic.cpp
|
||||
"${test_libs}"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
6.4.21
|
||||
6.4.22
|
||||
|
|
|
|||
|
|
@ -14340,19 +14340,6 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<!-- SL-12594 removes fixed function rendering
|
||||
<key>VertexShaderEnable</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable/disable all GLSL shaders (debug)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<-->
|
||||
<key>VivoxAutoPostCrashDumps</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -14441,7 +14428,7 @@
|
|||
<key>Value</key>
|
||||
<integer>44125</integer>
|
||||
</map>
|
||||
|
||||
|
||||
<key>VivoxVadAuto</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -14478,8 +14465,7 @@
|
|||
<key>VivoxVadSensitivity</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>
|
||||
A dimensionless value between 0 and 100, indicating the 'sensitivity of the VAD'. Increasing this value corresponds to decreasing the sensitivity of the VAD and 0 is turned off altogether</string>
|
||||
<string>A dimensionless value between 0 and 100, indicating the 'sensitivity of the VAD'. Increasing this value corresponds to decreasing the sensitivity of the VAD and 0 is turned off altogether</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ RenderVBOMappingDisable 1 1
|
|||
RenderVolumeLODFactor 1 2.0
|
||||
UseStartScreen 1 1
|
||||
UseOcclusion 1 1
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
Disregard128DefaultDrawDistance 1 1
|
||||
|
|
@ -95,7 +94,6 @@ RenderTerrainLODFactor 1 1
|
|||
RenderTransparentWater 1 0
|
||||
RenderTreeLODFactor 1 0
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 0
|
||||
WindLightUseAtmosShaders 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -127,7 +125,6 @@ RenderTerrainLODFactor 1 1
|
|||
RenderTransparentWater 1 0
|
||||
RenderTreeLODFactor 1 0
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -158,7 +155,6 @@ RenderTerrainLODFactor 1 1.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -189,7 +185,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -220,7 +215,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -251,7 +245,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -282,7 +275,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -312,7 +304,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 1.0
|
||||
RenderVolumeLODFactor 1 2.0
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
RenderDeferred 1 1
|
||||
|
|
@ -380,7 +371,6 @@ list NoPixelShaders
|
|||
RenderAvatarVP 0 0
|
||||
RenderAvatarCloth 0 0
|
||||
RenderReflectionDetail 0 0
|
||||
VertexShaderEnable 0 0
|
||||
WindLightUseAtmosShaders 0 0
|
||||
RenderDeferred 0 0
|
||||
RenderDeferredSSAO 0 0
|
||||
|
|
@ -394,7 +384,6 @@ list NoVertexShaders
|
|||
RenderAvatarVP 0 0
|
||||
RenderAvatarCloth 0 0
|
||||
RenderReflectionDetail 0 0
|
||||
VertexShaderEnable 0 0
|
||||
WindLightUseAtmosShaders 0 0
|
||||
RenderDeferred 0 0
|
||||
RenderDeferredSSAO 0 0
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ RenderVBOMappingDisable 1 1
|
|||
RenderVolumeLODFactor 1 2.0
|
||||
UseStartScreen 1 1
|
||||
UseOcclusion 1 1
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
Disregard128DefaultDrawDistance 1 1
|
||||
|
|
@ -94,7 +93,6 @@ RenderTerrainLODFactor 1 1
|
|||
RenderTransparentWater 1 0
|
||||
RenderTreeLODFactor 1 0
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -126,7 +124,6 @@ RenderTerrainLODFactor 1 1
|
|||
RenderTransparentWater 1 0
|
||||
RenderTreeLODFactor 1 0
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 0
|
||||
WindLightUseAtmosShaders 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -157,7 +154,6 @@ RenderTerrainLODFactor 1 1.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -188,7 +184,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -219,7 +214,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
|
|
@ -250,7 +244,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -281,7 +274,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -311,7 +303,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 1.0
|
||||
RenderVolumeLODFactor 1 2.0
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
RenderDeferred 1 1
|
||||
|
|
@ -379,7 +370,6 @@ list NoPixelShaders
|
|||
RenderAvatarVP 0 0
|
||||
RenderAvatarCloth 0 0
|
||||
RenderReflectionDetail 0 0
|
||||
VertexShaderEnable 0 0
|
||||
WindLightUseAtmosShaders 0 0
|
||||
RenderDeferred 0 0
|
||||
RenderDeferredSSAO 0 0
|
||||
|
|
@ -393,7 +383,6 @@ list NoVertexShaders
|
|||
RenderAvatarVP 0 0
|
||||
RenderAvatarCloth 0 0
|
||||
RenderReflectionDetail 0 0
|
||||
VertexShaderEnable 0 0
|
||||
WindLightUseAtmosShaders 0 0
|
||||
RenderDeferred 0 0
|
||||
RenderDeferredSSAO 0 0
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ RenderVBOMappingDisable 1 1
|
|||
RenderVolumeLODFactor 1 2.0
|
||||
UseStartScreen 1 1
|
||||
UseOcclusion 1 1
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
Disregard128DefaultDrawDistance 1 1
|
||||
|
|
@ -95,7 +94,6 @@ RenderTerrainLODFactor 1 1
|
|||
RenderTransparentWater 1 0
|
||||
RenderTreeLODFactor 1 0
|
||||
RenderVolumeLODFactor 1 0.5
|
||||
VertexShaderEnable 1 0
|
||||
WindLightUseAtmosShaders 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -127,7 +125,6 @@ RenderTerrainLODFactor 1 1
|
|||
RenderTransparentWater 1 0
|
||||
RenderTreeLODFactor 1 0
|
||||
RenderVolumeLODFactor 1 0.5
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -158,7 +155,6 @@ RenderTerrainLODFactor 1 1.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -189,7 +185,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -220,7 +215,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -251,7 +245,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -282,7 +275,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -312,7 +304,6 @@ RenderTerrainLODFactor 1 2.0
|
|||
RenderTransparentWater 1 1
|
||||
RenderTreeLODFactor 1 1.0
|
||||
RenderVolumeLODFactor 1 2.0
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
RenderDeferred 1 1
|
||||
|
|
@ -374,7 +365,6 @@ list NoPixelShaders
|
|||
RenderAvatarVP 0 0
|
||||
RenderAvatarCloth 0 0
|
||||
RenderReflectionDetail 0 0
|
||||
VertexShaderEnable 0 0
|
||||
WindLightUseAtmosShaders 0 0
|
||||
RenderDeferred 0 0
|
||||
RenderDeferredSSAO 0 0
|
||||
|
|
@ -388,7 +378,6 @@ list NoVertexShaders
|
|||
RenderAvatarVP 0 0
|
||||
RenderAvatarCloth 0 0
|
||||
RenderReflectionDetail 0 0
|
||||
VertexShaderEnable 0 0
|
||||
WindLightUseAtmosShaders 0 0
|
||||
RenderDeferred 0 0
|
||||
RenderDeferredSSAO 0 0
|
||||
|
|
|
|||
|
|
@ -108,7 +108,8 @@ const U8 AGENT_STATE_EDITING = 0x10;
|
|||
// Autopilot constants
|
||||
const F32 AUTOPILOT_HEIGHT_ADJUST_DISTANCE = 8.f; // meters
|
||||
const F32 AUTOPILOT_MIN_TARGET_HEIGHT_OFF_GROUND = 1.f; // meters
|
||||
const F32 AUTOPILOT_MAX_TIME_NO_PROGRESS = 1.5f; // seconds
|
||||
const F32 AUTOPILOT_MAX_TIME_NO_PROGRESS_WALK = 1.5f; // seconds
|
||||
const F32 AUTOPILOT_MAX_TIME_NO_PROGRESS_FLY = 2.5f; // seconds. Flying is less presize, needs a bit more time
|
||||
|
||||
const F32 MAX_VELOCITY_AUTO_LAND_SQUARED = 4.f * 4.f;
|
||||
const F64 CHAT_AGE_FAST_RATE = 3.0;
|
||||
|
|
@ -879,13 +880,12 @@ boost::signals2::connection LLAgent::addParcelChangedCallback(parcel_changed_cal
|
|||
}
|
||||
|
||||
// static
|
||||
void LLAgent::capabilityReceivedCallback(const LLUUID ®ion_id)
|
||||
void LLAgent::capabilityReceivedCallback(const LLUUID ®ion_id, LLViewerRegion *regionp)
|
||||
{
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if (region && region->getRegionID() == region_id)
|
||||
if (regionp && regionp->getRegionID() == region_id)
|
||||
{
|
||||
region->requestSimulatorFeatures();
|
||||
LLAppViewer::instance()->updateNameLookupUrl();
|
||||
regionp->requestSimulatorFeatures();
|
||||
LLAppViewer::instance()->updateNameLookupUrl(regionp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -936,7 +936,7 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
|
|||
if (regionp->capabilitiesReceived())
|
||||
{
|
||||
regionp->requestSimulatorFeatures();
|
||||
LLAppViewer::instance()->updateNameLookupUrl();
|
||||
LLAppViewer::instance()->updateNameLookupUrl(regionp);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -962,11 +962,11 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
|
|||
|
||||
if (regionp->capabilitiesReceived())
|
||||
{
|
||||
LLAppViewer::instance()->updateNameLookupUrl();
|
||||
LLAppViewer::instance()->updateNameLookupUrl(regionp);
|
||||
}
|
||||
else
|
||||
{
|
||||
regionp->setCapabilitiesReceivedCallback([](const LLUUID ®ion_id) {LLAppViewer::instance()->updateNameLookupUrl(); });
|
||||
regionp->setCapabilitiesReceivedCallback([](const LLUUID ®ion_id, LLViewerRegion* regionp) {LLAppViewer::instance()->updateNameLookupUrl(regionp); });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1563,6 +1563,12 @@ void LLAgent::startAutoPilotGlobal(
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (target_global.isExactlyZero())
|
||||
{
|
||||
LL_WARNS() << "Canceling attempt to start autopilot towards invalid position" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
// Are there any pending callbacks from previous auto pilot requests?
|
||||
if (mAutoPilotFinishedCallback)
|
||||
|
|
@ -1778,7 +1784,16 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
|||
if (target_dist >= mAutoPilotTargetDist)
|
||||
{
|
||||
mAutoPilotNoProgressFrameCount++;
|
||||
if (mAutoPilotNoProgressFrameCount > AUTOPILOT_MAX_TIME_NO_PROGRESS * gFPSClamped)
|
||||
bool out_of_time = false;
|
||||
if (getFlying())
|
||||
{
|
||||
out_of_time = mAutoPilotNoProgressFrameCount > AUTOPILOT_MAX_TIME_NO_PROGRESS_FLY * gFPSClamped;
|
||||
}
|
||||
else
|
||||
{
|
||||
out_of_time = mAutoPilotNoProgressFrameCount > AUTOPILOT_MAX_TIME_NO_PROGRESS_WALK * gFPSClamped;
|
||||
}
|
||||
if (out_of_time)
|
||||
{
|
||||
stopAutoPilot();
|
||||
return;
|
||||
|
|
@ -1827,7 +1842,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
|||
F32 slow_distance;
|
||||
if (getFlying())
|
||||
{
|
||||
slow_distance = llmax(6.f, mAutoPilotStopDistance + 5.f);
|
||||
slow_distance = llmax(8.f, mAutoPilotStopDistance + 5.f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1871,14 +1886,41 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
|||
}
|
||||
else if (mAutoPilotTargetDist > mAutoPilotStopDistance)
|
||||
{
|
||||
// walking/flying slow
|
||||
// walking/flying slow
|
||||
U32 movement_flag = 0;
|
||||
|
||||
if (at * direction > 0.9f)
|
||||
{
|
||||
setControlFlags(AGENT_CONTROL_AT_POS);
|
||||
}
|
||||
else if (at * direction < -0.9f)
|
||||
{
|
||||
setControlFlags(AGENT_CONTROL_AT_NEG);
|
||||
movement_flag = AGENT_CONTROL_AT_POS;
|
||||
}
|
||||
else if (at * direction < -0.9f)
|
||||
{
|
||||
movement_flag = AGENT_CONTROL_AT_NEG;
|
||||
}
|
||||
|
||||
if (getFlying())
|
||||
{
|
||||
// flying is too fast and has high inertia, artificially slow it down
|
||||
// Don't update flags too often, server might not react
|
||||
static U64 last_time_microsec = 0;
|
||||
U64 time_microsec = LLTimer::getTotalTime();
|
||||
U64 delta = time_microsec - last_time_microsec;
|
||||
// fly during ~0-40 ms, stop during ~40-250 ms
|
||||
if (delta > 250000) // 250ms
|
||||
{
|
||||
// reset even if !movement_flag
|
||||
last_time_microsec = time_microsec;
|
||||
}
|
||||
else if (delta > 40000) // 40 ms
|
||||
{
|
||||
clearControlFlags(AGENT_CONTROL_AT_POS | AGENT_CONTROL_AT_POS);
|
||||
movement_flag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (movement_flag)
|
||||
{
|
||||
setControlFlags(movement_flag);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ public:
|
|||
boost::signals2::connection addParcelChangedCallback(parcel_changed_callback_t);
|
||||
|
||||
private:
|
||||
static void capabilityReceivedCallback(const LLUUID ®ion_id);
|
||||
static void capabilityReceivedCallback(const LLUUID ®ion_id, LLViewerRegion *regionp);
|
||||
|
||||
typedef boost::signals2::signal<void()> parcel_changed_signal_t;
|
||||
parcel_changed_signal_t mParcelChangedSignal;
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ static const struct
|
|||
};
|
||||
|
||||
static void setting_changed();
|
||||
static void ssl_verification_changed();
|
||||
|
||||
|
||||
LLAppCoreHttp::HttpClass::HttpClass()
|
||||
|
|
@ -195,6 +196,23 @@ void LLAppCoreHttp::init()
|
|||
LL_WARNS("Init") << "Failed to set SSL Verification. Reason: " << status.toString() << LL_ENDL;
|
||||
}
|
||||
|
||||
// Set up Default SSL Verification option.
|
||||
const std::string no_verify_ssl("NoVerifySSLCert");
|
||||
if (gSavedSettings.controlExists(no_verify_ssl))
|
||||
{
|
||||
LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl(no_verify_ssl);
|
||||
if (cntrl_ptr.isNull())
|
||||
{
|
||||
LL_WARNS("Init") << "Unable to set signal on global setting '" << no_verify_ssl
|
||||
<< "'" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
mSSLNoVerifySignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&ssl_verification_changed));
|
||||
LLCore::HttpOptions::setDefaultSSLVerifyPeer(!cntrl_ptr->getValue().asBoolean());
|
||||
}
|
||||
}
|
||||
|
||||
// Tracing levels for library & libcurl (note that 2 & 3 are beyond spammy):
|
||||
// 0 - None
|
||||
// 1 - Basic start, stop simple transitions
|
||||
|
|
@ -289,6 +307,11 @@ void setting_changed()
|
|||
LLAppViewer::instance()->getAppCoreHttp().refreshSettings(false);
|
||||
}
|
||||
|
||||
void ssl_verification_changed()
|
||||
{
|
||||
LLCore::HttpOptions::setDefaultSSLVerifyPeer(!gSavedSettings.getBOOL("NoVerifySSLCert"));
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
// The NoOpDeletor is used when wrapping LLAppCoreHttp in a smart pointer below for
|
||||
|
|
@ -348,6 +371,8 @@ void LLAppCoreHttp::cleanup()
|
|||
{
|
||||
mHttpClasses[i].mSettingsSignal.disconnect();
|
||||
}
|
||||
mSSLNoVerifySignal.disconnect();
|
||||
mPipelinedSignal.disconnect();
|
||||
|
||||
delete mRequest;
|
||||
mRequest = NULL;
|
||||
|
|
|
|||
|
|
@ -255,6 +255,8 @@ private:
|
|||
bool mStopped;
|
||||
HttpClass mHttpClasses[AP_COUNT];
|
||||
bool mPipelined; // Global setting
|
||||
boost::signals2::connection mPipelinedSignal; // Signal for 'HttpPipelining' setting
|
||||
boost::signals2::connection mSSLNoVerifySignal; // Signal for 'NoVerifySSLCert' setting
|
||||
|
||||
static LLCore::HttpStatus sslVerify(const std::string &uri, const LLCore::HttpHandler::ptr_t &handler, void *appdata);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@
|
|||
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
|
||||
|
|
@ -74,6 +75,7 @@
|
|||
[BugsplatStartupManager sharedManager].delegate = self;
|
||||
[[BugsplatStartupManager sharedManager] start];
|
||||
#endif
|
||||
infos("post-bugsplat setup");
|
||||
|
||||
frameTimer = nil;
|
||||
|
||||
|
|
@ -301,9 +303,13 @@ struct AttachmentInfo
|
|||
|
||||
// We "happen to know" that info[0].basename is "SecondLife.old" -- due to
|
||||
// the fact that BugsplatMac only notices a crash during the viewer run
|
||||
// following the crash. Replace .old with .log to reduce confusion.
|
||||
// following the crash.
|
||||
// The Bugsplat service doesn't respect the MIME type above when returning
|
||||
// the log data to a browser, so take this opportunity to rename the file
|
||||
// from <base>.old to <base>_log.txt
|
||||
info[0].basename =
|
||||
boost::filesystem::path(info[0].pathname).stem().string() + ".log";
|
||||
boost::filesystem::path(info[0].pathname).stem().string() + "_log.txt";
|
||||
infos("attachmentsForBugsplatStartupManager attaching log " + info[0].basename);
|
||||
|
||||
NSMutableArray *attachments = [[NSMutableArray alloc] init];
|
||||
|
||||
|
|
|
|||
|
|
@ -3684,7 +3684,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
|
|||
}
|
||||
|
||||
llcoro::suspend();
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -3751,7 +3751,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
|
|||
|
||||
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, postData);
|
||||
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -3791,7 +3791,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
|
|||
LL_WARNS("Avatar") << "Bake retry #" << retryCount << " in " << timeout << " seconds." << LL_ENDL;
|
||||
|
||||
llcoro::suspendUntilTimeout(timeout);
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -730,14 +730,14 @@ 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.
|
||||
#if LL_BUGSPLAT
|
||||
# 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
|
||||
# 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
|
||||
# endif // ! LL_BUGSPLAT
|
||||
mDumpPath = logdir;
|
||||
setMiniDumpDir(logdir);
|
||||
setDebugFileNames(logdir);
|
||||
|
|
@ -762,17 +762,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
namespace {
|
||||
// With Xcode 6, _exit() is too magical to use with boost::bind(), so provide
|
||||
// this little helper function.
|
||||
void fast_exit(int rc)
|
||||
{
|
||||
_exit(rc);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool LLAppViewer::init()
|
||||
{
|
||||
|
|
@ -824,9 +813,9 @@ bool LLAppViewer::init()
|
|||
if (rc >= 0)
|
||||
{
|
||||
// QAModeTermCode set, terminate with that rc on LL_ERRS. Use
|
||||
// fast_exit() rather than exit() because normal cleanup depends too
|
||||
// _exit() rather than exit() because normal cleanup depends too
|
||||
// much on successful startup!
|
||||
LLError::setFatalFunction(boost::bind(fast_exit, rc));
|
||||
LLError::setFatalFunction([rc](const std::string&){ _exit(rc); });
|
||||
}
|
||||
|
||||
mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
|
||||
|
|
@ -2196,28 +2185,6 @@ bool LLAppViewer::cleanup()
|
|||
return true;
|
||||
}
|
||||
|
||||
// A callback for LL_ERRS() to call during the watchdog error.
|
||||
void watchdog_llerrs_callback(const std::string &error_string)
|
||||
{
|
||||
gLLErrorActivated = true;
|
||||
|
||||
gDebugInfo["FatalMessage"] = error_string;
|
||||
LLAppViewer::instance()->writeDebugInfo();
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
RaiseException(0,0,0,0);
|
||||
#else
|
||||
raise(SIGQUIT);
|
||||
#endif
|
||||
}
|
||||
|
||||
// A callback for the watchdog to call.
|
||||
void watchdog_killer_callback()
|
||||
{
|
||||
LLError::setFatalFunction(watchdog_llerrs_callback);
|
||||
LL_ERRS() << "Watchdog killer event" << LL_ENDL;
|
||||
}
|
||||
|
||||
bool LLAppViewer::initThreads()
|
||||
{
|
||||
static const bool enable_threads = true;
|
||||
|
|
@ -2252,24 +2219,23 @@ bool LLAppViewer::initThreads()
|
|||
return true;
|
||||
}
|
||||
|
||||
void errorCallback(const std::string &error_string)
|
||||
void errorCallback(LLError::ELevel level, const std::string &error_string)
|
||||
{
|
||||
if (level == LLError::LEVEL_ERROR)
|
||||
{
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
OSMessageBox(error_string, LLTrans::getString("MBFatalError"), OSMB_OK);
|
||||
OSMessageBox(error_string, LLTrans::getString("MBFatalError"), OSMB_OK);
|
||||
#endif
|
||||
|
||||
//Set the ErrorActivated global so we know to create a marker file
|
||||
gLLErrorActivated = true;
|
||||
//Set the ErrorActivated global so we know to create a marker file
|
||||
gLLErrorActivated = true;
|
||||
|
||||
gDebugInfo["FatalMessage"] = error_string;
|
||||
// We're not already crashing -- we simply *intend* to crash. Since we
|
||||
// haven't actually trashed anything yet, we can afford to write the whole
|
||||
// static info file.
|
||||
LLAppViewer::instance()->writeDebugInfo();
|
||||
|
||||
#ifndef SHADER_CRASH_NONFATAL
|
||||
LLError::crashAndLoop(error_string);
|
||||
#endif
|
||||
gDebugInfo["FatalMessage"] = error_string;
|
||||
// We're not already crashing -- we simply *intend* to crash. Since we
|
||||
// haven't actually trashed anything yet, we can afford to write the whole
|
||||
// static info file.
|
||||
LLAppViewer::instance()->writeDebugInfo();
|
||||
}
|
||||
}
|
||||
|
||||
void LLAppViewer::initLoggingAndGetLastDuration()
|
||||
|
|
@ -2280,7 +2246,7 @@ void LLAppViewer::initLoggingAndGetLastDuration()
|
|||
LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "")
|
||||
,gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")
|
||||
);
|
||||
LLError::setFatalFunction(errorCallback);
|
||||
LLError::addGenericRecorder(&errorCallback);
|
||||
//LLError::setTimeFunction(getRuntime);
|
||||
|
||||
// Remove the last ".old" log file.
|
||||
|
|
@ -3039,11 +3005,16 @@ bool LLAppViewer::initWindow()
|
|||
use_watchdog = bool(watchdog_enabled_setting);
|
||||
}
|
||||
|
||||
LL_INFOS("AppInit") << "watchdog"
|
||||
<< (use_watchdog ? " " : " NOT ")
|
||||
<< "enabled"
|
||||
<< " (setting = " << watchdog_enabled_setting << ")"
|
||||
<< LL_ENDL;
|
||||
|
||||
if (use_watchdog)
|
||||
{
|
||||
LLWatchdog::getInstance()->init(watchdog_killer_callback);
|
||||
LLWatchdog::getInstance()->init();
|
||||
}
|
||||
LL_INFOS("AppInit") << "watchdog setting is done." << LL_ENDL;
|
||||
|
||||
LLNotificationsUI::LLNotificationManager::getInstance();
|
||||
|
||||
|
|
@ -3485,8 +3456,8 @@ void LLAppViewer::writeSystemInfo()
|
|||
gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE();
|
||||
gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2();
|
||||
|
||||
gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB().value());
|
||||
gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated.valueInUnits<LLUnits::Kilobytes>());
|
||||
gDebugInfo["RAMInfo"]["Physical"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().value());
|
||||
gDebugInfo["RAMInfo"]["Allocated"] = LLSD::Integer(gMemoryAllocated.valueInUnits<LLUnits::Kilobytes>());
|
||||
gDebugInfo["OSInfo"] = LLOSInfo::instance().getOSStringSimple();
|
||||
|
||||
// The user is not logged on yet, but record the current grid choice login url
|
||||
|
|
@ -3499,12 +3470,18 @@ 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;
|
||||
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
|
||||
|
|
@ -3535,7 +3512,7 @@ void LLAppViewer::writeSystemInfo()
|
|||
gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile");
|
||||
gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName();
|
||||
gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath();
|
||||
gDebugInfo["FirstLogin"] = (LLSD::Boolean) gAgent.isFirstLogin();
|
||||
gDebugInfo["FirstLogin"] = LLSD::Boolean(gAgent.isFirstLogin());
|
||||
gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall");
|
||||
gDebugInfo["StartupState"] = LLStartUp::getStartupStateString();
|
||||
|
||||
|
|
@ -3665,7 +3642,7 @@ void LLAppViewer::handleViewerCrash()
|
|||
|
||||
// The crash is being handled here so set this value to false.
|
||||
// Otherwise the crash logger will think this crash was a freeze.
|
||||
gDebugInfo["Dynamic"]["CrashNotHandled"] = (LLSD::Boolean)false;
|
||||
gDebugInfo["Dynamic"]["CrashNotHandled"] = LLSD::Boolean(false);
|
||||
|
||||
//Write out the crash status file
|
||||
//Use marker file style setup, as that's the simplest, especially since
|
||||
|
|
@ -3738,6 +3715,8 @@ void LLAppViewer::handleViewerCrash()
|
|||
|
||||
if (LLWorld::instanceExists()) LLWorld::getInstance()->getInfo(gDebugInfo["Dynamic"]);
|
||||
|
||||
gDebugInfo["FatalMessage"] = LLError::getFatalMessage();
|
||||
|
||||
// Close the debug file
|
||||
pApp->writeDebugInfo(false); //false answers the isStatic question with the least overhead.
|
||||
}
|
||||
|
|
@ -3836,9 +3815,8 @@ void LLAppViewer::processMarkerFiles()
|
|||
else if (marker_is_same_version)
|
||||
{
|
||||
// the file existed, is ours, and matched our version, so we can report on what it says
|
||||
LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found; last exec FROZE" << LL_ENDL;
|
||||
gLastExecEvent = LAST_EXEC_FROZE;
|
||||
|
||||
LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found; last exec crashed" << LL_ENDL;
|
||||
gLastExecEvent = LAST_EXEC_OTHER_CRASH;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5385,10 +5363,9 @@ void LLAppViewer::sendLogoutRequest()
|
|||
}
|
||||
}
|
||||
|
||||
void LLAppViewer::updateNameLookupUrl()
|
||||
void LLAppViewer::updateNameLookupUrl(const LLViewerRegion * regionp)
|
||||
{
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if (!region || !region->capabilitiesReceived())
|
||||
if (!regionp || !regionp->capabilitiesReceived())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -5397,7 +5374,7 @@ void LLAppViewer::updateNameLookupUrl()
|
|||
bool had_capability = LLAvatarNameCache::getInstance()->hasNameLookupURL();
|
||||
std::string name_lookup_url;
|
||||
name_lookup_url.reserve(128); // avoid a memory allocation below
|
||||
name_lookup_url = region->getCapability("GetDisplayNames");
|
||||
name_lookup_url = regionp->getCapability("GetDisplayNames");
|
||||
bool have_capability = !name_lookup_url.empty();
|
||||
if (have_capability)
|
||||
{
|
||||
|
|
@ -5708,6 +5685,33 @@ void LLAppViewer::forceErrorDriverCrash()
|
|||
glDeleteTextures(1, NULL);
|
||||
}
|
||||
|
||||
void LLAppViewer::forceErrorCoroutineCrash()
|
||||
{
|
||||
LL_WARNS() << "Forcing a crash in LLCoros" << LL_ENDL;
|
||||
LLCoros::instance().launch("LLAppViewer::crashyCoro", [] {throw LLException("A deliberate crash from LLCoros"); });
|
||||
}
|
||||
|
||||
void LLAppViewer::forceErrorThreadCrash()
|
||||
{
|
||||
class LLCrashTestThread : public LLThread
|
||||
{
|
||||
public:
|
||||
|
||||
LLCrashTestThread() : LLThread("Crash logging test thread")
|
||||
{
|
||||
}
|
||||
|
||||
void run()
|
||||
{
|
||||
LL_ERRS() << "This is a deliberate llerror in thread" << LL_ENDL;
|
||||
}
|
||||
};
|
||||
|
||||
LL_WARNS() << "This is a deliberate crash in a thread" << LL_ENDL;
|
||||
LLCrashTestThread *thread = new LLCrashTestThread();
|
||||
thread->start();
|
||||
}
|
||||
|
||||
void LLAppViewer::initMainloopTimeout(const std::string& state, F32 secs)
|
||||
{
|
||||
if(!mMainloopTimeout)
|
||||
|
|
@ -5751,11 +5755,6 @@ void LLAppViewer::pauseMainloopTimeout()
|
|||
|
||||
void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs)
|
||||
{
|
||||
// if(!restoreErrorTrap())
|
||||
// {
|
||||
// LL_WARNS() << "!!!!!!!!!!!!! Its an error trap!!!!" << state << LL_ENDL;
|
||||
// }
|
||||
|
||||
if(mMainloopTimeout)
|
||||
{
|
||||
if(secs < 0.0f)
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ class LLImageDecodeThread;
|
|||
class LLTextureFetch;
|
||||
class LLWatchdogTimeout;
|
||||
class LLViewerJoystick;
|
||||
class LLViewerRegion;
|
||||
|
||||
extern LLTrace::BlockTimerStatHandle FTM_FRAME;
|
||||
|
||||
|
|
@ -150,6 +151,8 @@ public:
|
|||
virtual void forceErrorInfiniteLoop();
|
||||
virtual void forceErrorSoftwareException();
|
||||
virtual void forceErrorDriverCrash();
|
||||
virtual void forceErrorCoroutineCrash();
|
||||
virtual void forceErrorThreadCrash();
|
||||
|
||||
// The list is found in app_settings/settings_files.xml
|
||||
// but since they are used explicitly in code,
|
||||
|
|
@ -209,7 +212,7 @@ public:
|
|||
// llcorehttp init/shutdown/config information.
|
||||
LLAppCoreHttp & getAppCoreHttp() { return mAppCoreHttp; }
|
||||
|
||||
void updateNameLookupUrl();
|
||||
void updateNameLookupUrl(const LLViewerRegion* regionp);
|
||||
|
||||
protected:
|
||||
virtual bool initWindow(); // Initialize the viewer's window.
|
||||
|
|
|
|||
|
|
@ -68,39 +68,21 @@ namespace
|
|||
int gArgC;
|
||||
char** gArgV;
|
||||
LLAppViewerMacOSX* gViewerAppPtr = NULL;
|
||||
|
||||
void (*gOldTerminateHandler)() = NULL;
|
||||
std::string gHandleSLURL;
|
||||
}
|
||||
|
||||
static void exceptionTerminateHandler()
|
||||
{
|
||||
// reinstall default terminate() handler in case we re-terminate.
|
||||
if (gOldTerminateHandler) std::set_terminate(gOldTerminateHandler);
|
||||
// treat this like a regular viewer crash, with nice stacktrace etc.
|
||||
long *null_ptr;
|
||||
null_ptr = 0;
|
||||
*null_ptr = 0xDEADBEEF; //Force an exception that will trigger breakpad.
|
||||
//LLAppViewer::handleViewerCrash();
|
||||
// we've probably been killed-off before now, but...
|
||||
gOldTerminateHandler(); // call old terminate() handler
|
||||
}
|
||||
|
||||
void constructViewer()
|
||||
{
|
||||
// Set the working dir to <bundle>/Contents/Resources
|
||||
if (chdir(gDirUtilp->getAppRODataDir().c_str()) == -1)
|
||||
{
|
||||
LL_WARNS() << "Could not change directory to "
|
||||
LL_WARNS("InitOSX") << "Could not change directory to "
|
||||
<< gDirUtilp->getAppRODataDir() << ": " << strerror(errno)
|
||||
<< LL_ENDL;
|
||||
}
|
||||
|
||||
gViewerAppPtr = new LLAppViewerMacOSX();
|
||||
|
||||
// install unexpected exception handler
|
||||
gOldTerminateHandler = std::set_terminate(exceptionTerminateHandler);
|
||||
|
||||
gViewerAppPtr->setErrorHandler(LLAppViewer::handleViewerCrash);
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +91,7 @@ bool initViewer()
|
|||
bool ok = gViewerAppPtr->init();
|
||||
if(!ok)
|
||||
{
|
||||
LL_WARNS() << "Application init failed." << LL_ENDL;
|
||||
LL_WARNS("InitOSX") << "Application init failed." << LL_ENDL;
|
||||
}
|
||||
else if (!gHandleSLURL.empty())
|
||||
{
|
||||
|
|
@ -172,7 +154,7 @@ class CrashMetadataSingleton: public CrashMetadata, public LLSingleton<CrashMeta
|
|||
std::string get_metadata(const LLSD& info, const LLSD::String& key) const
|
||||
{
|
||||
std::string data(info[key].asString());
|
||||
LL_INFOS() << " " << key << "='" << data << "'" << LL_ENDL;
|
||||
LL_INFOS("Bugsplat") << " " << key << "='" << data << "'" << LL_ENDL;
|
||||
return data;
|
||||
}
|
||||
};
|
||||
|
|
@ -188,22 +170,22 @@ CrashMetadataSingleton::CrashMetadataSingleton()
|
|||
LLSD info;
|
||||
if (! static_file.is_open())
|
||||
{
|
||||
LL_INFOS() << "Can't open '" << staticDebugPathname
|
||||
LL_WARNS("Bugsplat") << "Can't open '" << staticDebugPathname
|
||||
<< "'; no metadata about previous run" << LL_ENDL;
|
||||
}
|
||||
else if (! LLSDSerialize::deserialize(info, static_file, LLSDSerialize::SIZE_UNLIMITED))
|
||||
{
|
||||
LL_INFOS() << "Can't parse '" << staticDebugPathname
|
||||
LL_WARNS("Bugsplat") << "Can't parse '" << staticDebugPathname
|
||||
<< "'; no metadata about previous run" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS() << "Metadata from '" << staticDebugPathname << "':" << LL_ENDL;
|
||||
logFilePathname = get_metadata(info, "SLLog");
|
||||
userSettingsPathname = get_metadata(info, "SettingsFilename");
|
||||
LL_INFOS("Bugsplat") << "Previous run metadata from '" << staticDebugPathname << "':" << LL_ENDL;
|
||||
logFilePathname = get_metadata(info, "SLLog");
|
||||
userSettingsPathname = get_metadata(info, "SettingsFilename");
|
||||
accountSettingsPathname = get_metadata(info, "PerAccountSettingsFilename");
|
||||
OSInfo = get_metadata(info, "OSInfo");
|
||||
agentFullname = get_metadata(info, "LoginName");
|
||||
OSInfo = get_metadata(info, "OSInfo");
|
||||
agentFullname = get_metadata(info, "LoginName");
|
||||
// Translate underscores back to spaces
|
||||
LLStringUtil::replaceChar(agentFullname, '_', ' ');
|
||||
regionName = get_metadata(info, "CurrentRegion");
|
||||
|
|
@ -219,7 +201,7 @@ CrashMetadata& CrashMetadata_instance()
|
|||
|
||||
void infos(const std::string& message)
|
||||
{
|
||||
LL_INFOS() << message << LL_ENDL;
|
||||
LL_INFOS("InitOSX", "Bugsplat") << message << LL_ENDL;
|
||||
}
|
||||
|
||||
int main( int argc, char **argv )
|
||||
|
|
@ -242,14 +224,11 @@ bool LLAppViewerMacOSX::init()
|
|||
{
|
||||
bool success = LLAppViewer::init();
|
||||
|
||||
#if LL_SEND_CRASH_REPORTS
|
||||
if (success)
|
||||
{
|
||||
LLAppViewer* pApp = LLAppViewer::instance();
|
||||
pApp->initCrashReporting();
|
||||
}
|
||||
#endif
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
@ -334,11 +313,12 @@ bool LLAppViewerMacOSX::restoreErrorTrap()
|
|||
|
||||
unsigned int reset_count = 0;
|
||||
|
||||
#define SET_SIG(S) sigaction(SIGABRT, &act, &old_act); \
|
||||
if(act.sa_sigaction != old_act.sa_sigaction) \
|
||||
++reset_count;
|
||||
#define SET_SIG(SIGNAL) sigaction(SIGNAL, &act, &old_act); \
|
||||
if(act.sa_sigaction != old_act.sa_sigaction) ++reset_count;
|
||||
// Synchronous signals
|
||||
SET_SIG(SIGABRT)
|
||||
# ifndef LL_BUGSPLAT
|
||||
SET_SIG(SIGABRT) // let bugsplat catch this
|
||||
# endif
|
||||
SET_SIG(SIGALRM)
|
||||
SET_SIG(SIGBUS)
|
||||
SET_SIG(SIGFPE)
|
||||
|
|
@ -369,6 +349,10 @@ bool LLAppViewerMacOSX::restoreErrorTrap()
|
|||
|
||||
void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze)
|
||||
{
|
||||
#if defined LL_BUGSPLAT
|
||||
LL_DEBUGS("InitOSX", "Bugsplat") << "using BugSplat crash logger" << LL_ENDL;
|
||||
#elif LL_SEND_CRASH_REPORTS
|
||||
LL_DEBUGS("InitOSX") << "Initializing legacy crash logger" << LL_ENDL;
|
||||
std::string command_str = "mac-crash-logger.app";
|
||||
|
||||
std::stringstream pid_str;
|
||||
|
|
@ -380,6 +364,9 @@ void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze)
|
|||
LL_WARNS() << "about to launch mac-crash-logger" << pid_str.str()
|
||||
<< " " << logdir << " " << appname << LL_ENDL;
|
||||
launchApplication(&command_str, &args);
|
||||
#else
|
||||
LL_DEBUGS("InitOSX") << "No crash logger enabled" << LL_ENDL;
|
||||
#endif // ! LL_BUGSPLAT
|
||||
}
|
||||
|
||||
std::string LLAppViewerMacOSX::generateSerialNumber()
|
||||
|
|
@ -391,7 +378,8 @@ std::string LLAppViewerMacOSX::generateSerialNumber()
|
|||
CFStringRef serialNumber = NULL;
|
||||
io_service_t platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault,
|
||||
IOServiceMatching("IOPlatformExpertDevice"));
|
||||
if (platformExpert) {
|
||||
if (platformExpert)
|
||||
{
|
||||
serialNumber = (CFStringRef) IORegistryEntryCreateCFProperty(platformExpert,
|
||||
CFSTR(kIOPlatformSerialNumberKey),
|
||||
kCFAllocatorDefault, 0);
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ static void exceptionTerminateHandler()
|
|||
long *null_ptr;
|
||||
null_ptr = 0;
|
||||
*null_ptr = 0xDEADBEEF; //Force an exception that will trigger breakpad.
|
||||
//LLAppViewer::handleViewerCrash();
|
||||
|
||||
// we've probably been killed-off before now, but...
|
||||
gOldTerminateHandler(); // call old terminate() handler
|
||||
}
|
||||
|
|
@ -369,10 +369,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
|
|||
|
||||
viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash);
|
||||
|
||||
#if LL_SEND_CRASH_REPORTS
|
||||
// ::SetUnhandledExceptionFilter(catchallCrashHandler);
|
||||
#endif
|
||||
|
||||
// Set a debug info flag to indicate if multiple instances are running.
|
||||
bool found_other_instance = !create_app_mutex();
|
||||
gDebugInfo["FoundOtherInstanceAtStartup"] = LLSD::Boolean(found_other_instance);
|
||||
|
|
@ -613,6 +609,13 @@ bool LLAppViewerWin32::init()
|
|||
#else // LL_BUGSPLAT
|
||||
#pragma message("Building with BugSplat")
|
||||
|
||||
if (!isSecondInstance())
|
||||
{
|
||||
// Cleanup previous session
|
||||
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "bugsplat.log");
|
||||
LLFile::remove(log_file, ENOENT);
|
||||
}
|
||||
|
||||
std::string build_data_fname(
|
||||
gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "build_data.json"));
|
||||
// Use llifstream instead of std::ifstream because LL_PATH_EXECUTABLE
|
||||
|
|
@ -620,7 +623,7 @@ bool LLAppViewerWin32::init()
|
|||
llifstream inf(build_data_fname.c_str());
|
||||
if (! inf.is_open())
|
||||
{
|
||||
LL_WARNS() << "Can't initialize BugSplat, can't read '" << build_data_fname
|
||||
LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't read '" << build_data_fname
|
||||
<< "'" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
|
|
@ -630,7 +633,7 @@ bool LLAppViewerWin32::init()
|
|||
if (! reader.parse(inf, build_data, false)) // don't collect comments
|
||||
{
|
||||
// gah, the typo is baked into Json::Reader API
|
||||
LL_WARNS() << "Can't initialize BugSplat, can't parse '" << build_data_fname
|
||||
LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't parse '" << build_data_fname
|
||||
<< "': " << reader.getFormatedErrorMessages() << LL_ENDL;
|
||||
}
|
||||
else
|
||||
|
|
@ -638,7 +641,7 @@ bool LLAppViewerWin32::init()
|
|||
Json::Value BugSplat_DB = build_data["BugSplat DB"];
|
||||
if (! BugSplat_DB)
|
||||
{
|
||||
LL_WARNS() << "Can't initialize BugSplat, no 'BugSplat DB' entry in '"
|
||||
LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, no 'BugSplat DB' entry in '"
|
||||
<< build_data_fname << "'" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
|
|
@ -649,18 +652,35 @@ bool LLAppViewerWin32::init()
|
|||
LL_VIEWER_VERSION_PATCH << '.' <<
|
||||
LL_VIEWER_VERSION_BUILD));
|
||||
|
||||
DWORD dwFlags = MDSF_NONINTERACTIVE | // automatically submit report without prompting
|
||||
MDSF_PREVENTHIJACKING; // disallow swiping Exception filter
|
||||
|
||||
bool needs_log_file = !isSecondInstance() && debugLoggingEnabled("BUGSPLAT");
|
||||
if (needs_log_file)
|
||||
{
|
||||
// Startup only!
|
||||
LL_INFOS("BUGSPLAT") << "Engaged BugSplat logging to bugsplat.log" << LL_ENDL;
|
||||
dwFlags |= MDSF_LOGFILE | MDSF_LOG_VERBOSE;
|
||||
}
|
||||
|
||||
// have to convert normal wide strings to strings of __wchar_t
|
||||
sBugSplatSender = new MiniDmpSender(
|
||||
WCSTR(BugSplat_DB.asString()),
|
||||
WCSTR(LL_TO_WSTRING(LL_VIEWER_CHANNEL)),
|
||||
WCSTR(version_string),
|
||||
nullptr, // szAppIdentifier -- set later
|
||||
MDSF_NONINTERACTIVE | // automatically submit report without prompting
|
||||
MDSF_PREVENTHIJACKING); // disallow swiping Exception filter
|
||||
dwFlags);
|
||||
sBugSplatSender->setCallback(bugsplatSendLog);
|
||||
|
||||
if (needs_log_file)
|
||||
{
|
||||
// Log file will be created in %TEMP%, but it will be moved into logs folder in case of crash
|
||||
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "bugsplat.log");
|
||||
sBugSplatSender->setLogFilePath(WCSTR(log_file));
|
||||
}
|
||||
|
||||
// engage stringize() overload that converts from wstring
|
||||
LL_INFOS() << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL)
|
||||
LL_INFOS("BUGSPLAT") << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL)
|
||||
<< ' ' << stringize(version_string) << ')' << LL_ENDL;
|
||||
} // got BugSplat_DB
|
||||
} // parsed build_data.json
|
||||
|
|
@ -689,6 +709,16 @@ bool LLAppViewerWin32::cleanup()
|
|||
return result;
|
||||
}
|
||||
|
||||
void LLAppViewerWin32::reportCrashToBugsplat(void* pExcepInfo)
|
||||
{
|
||||
#if defined(LL_BUGSPLAT)
|
||||
if (sBugSplatSender)
|
||||
{
|
||||
sBugSplatSender->createReport((EXCEPTION_POINTERS*)pExcepInfo);
|
||||
}
|
||||
#endif // LL_BUGSPLAT
|
||||
}
|
||||
|
||||
void LLAppViewerWin32::initLoggingAndGetLastDuration()
|
||||
{
|
||||
LLAppViewer::initLoggingAndGetLastDuration();
|
||||
|
|
@ -817,8 +847,7 @@ bool LLAppViewerWin32::beingDebugged()
|
|||
|
||||
bool LLAppViewerWin32::restoreErrorTrap()
|
||||
{
|
||||
return true;
|
||||
//return LLWinDebug::checkExceptionHandler();
|
||||
return true; // we don't check for handler collisions on windows, so just say they're ok
|
||||
}
|
||||
|
||||
void LLAppViewerWin32::initCrashReporting(bool reportFreeze)
|
||||
|
|
|
|||
|
|
@ -40,20 +40,22 @@ public:
|
|||
//
|
||||
// Main application logic
|
||||
//
|
||||
virtual bool init(); // Override to do application initialization
|
||||
virtual bool cleanup();
|
||||
bool init() override; // Override to do application initialization
|
||||
bool cleanup() override;
|
||||
|
||||
void reportCrashToBugsplat(void* pExcepInfo) override;
|
||||
|
||||
protected:
|
||||
virtual void initLoggingAndGetLastDuration(); // Override to clean stack_trace info.
|
||||
virtual void initConsole(); // Initialize OS level debugging console.
|
||||
virtual bool initHardwareTest(); // Win32 uses DX9 to test hardware.
|
||||
virtual bool initParseCommandLine(LLCommandLineParser& clp);
|
||||
void initLoggingAndGetLastDuration() override; // Override to clean stack_trace info.
|
||||
void initConsole() override; // Initialize OS level debugging console.
|
||||
bool initHardwareTest() override; // Win32 uses DX9 to test hardware.
|
||||
bool initParseCommandLine(LLCommandLineParser& clp) override;
|
||||
|
||||
virtual bool beingDebugged();
|
||||
virtual bool restoreErrorTrap();
|
||||
virtual void initCrashReporting(bool reportFreeze);
|
||||
bool beingDebugged() override;
|
||||
bool restoreErrorTrap() override;
|
||||
void initCrashReporting(bool reportFreeze) override;
|
||||
|
||||
virtual bool sendURLToOtherInstance(const std::string& url);
|
||||
bool sendURLToOtherInstance(const std::string& url) override;
|
||||
|
||||
std::string generateSerialNumber();
|
||||
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID paren
|
|||
bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloater,
|
||||
const LLPointer<LLViewerObject> &object, LLInventoryObject* inventory, LLEventPump &pump)
|
||||
{
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
// Reply from coroutine came on shutdown
|
||||
// We are quiting, don't start any more coroutines!
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ bool LLDelayedGestureError::doDialog(const LLErrorEntry &ent, bool uuid_ok)
|
|||
}
|
||||
}
|
||||
|
||||
if(!LLApp::isQuitting())
|
||||
if(!LLApp::isExiting())
|
||||
{
|
||||
LLNotificationsUtil::add(ent.mNotifyName, args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1029,7 +1029,7 @@ void LLEnvironment::onRegionChange()
|
|||
}
|
||||
if (!cur_region->capabilitiesReceived())
|
||||
{
|
||||
cur_region->setCapabilitiesReceivedCallback([](const LLUUID ®ion_id) { LLEnvironment::instance().requestRegion(); });
|
||||
cur_region->setCapabilitiesReceivedCallback([](const LLUUID ®ion_id, LLViewerRegion* regionp) { LLEnvironment::instance().requestRegion(); });
|
||||
return;
|
||||
}
|
||||
requestRegion();
|
||||
|
|
@ -1154,9 +1154,38 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
|
|||
}
|
||||
else if (!environment->getSky())
|
||||
{
|
||||
LL_DEBUGS("ENVIRONMENT") << "Blank sky for " << env_selection_to_string(env) << ". Reusing environment for sky." << LL_ENDL;
|
||||
environment->setSky(mCurrentEnvironment->getSky());
|
||||
environment->setFlags(DayInstance::NO_ANIMATE_SKY);
|
||||
if (mCurrentEnvironment->getEnvironmentSelection() != ENV_NONE)
|
||||
{
|
||||
// Note: This looks suspicious. Shouldn't we assign whole day if mCurrentEnvironment has whole day?
|
||||
// and then add water/sky on top
|
||||
// This looks like it will result in sky using single keyframe instead of whole day if day is present
|
||||
// when setting static water without static sky
|
||||
environment->setSky(mCurrentEnvironment->getSky());
|
||||
environment->setFlags(DayInstance::NO_ANIMATE_SKY);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Environment is not properly initialized yet, but we should have environment by this point
|
||||
DayInstance::ptr_t substitute = getEnvironmentInstance(ENV_PARCEL, true);
|
||||
if (!substitute || !substitute->getSky())
|
||||
{
|
||||
substitute = getEnvironmentInstance(ENV_REGION, true);
|
||||
}
|
||||
if (!substitute || !substitute->getSky())
|
||||
{
|
||||
substitute = getEnvironmentInstance(ENV_DEFAULT, true);
|
||||
}
|
||||
|
||||
if (substitute && substitute->getSky())
|
||||
{
|
||||
environment->setSky(substitute->getSky());
|
||||
environment->setFlags(DayInstance::NO_ANIMATE_SKY);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("ENVIRONMENT") << "Failed to assign substitute water/sky, environment is not properly initialized" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fixed.second)
|
||||
|
|
@ -1167,9 +1196,38 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
|
|||
}
|
||||
else if (!environment->getWater())
|
||||
{
|
||||
LL_DEBUGS("ENVIRONMENT") << "Blank water for " << env_selection_to_string(env) << ". Reusing environment for water." << LL_ENDL;
|
||||
environment->setWater(mCurrentEnvironment->getWater());
|
||||
environment->setFlags(DayInstance::NO_ANIMATE_WATER);
|
||||
if (mCurrentEnvironment->getEnvironmentSelection() != ENV_NONE)
|
||||
{
|
||||
// Note: This looks suspicious. Shouldn't we assign whole day if mCurrentEnvironment has whole day?
|
||||
// and then add water/sky on top
|
||||
// This looks like it will result in water using single keyframe instead of whole day if day is present
|
||||
// when setting static sky without static water
|
||||
environment->setWater(mCurrentEnvironment->getWater());
|
||||
environment->setFlags(DayInstance::NO_ANIMATE_WATER);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Environment is not properly initialized yet, but we should have environment by this point
|
||||
DayInstance::ptr_t substitute = getEnvironmentInstance(ENV_PARCEL, true);
|
||||
if (!substitute || !substitute->getWater())
|
||||
{
|
||||
substitute = getEnvironmentInstance(ENV_REGION, true);
|
||||
}
|
||||
if (!substitute || !substitute->getWater())
|
||||
{
|
||||
substitute = getEnvironmentInstance(ENV_DEFAULT, true);
|
||||
}
|
||||
|
||||
if (substitute && substitute->getWater())
|
||||
{
|
||||
environment->setWater(substitute->getWater());
|
||||
environment->setFlags(DayInstance::NO_ANIMATE_WATER);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("ENVIRONMENT") << "Failed to assign substitute water/sky, environment is not properly initialized" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!mSignalEnvChanged.empty())
|
||||
|
|
@ -1694,8 +1752,11 @@ void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentI
|
|||
}
|
||||
else
|
||||
{
|
||||
setEnvironment(ENV_REGION, envinfo->mDayCycle, envinfo->mDayLength, envinfo->mDayOffset, envinfo->mEnvVersion);
|
||||
mTrackAltitudes = envinfo->mAltitudes;
|
||||
// update track selection based on new altitudes
|
||||
mCurrentTrack = calculateSkyTrackForAltitude(gAgent.getPositionAgent().mV[VZ]);
|
||||
|
||||
setEnvironment(ENV_REGION, envinfo->mDayCycle, envinfo->mDayLength, envinfo->mDayOffset, envinfo->mEnvVersion);
|
||||
}
|
||||
|
||||
LL_DEBUGS("ENVIRONMENT") << "Altitudes set to {" << mTrackAltitudes[0] << ", "<< mTrackAltitudes[1] << ", " << mTrackAltitudes[2] << ", " << mTrackAltitudes[3] << LL_ENDL;
|
||||
|
|
@ -1927,6 +1988,10 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ
|
|||
{
|
||||
LL_WARNS("ENVIRONMENT") << "Couldn't retrieve environment settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
|
||||
}
|
||||
else if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLSD environment = result[KEY_ENVIRONMENT];
|
||||
|
|
@ -2024,6 +2089,10 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
|
|||
notify["FAIL_REASON"] = reason;
|
||||
}
|
||||
}
|
||||
else if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLSD environment = result[KEY_ENVIRONMENT];
|
||||
|
|
@ -2094,6 +2163,10 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen
|
|||
notify["FAIL_REASON"] = reason;
|
||||
}
|
||||
}
|
||||
else if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLSD environment = result[KEY_ENVIRONMENT];
|
||||
|
|
@ -2331,6 +2404,15 @@ void LLEnvironment::onAgentPositionHasChanged(const LLVector3 &localpos)
|
|||
return;
|
||||
|
||||
mCurrentTrack = trackno;
|
||||
|
||||
LLViewerRegion* cur_region = gAgent.getRegion();
|
||||
if (!cur_region || !cur_region->capabilitiesReceived())
|
||||
{
|
||||
// Environment not ready, environment will be updated later, don't cause 'blend' yet.
|
||||
// But keep mCurrentTrack updated in case we won't get new altitudes for some reason
|
||||
return;
|
||||
}
|
||||
|
||||
for (S32 env = ENV_LOCAL; env < ENV_DEFAULT; ++env)
|
||||
{
|
||||
if (mEnvironments[env])
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string& cap_url)
|
|||
|
||||
httpOpts->setWantHeaders(true);
|
||||
httpOpts->setFollowRedirects(false);
|
||||
httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL verification fails
|
||||
|
||||
LLSD result = httpAdapter->getAndSuspend(httpRequest, cap_url, httpOpts);
|
||||
|
||||
|
|
|
|||
|
|
@ -320,4 +320,4 @@ void LLFloaterCreateLandmark::setItem(const uuid_set_t& items)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ void LLFloaterEditEnvironmentBase::onSaveAsCommit(const LLSD& notification, cons
|
|||
{
|
||||
const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
|
||||
LLUUID parent_id = mInventoryItem->getParentUUID();
|
||||
if (marketplacelistings_id == parent_id)
|
||||
if (marketplacelistings_id == parent_id || gInventory.isObjectDescendentOf(mInventoryItem->getUUID(), gInventory.getLibraryRootFolderID()))
|
||||
{
|
||||
parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,6 +211,20 @@ bool LLFloaterExperienceProfile::experiencePermission( LLHandle<LLFloaterExperie
|
|||
return false;
|
||||
}
|
||||
|
||||
bool LLFloaterExperienceProfile::matchesKey(const LLSD& key)
|
||||
{
|
||||
if (key.has("experience_id"))
|
||||
{
|
||||
return mExperienceId == key["experience_id"].asUUID();
|
||||
}
|
||||
else if (key.isUUID())
|
||||
{
|
||||
return mExperienceId == key.asUUID();
|
||||
}
|
||||
// Assume NULL uuid
|
||||
return mExperienceId.isNull();
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterExperienceProfile::onClickEdit()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ public:
|
|||
|
||||
LLFloaterExperienceProfile(const LLSD& data);
|
||||
virtual ~LLFloaterExperienceProfile();
|
||||
|
||||
/* virtual */ bool matchesKey(const LLSD& key);
|
||||
|
||||
LLUUID getExperienceId() const { return mExperienceId; }
|
||||
void setPreferences( const LLSD& content );
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ void LLFloaterGridStatus::getGridStatusRSSCoro()
|
|||
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
|
||||
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
|
||||
|
||||
httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL fails
|
||||
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
|
||||
std::string url = gSavedSettings.getString("GridStatusRSS");
|
||||
|
||||
|
|
|
|||
|
|
@ -122,8 +122,7 @@ void LLFloaterURLEntry::headerFetchComplete(S32 status, const std::string& mime_
|
|||
}
|
||||
|
||||
}
|
||||
// Decrement the cursor
|
||||
getWindow()->decBusyCount();
|
||||
|
||||
getChildView("loading_label")->setVisible( false);
|
||||
closeFloater();
|
||||
}
|
||||
|
|
@ -302,3 +301,9 @@ bool LLFloaterURLEntry::callback_clear_url_list(const LLSD& notification, const
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFloaterURLEntry::onClose( bool app_quitting )
|
||||
{
|
||||
// Decrement the cursor
|
||||
getWindow()->decBusyCount();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public:
|
|||
// that panel via the handle.
|
||||
static LLHandle<LLFloater> show(LLHandle<LLPanel> panel_land_media_handle, const std::string media_url);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onClose( bool app_quitting );
|
||||
void headerFetchComplete(S32 status, const std::string& mime_type);
|
||||
|
||||
bool addURLToCombobox(const std::string& media_url);
|
||||
|
|
|
|||
|
|
@ -105,6 +105,9 @@ LLHUDNameTag::LLHUDNameTag(const U8 type)
|
|||
{
|
||||
LLPointer<LLHUDNameTag> ptr(this);
|
||||
sTextObjects.insert(ptr);
|
||||
|
||||
mRoundedRectImgp = LLUI::getUIImage("Rounded_Rect");
|
||||
mRoundedRectTopImgp = LLUI::getUIImage("Rounded_Rect_Top");
|
||||
}
|
||||
|
||||
LLHUDNameTag::~LLHUDNameTag()
|
||||
|
|
@ -274,9 +277,6 @@ void LLHUDNameTag::renderText(BOOL for_select)
|
|||
|
||||
mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f));
|
||||
|
||||
// *TODO: cache this image
|
||||
LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Rect");
|
||||
|
||||
// *TODO: make this a per-text setting
|
||||
LLColor4 bg_color = LLUIColorTable::instance().getColor("NameTagBackground");
|
||||
bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor);
|
||||
|
|
@ -306,17 +306,16 @@ void LLHUDNameTag::renderText(BOOL for_select)
|
|||
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
|
||||
LLRect screen_rect;
|
||||
screen_rect.setCenterAndSize(0, static_cast<S32>(lltrunc(-mHeight / 2 + mOffsetY)), static_cast<S32>(lltrunc(mWidth)), static_cast<S32>(lltrunc(mHeight)));
|
||||
imagep->draw3D(render_position, x_pixel_vec, y_pixel_vec, screen_rect, bg_color);
|
||||
mRoundedRectImgp->draw3D(render_position, x_pixel_vec, y_pixel_vec, screen_rect, bg_color);
|
||||
if (mLabelSegments.size())
|
||||
{
|
||||
LLUIImagePtr rect_top_image = LLUI::getUIImage("Rounded_Rect_Top");
|
||||
LLRect label_top_rect = screen_rect;
|
||||
const S32 label_height = ll_round((mFontp->getLineHeight() * (F32)mLabelSegments.size() + (VERTICAL_PADDING / 3.f)));
|
||||
label_top_rect.mBottom = label_top_rect.mTop - label_height;
|
||||
LLColor4 label_top_color = text_color;
|
||||
label_top_color.mV[VALPHA] = gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor;
|
||||
|
||||
rect_top_image->draw3D(render_position, x_pixel_vec, y_pixel_vec, label_top_rect, label_top_color);
|
||||
mRoundedRectTopImgp->draw3D(render_position, x_pixel_vec, y_pixel_vec, label_top_rect, label_top_color);
|
||||
}
|
||||
|
||||
F32 y_offset = (F32)mOffsetY;
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@
|
|||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
class LLDrawable;
|
||||
class LLHUDNameTag;
|
||||
class LLUIImage;
|
||||
|
||||
struct llhudnametag_further_away
|
||||
{
|
||||
|
|
@ -171,6 +171,8 @@ private:
|
|||
EVertAlignment mVertAlignment;
|
||||
S32 mLOD;
|
||||
BOOL mHidden;
|
||||
LLPointer<LLUIImage> mRoundedRectImgp;
|
||||
LLPointer<LLUIImage> mRoundedRectTopImgp;
|
||||
|
||||
static BOOL sDisplayText ;
|
||||
static std::set<LLPointer<LLHUDNameTag> > sTextObjects;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue