summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-11SL-10297: Move LL_ERRS crash location into the LL_ERRS macro itself.Nat Goodspeed
Introduce Oz's LLERROR_CRASH macro analogous to the old LLError::crashAndLoop() function. Change LL_ENDL macro so that, after calling flush(), if the CallSite is for LEVEL_ERROR, we invoke LLERROR_CRASH right there. Change the meaning of LLError::FatalFunction. It used to be responsible for the actual crash (hence crashAndLoop()). Now, instead, its role is to disrupt control flow in some other way if you DON'T want to crash: throw an exception, or call exit() or some such. Any FatalFunction that returns normally will fall into the new crash in LL_ENDL. Accordingly, the new default FatalFunction is a no-op lambda. This eliminates the need to test for empty (not set) FatalFunction in Log::flush(). Remove LLError::crashAndLoop() because the official LL_ERRS crash is now in LL_ENDL. One of the two common use cases for setFatalFunction() used to be to intercept control in the last moments before crashing -- not to crash or to avoid crashing, but to capture the LL_ERRS message in some way. Especially when that's temporary, though (e.g. LLLeap), saving and restoring the previous FatalFunction only works when the lifespans of the relevant objects are strictly LIFO. Either way, that's a misuse of FatalFunction. Fortunately the Recorder mechanism exactly addresses that case. Introduce a GenericRecorder template subclass, with LLError::addGenericRecorder(callable) that accepts a callable with suitable (level, message) signature, instantiates a GenericRecorder, adds it to the logging machinery and returns the RecorderPtr for possible later use with removeRecorder(). Change llappviewer.cpp's errorCallback() to an addGenericRecorder() callable. Its role was simply to update gDebugInfo["FatalMessage"] with the LL_ERRS message, then call writeDebugInfo(), before calling crashAndLoop() to finish crashing. Remove the crashAndLoop() call, retaining the gDebugInfo logic. Pass errorCallback() to LLError::addGenericRecorder() instead of setFatalFunction(). Oddly, errorCallback()'s crashAndLoop() call was conditional on a compile-time SHADER_CRASH_NONFATAL symbol. The new mechanism provides no way to support SHADER_CRASH_NONFATAL -- it is a Bad Idea to return normally from any LL_ERRS invocation! Rename LLLeapImpl::fatalFunction() to onError(). Instead of passing it to LLError::setFatalFunction(), pass it to addGenericRecorder(). Capture the returned RecorderPtr in mRecorder, replacing mPrevFatalFunction. Then ~LLLeapImpl() calls removeRecorder(mRecorder) instead of restoring mPrevFatalFunction (which, as noted above, was order-sensitive). Of course, every enabled Recorder is called with every log message. onError() and errorCallback() must specifically test for calls with LEVEL_ERROR. LLSingletonBase::logerrs() used to call LLError::getFatalFunction(), check the return and call it if non-empty, else call LLError::crashAndLoop(). Replace all that with LLERROR_CRASH. Remove from llappviewer.cpp the watchdog_llerrs_callback() and watchdog_killer_callback() functions. watchdog_killer_callback(), passed to Watchdog::init(), used to setFatalFunction(watchdog_llerrs_callback) and then invoke LL_ERRS() -- which seems a bit roundabout. watchdog_llerrs_callback(), in turn, replicated much of the logic in the primary errorCallback() function before replicating the crash from llwatchdog.cpp's default_killer_callback(). Instead, pass LLWatchdog::init() a lambda that invokes the LL_ERRS() message formerly found in watchdog_killer_callback(). It no longer needs to override FatalFunction with watchdog_llerrs_callback() because errorCallback() will still be called as a Recorder, obviating watchdog_llerrs_callback()'s first half; and LL_ENDL will handle the crash, obviating the second half. Remove from llappviewer.cpp the static fast_exit() function, which was simply an alias for _exit() acceptable to boost::bind(). Use a lambda directly calling _exit() instead of using boost::bind() at all. In the CaptureLog class in llcommon/tests/wrapllerrs.h, instead of statically referencing the wouldHaveCrashed() function from test.cpp, simply save and restore the current FatalFunction across the LLError::saveAndResetSettings() call. llerror_test.cpp calls setFatalFunction(fatalCall), where fatalCall() was a function that simply set a fatalWasCalled bool rather than actually crashing in any way. Of course, that implementation would now lead to crashing the test program. Make fatalCall() throw a new FatalWasCalled exception. Introduce a CATCH(LL_ERRS("tag"), "message") macro that expands to: LL_ERRS("tag") << "message" << LL_ENDL; within a try/catch block that catches FatalWasCalled and sets the same bool. Change all existing LL_ERRS() in llerror_test.cpp to corresponding CATCH() calls. In fact there's also an LL_DEBUGS(bad tag) invocation that exercises an LL_ERRS internal to llerror.cpp; wrap that too.
2021-05-10SL-10297: Make LLSingletonBase::llerrs() et al. runtime variadic.Nat Goodspeed
Instead of accepting a fixed list of (const char* p1="", etc.), accept (std::initializer_list<std::string_view>). Accepting a std::initializer_list<T> in your parameter list allows coding (e.g.) func({T0, T1, T2, ... }); -- in other words, you can pass the initializer_list a brace-enclosed list of an arbitrary number of instances of T. Using std::string_view instead of const char* means we can pass *either* const char* or std::string. string_view is cheaply constructed from either, allowing uniform treatment within the function. Constructing string_view from std::string simply extracts the pointer and length from the std::string. Constructing string_view from const char* (e.g. a "string literal") requires scanning the string for its terminating nul byte -- but that would be necessary even if the scan were deferred until the function body. Since string_view stores the length, the scan still happens only once.
2021-04-29Increment viewer version to 6.4.19Nat Goodspeed
following promotion of DRTVWR-515
2021-04-15SL-14914 New release viewer install updated to RC unexpectedlyAndrey Kleshchev
Requested behavior: First install of a new viewer should never prompt to update to any RC. Anfortunately neither viewer nor updater can tell the difference betwen RC and optional release update, so setting updater to download only required updates.
2021-04-01SL-15061 Crash deleting non-zero reference in LLConversationItemSessionAndrey Kleshchev
2021-04-01Merge branch 'master' into DRTVWR-515-maintAndrey Lihatskiy
2021-04-01Increment viewer version to 6.4.18Nat Goodspeed
following promotion of DRTVWR-514
2021-04-01SL-15053 Use previous icon for Nearby chatMnikolenko Productengine
2021-03-23SL-14993 Crash accessing mInvBindMatrixAndrey Kleshchev
2021-03-23SL-14993 Crash accessing mInvBindMatrixAndrey Kleshchev
2021-03-09Merge branch 'master' into DRTVWR-514-keymappingsAndrey Lihatskiy
2021-03-09Merge branch 'master' into DRTVWR-515-maintAndrey Lihatskiy
2021-03-09Increment viewer version to 6.4.17Nat Goodspeed
following promotion of DRTVWR-532
2021-03-08Increment viewer version to 6.4.16 following revert of DRTVWR-519Brad Payne (Vir Linden)
2021-03-08Revert "Merge branch 'master' of https://bitbucket.org/lindenlab/viewer into ↵Brad Payne (Vir Linden)
DRTVWR-519" This reverts commit e61f485a04dc8c8ac6bcf6a24848359092884d14, reversing changes made to 00c47d079f7e958e473ed4083a7f7691fa02dcd5.
2021-03-02SL-12122 - removed frametime spikes in windows build caused by unnecessary ↵Brad Payne (Vir Linden)
call to GetPerformanceInfo()
2021-03-02Merge branch 'master' into DRTVWR-515-maintAndrey Lihatskiy
2021-03-02Merge branch 'master' into DRTVWR-514-keymappingsAndrey Lihatskiy
2021-03-02Increment viewer version to 6.4.15Nat Goodspeed
following promotion of DRTVWR-519
2021-03-01SL-13609 Don't use any icon for Nearby chatMnikolenko Productengine
2021-02-24SL-13788 Detecting Intel HD 400 as just Intel HDAndrey Kleshchev
CPU based detection in case Intel HD Graphics got detected
2021-02-18SL-13788 Some Intel gpus are recognized as just Intel HD GraphicsAndrey Kleshchev
2021-02-17Merge branch 'master' into DRTVWR-514-keymappingsAndrey Lihatskiy
2021-02-17Merge branch 'master' into DRTVWR-515-maintAndrey Lihatskiy
2021-02-17Merge branch 'master' of https://bitbucket.org/lindenlab/viewer into DRTVWR-519unknown
2021-02-17Increment viewer version to 6.4.14Nat Goodspeed
following promotion of DRTVWR-517
2021-02-11SL-12795 Fix log session name not updatingAndrey Kleshchev
2021-02-11SL-11215 Fixed unit testAndrey Kleshchev
2021-02-10SL-11215 Release notes url should be an urlAndrey Kleshchev
2021-02-04SL-14828 Update web_profile_url for AditiAndrey Kleshchev
2021-02-03Merge with Master after Viewer releaseCallum Prentice
2021-02-02Updated LLCA to codeticket build 555615Andrey Lihatskiy
2021-02-01Merge branch 'master' into DRTVWR-514-keymappingsAndrey Kleshchev
# Conflicts: # indra/llui/llscrolllistctrl.cpp
2021-02-01Temporary revert "Updated LLCA to codeticket build 555537"Andrey Kleshchev
This reverts commit eac0f1857c6e8e89be649b60dcd8dca7573933df.
2021-02-01Merge branch 'master' of https://bitbucket.org/lindenlab/viewer/src/master ↵Andrey Kleshchev
into DRTVWR-515-maint # Conflicts: # autobuild.xml (llca) # indra/llwindow/llwindow.h (SL-13507 vs SL-5894) # indra/newview/llscenemonitor.cpp (SL-14422) # indra/newview/llvovolume.cpp (SL-12069)
2021-02-01Merge remote-tracking branch 'origin/master' into DRTVWR-517Brad Payne (Vir Linden)
2021-02-01Increment viewer version to 6.4.13Nat Goodspeed
following promotion of DRTVWR-513
2021-02-01Updated LLCA to codeticket build 555537Andrey Lihatskiy
2021-01-30SL-14793 Landmark fetching not cleaning request list on completionAndrey Kleshchev
2021-01-28SL-14767 Expanded logging to be a bit more informativeAndrey Kleshchev
2021-01-27SL-14423 Ctrl+Alt+Shift+A is assigned to 2 thingsAndrey Kleshchev
Remapped debugging avatar textures (requires godlike agent) to Ctrl+Shift+Alt+K
2021-01-27SL-14424 Remove shortcut that conflicts with camera controlsAndrey Kleshchev
2021-01-27SL-14422 Crash at LLSceneMonitor::dumpToFileMnikolenko Productengine
2021-01-26SL-14651 Keybinding's panel combobox can cause confusionAndrey Kleshchev
2021-01-26SL-14766 long unicode display names corrupt the conversation.logAndrey Kleshchev
Contribution by Beq Janus
2021-01-26SL-12198 Pull in updated version checkerAndrey Kleshchev
2021-01-25TeamCity not happy and only thing left to try is a dummy (whitespace) commitCallum Prentice
2021-01-22SL-3136 Logout crash fixes from Ansariel HillerAndrey Kleshchev
2021-01-21SL-14728 Im session without id should be closableAndrey Kleshchev
2021-01-21SL-14728 Added data validation into incoming call dialogAndrey Kleshchev