Commit Graph

2625 Commits (5dcd81c15507ad8f487e5727bc7a94de82f6fb45)

Author SHA1 Message Date
Brad Payne (Vir Linden) 0200135224 merge 2016-10-18 16:59:15 -04:00
Brad Payne (Vir Linden) 8d6bb9ee4e SL-451 - SSE-optimized matrix multiply, used in initSkinningMatrixPalette() 2016-09-28 15:43:07 -04:00
Rider Linden 884b03e877 Merge 2016-09-16 14:43:35 -07:00
Rider Linden 51236b7c9c Merge 2016-09-14 09:55:18 -07:00
Nat Goodspeed 2d3c5fb060 Automated merge with ssh://bitbucket.org/lindenlab/viewer-vlc 2016-09-06 20:52:57 -04:00
Nat Goodspeed 67c401047a MAINT-5011: Ensure BlockTimer::mStartTime is unconditionally set.
Previous logic could possibly leave mStartTime uninitialized, producing fatal
warnings with gcc 4.7.
2016-09-06 20:48:16 -04:00
Oz Linden 5edd4cecfc merge changes for exception handling 2016-09-06 11:07:39 -04:00
Oz Linden 72f4c72001 downgrade spammy LLCoros logging to DEBUG 2016-09-06 10:21:28 -04:00
Oz Linden a5adabb4f6 add protections against failed memory allocations in VBO and aligned memory 2016-09-06 10:04:19 -04:00
Nat Goodspeed 1804da89ee MAINT-5011: Abbreviate __FILE__ path in log_unhandled_exception_().
LLError::abbreviateFile() is specifically to avoid cluttering log output with
the prefix of an absolute file path on the original build system, pointless
for anyone trying to read the log.
2016-09-02 14:00:18 -04:00
Nat Goodspeed 1ed351e28f MAINT-5011: Use LL_VLOGS() rather than raw lllog() macro.
Raw lllog() doesn't work for varying log level, which is why LL_VLOGS()
exists.
2016-09-01 19:46:39 -04:00
Nat Goodspeed 96467f09f2 Automated merge with file:///Users/nat/linden/viewer-comment-lllog 2016-09-01 19:44:38 -04:00
Nat Goodspeed 9be4e7e448 MAINT-5232: Introduce LL_VLOGS() macro: log call with variable level.
In some places we want to log the same information but with different severity
depending on specifics. In other cases we need to test the availability of the
logging subsystem before engaging it. LL_VLOGS() accepts an LLError::ELevel
argument that can differ with each call, while retaining the desirable feature
of deciding only once for each level.
2016-09-01 19:32:31 -04:00
Nat Goodspeed 7203162071 Automated merge with file:///Users/nat/linden/viewer-comment-lllog 2016-09-01 15:22:34 -04:00
Nat Goodspeed 31d3d654f1 MAINT-5011: Advise against lllog() instead of (e.g.) LL_INFOS(). 2016-09-01 15:21:54 -04:00
Nat Goodspeed 8118762c12 MAINT-5011: Add log tag to LOG_UNHANDLED_EXCEPTION() log messages. 2016-08-31 17:16:43 -04:00
Nat Goodspeed 0c2442eb68 MAINT-5011: Fix abbreviateFile() test to run under .../indra/ path.
This particular test relied on there being exactly one instance of the string
"indra" in the source file's __FILE__ path -- which is usually true, but not
if the developer clones the viewer source repo under a parent directory whose
path itself contains "indra". Fix to handle any number of occurrences.
2016-08-29 18:48:47 +00:00
Nat Goodspeed c2c3086d6c MAINT-5011: Catch LLContinueError in LLStopWhenHandled::operator().
This means that an exception derived from LLContinueError thrown in an
LLEventPump listener won't prevent other listeners on the same LLEventPump
from receiving that event.
2016-08-26 15:50:37 -04:00
Nat Goodspeed abfe05c1b3 MAINT-5011: Add comments to LLCoros::toplevel() exception handlers. 2016-08-26 14:20:11 -04:00
Nat Goodspeed 17382b22e0 MAINT-5011: Remove unreferenced param name to avoid fatal warning 2016-08-25 14:04:36 -04:00
Nat Goodspeed 4d10172d8b MAINT-5011: Catch unhandled exceptions in LLCoros coroutines.
Wrap coroutine call in try/catch in top-level coroutine wrapper function
LLCoros::toplevel(). Distinguish exception classes derived from
LLContinueError (log and continue) from all others (crash with LL_ERRS).

Enhance CRASH_ON_UNHANDLED_EXCEPTIONS() and LOG_UNHANDLED_EXCEPTIONS() macros
to accept a context string to supplement the log message. This lets us replace
many places that called boost::current_exception_diagnostic_information() with
LOG_UNHANDLED_EXCEPTIONS() instead, since the explicit calls were mostly to
log supplemental information.

Provide supplemental information (coroutine name, function parameters) for
some of the previous LOG_UNHANDLED_EXCEPTIONS() calls. This information
duplicates LL_DEBUGS() information at the top of these functions, but in a
typical log file we wouldn't see the LL_DEBUGS() message.

Eliminate a few catch (std::exception e) clauses: the information we get from
boost::current_exception_diagnostic_information() in a catch (...) clause
makes it unnecessary to distinguish.

In a few cases, add a final 'throw;' to a catch (...) clause: having logged
the local context info, propagate the exception to be caught by higher-level
try/catch.

In a couple places, couldn't resist reconciling indentation within a
particular function: tabs where the rest of the function uses tabs, spaces
where the rest of the function uses spaces.

In LLLogin::Impl::loginCoro(), eliminate some confusing comments about an
array of rewritten URIs that date back to a long-deleted implementation.
2016-08-18 17:33:44 -04:00
Nat Goodspeed c7bf8af637 MAINT-5011: Use BOOST_CURRENT_FUNCTION instead of __PRETTY_FUNCTION__
since Visual Studio doesn't know __PRETTY_FUNCTION__, and Boost already has a
portable macro to Do The Right Thing.
2016-08-18 11:06:51 -04:00
Nat Goodspeed 993f54f6e9 MAINT-5011: Try to enrich catch (...) logging throughout viewer.
Turns out we have a surprising number of catch (...) clauses in the viewer
code base. If all we currently do is

    LL_ERRS() << "unknown exception" << LL_ENDL;

then call CRASH_ON_UNHANDLED_EXCEPTION() instead. If what we do is

    LL_WARNS() << "unknown exception" << LL_ENDL;

then call LOG_UNHANDLED_EXCEPTION() instead.

Since many places need LOG_UNHANDLED_EXCEPTION() and nobody catches
LLContinueError yet, eliminate LLContinueError& parameter from
LOG_UNHANDLED_EXCEPTION(). This permits us to use the same log message as
CRASH_ON_UNHANDLED_EXCEPTION(), just with a different severity level.

Where a catch (...) clause actually provides contextual information, or makes
an error string, add boost::current_exception_diagnostic_information() to try
to figure out actual exception class and message.
2016-08-17 15:40:03 -04:00
Nat Goodspeed e72bdc9bc5 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2016-08-17 11:41:12 -04:00
Nat Goodspeed 5e9d2f57c8 MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION().
A level of preprocessor indirection lets us later change the implementation if
desired.
2016-08-17 11:36:24 -04:00
Nat Goodspeed 1ed76c382e MAINT-5011: Add llexception_test.cpp with tests (and conclusions).
llexception_test.cpp is an unusual test source in that it need not be verified
on every build, so its invocation in indra/llcommon/CMakeLists.txt is
commented out with that remark. Its purpose is to help a developer decide what
base class(es) to use for LLException, how to throw and how to catch.

Our current conclusions are written up as comments in llexception_test.cpp.

Added CRASH_ON_UNHANDLED_EXCEPTION() and LOG_UNHANDLED_EXCEPTION() macros to
llexception.h -- macros to log __FILE__, __LINE__ and __PRETTY_FUNCTION__ of
the catch site. These invoke functions in llexception.cpp so we don't need to
#include llerror.h for every possible catch site.
2016-08-17 10:45:06 -04:00
Brad Payne (Vir Linden) 57da9bcd1b merge from viewer-release 2016-08-15 09:52:06 -04:00
Rider Linden 694fe9cfc5 explicit not available for conversion operators in Linux yet 2016-07-21 13:03:40 -07:00
Rider Linden de438e7512 MAINT-6570: Feedback from code review. 2016-07-21 11:35:24 -07:00
Rider Linden 31009296bb Merge 2016-07-21 09:08:28 -07:00
Rider Linden d0d07ccac5 Fix for linux build 2016-07-20 16:45:17 -07:00
Rider Linden 0b4b121945 MAINT-6570: Changes for LLCheckedHandle plus some timeout issues from AndreyK regarding script compiles/resets. 2016-07-20 14:56:49 -07:00
Nat Goodspeed 9c49a6c91d MAINT-5011: Introduce LLException base class for viewer exceptions.
This also introduces LLContinueError for exceptions which should interrupt
some part of viewer processing (e.g. the current coroutine) but should attempt
to let the viewer session proceed.

Derive all existing viewer exception classes from LLException rather than from
std::runtime_error or std::logic_error.

Use BOOST_THROW_EXCEPTION() rather than plain 'throw' to enrich the thrown
exception with source file, line number and containing function.
2016-07-19 16:25:25 -04:00
Brad Payne (Vir Linden) cba0bb3038 SL-109 - little bit of log spam cleanup 2016-07-05 16:18:50 -04:00
Nat Goodspeed 464a0df4c1 DRTVWR-418: Unify control flow through LLAppViewer across platforms.
The LLApp API used to consist of init(), mainLoop(), cleanup() methods. This
makes sense -- but on Mac that structure was being subverted. The method
called mainLoop() was in fact being called once per frame. There was
initialization code in the method, which (on Mac) needed to be skipped with an
already-initialized bool. There was a 'while' loop which (on Mac) needed to be
turned into an 'if' instead so the method would return after every frame.

Rename LLApp::mainLoop() to frame(). Propagate through subclasses LLAppViewer
and LLCrashLogger. Document the fact that frame() returns true to mean "done."
(This was always the case, but had to be inferred from the code.)

Rename the Mac Objective-C function mainLoop to oneFrame. Rename the C++ free
function it calls from runMainLoop() to pumpMainLoop(). Add comments to
llappdelegate-objc.mm explaining (inferred) control flow.

Change the Linux viewer main() and the Windows viewer WINMAIN() from a single
LLAppViewer::mainLoop() call to repeatedly call frame() until it returns true.

Move initialization code from the top of LLAppViewer::frame() to the init()
method, where it more properly belongs. Remove corresponding
mMainLoopInitialized flag (and all references) from LLAppViewer.

Remove 'while (! LLApp::isExiting())' (or on Mac, 'if (! LLApp::isExiting())')
from LLAppViewer::frame() -- thus unindenting the whole body of the 'while'
and causing many lines of apparent change. (Apologies to reviewers.)

There are four LLApp states: APP_STATUS_RUNNING, APP_STATUS_QUITTING,
APP_STATUS_STOPPED and APP_STATUS_ERROR. Change LLAppViewer::frame() return
value from (isExiting()) (QUITTING or ERROR) to (! isRunning()). I do not know
under what circumstances the state might transition to STOPPED during a
frame() call, but I'm quite sure that if it does, we don't want to call
frame() again. We only want a subsequent call if the state is RUNNING.

Also rename mainLoop() method in LLCrashLogger subclasses
LLCrashLoggerWindows, LLCrashLoggerMac, LLCrashLoggerLinux. Of course it's
completely up to the frame() method whether to yield control; none of those in
fact do. Honor protocol by returning true (frame() is done), even though each
one's main() caller ignores the return value.

In fact LLCrashLoggerWindows::mainLoop() wasn't using the return protocol
correctly anyway, returning wParam or 0 or 1 -- possibly because the return
protocol was never explicitly documented. It should always return true: "I'm
done, don't call me again."
2016-06-30 16:51:50 -04:00
Brad Payne (Vir Linden) 93bafda56b MAINT-6366 - diagnostics related to animation asset downloads 2016-06-13 09:15:42 -04:00
andreykproductengine 1adfaa081f MAINT-6446 Correct password length handling 2016-06-01 16:56:04 +03:00
Brad Payne (Vir Linden) f47ceb47bb merged jelly-doll viewer-release into bento 2016-05-21 08:15:28 -04:00
AndreyL ProductEngine c50f96b492 Merged in lindenlab/viewer-lynx 2016-05-20 02:06:08 +03:00
andreykproductengine d3de134da0 MAINT-6409 invisiprims should be preloaded 2016-05-18 17:17:32 +03:00
Brad Payne (Vir Linden) d69c01ba80 merge 2016-05-06 16:29:34 -04:00
Brad Payne (Vir Linden) 2d8b53854e merge 2016-05-06 11:00:47 -04:00
Oz Linden 950c41d184 merge 4.0.4-release and MAINT-5974 2016-05-06 10:28:42 -04:00
Oz Linden a07a8cbf6e merge changes for 4.0.4-release 2016-05-06 09:05:51 -04:00
Rider Linden 66dd72459a MAINT-6336: Initialize TempBoundListener with constructor 2016-04-26 13:44:44 -07:00
Rider Linden dd2311b993 MAINT-6336: Put the timeout upstream of the suspending pump and fire the timeout it. Also some cleanup on LLSD construction in vivox. 2016-04-26 11:56:25 -07:00
Rider Linden 899489ae0a MAINT-6336: Centralize waiting on event pump with a timeout. Shorten the lifespan of a timeout event pump lifespan to be no longer than necessary. Change all references to the LLEventTimer to instead uses the centralized version. 2016-04-22 12:07:27 -07:00
Brad Payne (Vir Linden) 78e9fb2614 SL-315 - disable call stack dumping in release, where we don't have the info anyway. 2016-04-21 10:55:08 -04:00
ruslantproductengine 503dc6ee65 MAINT-6317 [QuickGraphics-RC] Some rigged mesh attachments render fully on jellybaby avatars when ALM is enabled
FIXED
- remove global identifier for the black texture
- add black texture 2x2x3 localy on apllication startup
- add special flag to LLViewerFetchedTexture for protect from removing
2016-04-21 12:47:49 +03:00
Rider Linden d96004e4af MAINT-6336: Crasher showing up in voice was a Bound Listener that should have been a Temp Bound listener. 2016-04-20 10:21:35 -07:00