Commit Graph

291 Commits (cbf6aca2e8ebd32d29b70f2d582044153da05eab)

Author SHA1 Message Date
Ansariel 1f75fbd3b5 Merge branch 'main' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llimage/llimagebmp.cpp
#	indra/llimage/llimagetga.cpp
#	indra/llrender/llrender.cpp
#	indra/llui/lltransutil.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llviewerwindow.cpp
2024-03-26 22:43:42 +01:00
Andrey Kleshchev 78ce375dda SL-17896 Don't crash silently if files are missing or out of memory
Under debug LL_ERRS will show a message as well, but release won't show
anything and will quit silently so show a notification when applicable.
2024-03-05 00:29:35 +02:00
Ansariel 6c389316f1 Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer
# Conflicts:
#	autobuild.xml
#	indra/llcommon/llerror.cpp
#	indra/llrender/llrender.h
#	indra/newview/VIEWER_VERSION.txt
2023-10-27 13:00:41 +02:00
Ansariel 70db255e02 Merge branch 'master' of https://vcs.firestormviewer.org/viewer-merges/phoenix-firestorm-ll-master
# Conflicts:
#	.github/workflows/build.yaml
#	autobuild.xml
#	indra/llcommon/llerror.cpp
#	indra/llcommon/tests/workqueue_test.cpp
#	indra/newview/VIEWER_VERSION.txt
2023-10-27 11:52:59 +02:00
Ansariel 39a6735fc9 Merge branch 'main' of https://github.com/secondlife/viewer
# Conflicts:
#	.gitignore
#	autobuild.xml
#	indra/cmake/APR.cmake
#	indra/newview/CMakeLists.txt
#	indra/newview/installers/windows/installer_template.nsi
#	indra/newview/viewer_manifest.py
#	indra/test/namedtempfile.h
2023-10-26 15:49:12 +02:00
Brad Linden 673b3309dd Merge remote-tracking branch 'origin/main' into DRTVWR-559 2023-10-25 16:12:13 -07:00
Nat Goodspeed 651353560b SL-20476: Don't let the compiler know we intend to crash.
clang has gotten smart enough to recognize an inline attempt to store to
address zero. Fool it by storing to an address passed as a parameter, and pass
nullptr from a different source file.
2023-10-17 14:56:10 -04:00
Ansariel d927ba575a Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
# Conflicts:
#	indra/llcommon/llqueuedthread.cpp
#	indra/llcommon/llqueuedthread.h
#	indra/llcommon/lluuid.cpp
#	indra/llcommon/llworkerthread.cpp
#	indra/llimage/llimageworker.h
#	indra/newview/VIEWER_VERSION.txt
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewerwin32.cpp
#	indra/newview/llfilepicker.cpp
#	indra/newview/lltexturefetch.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llviewermenu.cpp
2023-05-17 21:40:54 +02:00
Brad Linden 2f44377b3e Merge remote-tracking branch 'origin/main' into DRTVWR-559 2023-05-17 11:17:48 -07:00
Ansariel 9057bfc995 Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llcommon/llcallstack.h
#	indra/llinventory/llsettingssky.cpp
#	indra/llmath/llvolume.cpp
#	indra/llwindow/llwindowwin32.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewerwin32.cpp
#	indra/newview/llmeshrepository.cpp
#	indra/newview/llmeshrepository.h
#	indra/newview/llviewerstats.cpp
#	indra/newview/llvoavatar.cpp
2023-05-05 12:35:33 +02:00
Nat Goodspeed 2a10bd406c DRTVWR-559: Replace debugLoggingEnabled() function with LL_DEBUGS().
The trouble with debugLoggingEnabled() is that it locked mutexes and searched
maps every time that call was reached. LL_DEBUGS() has the same functionality
(albeit with idiosyncratic syntax) but performs expensive lookups only once
per session, caching the result in a local static variable.
2023-05-03 09:55:31 -04:00
Ansariel b318e24f25 Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llrender/llglslshader.cpp
#	indra/newview/lldrawable.cpp
#	indra/newview/llvoavatar.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/pipeline.cpp
2023-05-03 14:59:31 +02:00
RunitaiLinden e09475713b DRTVWR-559 Optimization pass, make it so profileAvatar can read back GPU timer without a frame stall. 2023-05-02 18:47:21 -05:00
Andrey Kleshchev 6c54c9f8a9 Merge branch 'main' into DRTVWR-577-maint-S
# Conflicts:
#	indra/llcommon/llsdserialize.cpp
#	indra/llcommon/llsdserialize.h
#	indra/newview/llfilepicker.h
#	indra/newview/llfilepicker_mac.h
#	indra/newview/llfilepicker_mac.mm
2023-02-09 22:33:52 +02:00
Ansariel fb727de6e3 Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
# Conflicts:
#	indra/llcommon/llsdserialize.cpp
#	indra/llcommon/llsdserialize.h
#	indra/newview/llfilepicker.h
#	indra/newview/llfilepicker_mac.h
#	indra/newview/llfilepicker_mac.mm
#	indra/newview/llmeshrepository.cpp
2023-02-03 22:33:41 +01:00
Ansariel 8d154eaa8c Merge branch 'contribute' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llappearance/llavatarappearance.cpp
#	indra/llappearance/lldriverparam.cpp
#	indra/llappearance/llwearable.cpp
#	indra/llcommon/llerror.cpp
#	indra/llcommon/llqueuedthread.cpp
#	indra/llcommon/llsdserialize.h
#	indra/llcommon/llthreadsafequeue.h
#	indra/newview/app_settings/settings.xml
#	indra/newview/llpathfindingnavmesh.cpp
#	indra/newview/llviewerassetstorage.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/skins/default/xui/de/floater_flickr.xml
#	indra/newview/skins/default/xui/de/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/en/floater_about_land.xml
#	indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
#	indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
#	indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
#	indra/newview/skins/default/xui/fr/floater_flickr.xml
#	indra/newview/skins/default/xui/fr/panel_flickr_account.xml
#	indra/newview/skins/default/xui/fr/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/it/floater_flickr.xml
#	indra/newview/skins/default/xui/it/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/ja/floater_flickr.xml
#	indra/newview/skins/default/xui/ja/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/pl/floater_avatar_render_settings.xml
#	indra/newview/skins/default/xui/pl/floater_ban_duration.xml
#	indra/newview/skins/default/xui/pl/floater_camera_presets.xml
#	indra/newview/skins/default/xui/pl/floater_classified.xml
#	indra/newview/skins/default/xui/pl/floater_create_landmark.xml
#	indra/newview/skins/default/xui/pl/floater_delete_pref_preset.xml
#	indra/newview/skins/default/xui/pl/floater_fixedenvironment.xml
#	indra/newview/skins/default/xui/pl/floater_flickr.xml
#	indra/newview/skins/default/xui/pl/floater_linkreplace.xml
#	indra/newview/skins/default/xui/pl/floater_load_pref_preset.xml
#	indra/newview/skins/default/xui/pl/floater_my_environments.xml
#	indra/newview/skins/default/xui/pl/floater_my_scripts.xml
#	indra/newview/skins/default/xui/pl/floater_notifications_tabbed.xml
#	indra/newview/skins/default/xui/pl/floater_pick_track.xml
#	indra/newview/skins/default/xui/pl/floater_preferences_graphics_advanced.xml
#	indra/newview/skins/default/xui/pl/floater_preferences_view_advanced.xml
#	indra/newview/skins/default/xui/pl/floater_preview_trash.xml
#	indra/newview/skins/default/xui/pl/floater_profile.xml
#	indra/newview/skins/default/xui/pl/floater_settings_picker.xml
#	indra/newview/skins/default/xui/pl/floater_simple_outfit_snapshot.xml
#	indra/newview/skins/default/xui/pl/menu_avatar_rendering_settings.xml
#	indra/newview/skins/default/xui/pl/menu_avatar_rendering_settings_add.xml
#	indra/newview/skins/default/xui/pl/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/pl/panel_progress.xml
#	indra/newview/skins/default/xui/pl/panel_settings_sky_atmos.xml
#	indra/newview/skins/default/xui/pl/panel_settings_sky_clouds.xml
#	indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml
#	indra/newview/skins/default/xui/ru/floater_flickr.xml
#	indra/newview/skins/default/xui/ru/panel_flickr_account.xml
#	indra/newview/skins/default/xui/ru/panel_flickr_photo.xml
2023-01-13 15:19:29 +01:00
Fawrsk 8767e6995b Eliminate needless copies 2023-01-09 19:19:12 -04:00
Fawrsk 9e743c99fb Cleanup for loops in llcommon to use C++11 range based for loops 2023-01-07 00:38:12 -04:00
Nat Goodspeed 9522a0b7c1 DRTVWR-575: Fix llcommon assumptions that size_t fits in 4 bytes.
It's a little distressing how often we have historically coded S32 or U32 to
pass a length or index.

There are more such assumptions in other viewer subdirectories, but this is a
start.
2022-11-03 14:58:32 -04:00
Ansariel 7732257ea5 Merge branch 'DRTVWR-570-maint-Q' of https://bitbucket.org/lindenlab/viewer 2022-11-02 13:05:00 +01:00
Rye Mutt d0e07c770b Fix checks for empty LLSD maps to use size and not emptyMap which is for creating an empty LLSDMap type. 2022-10-30 06:56:16 -04:00
Ansariel ef88337eef Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
# Conflicts:
#	autobuild.xml
#	doc/contributions.txt
#	indra/llcommon/tests/llprocess_test.cpp
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/llfloatermodelpreview.cpp
#	indra/newview/llmodelpreview.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/viewer_manifest.py
2022-03-02 10:12:19 +01:00
Andrey Kleshchev 97a103255e Merge branch 'master' (DRTVWR-557) into DRTVWR-546
# Conflicts:
#	autobuild.xml
#	doc/contributions.txt
#	indra/cmake/GLOD.cmake
#	indra/llcommon/tests/llprocess_test.cpp
#	indra/newview/VIEWER_VERSION.txt
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/llfloatermodelpreview.cpp
#	indra/newview/llmodelpreview.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/viewer_manifest.py
2022-03-01 13:41:42 +02:00
Ansariel 0a0e2fe93e Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer 2022-01-15 02:39:07 +01:00
Ptolemy 6e306cd7ce SL-16606: Add profiler category LOGGING 2022-01-14 11:50:20 -08:00
Ansariel 2ba4a164e2 Merge branch 'DRTVWR-527-maint' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	autobuild.xml
#	indra/cmake/Python.cmake
#	indra/lib/python/indra/util/llmanifest.py
#	indra/lib/python/indra/util/test_win32_manifest.py
#	indra/llaudio/llstreamingaudio_fmodstudio.cpp
#	indra/llaudio/llstreamingaudio_fmodstudio.h
#	indra/llcommon/llerror.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/lleventnotifier.cpp
#	indra/newview/llpanellandmarks.cpp
#	indra/newview/llpreviewanim.cpp
#	indra/newview/llpreviewanim.h
#	indra/newview/llviewerregion.cpp
#	indra/newview/skins/default/xui/de/menu_place_add_button.xml
#	indra/newview/skins/default/xui/it/menu_place_add_button.xml
#	indra/newview/skins/default/xui/it/menu_teleport_history_item.xml
#	indra/newview/skins/default/xui/ja/menu_place_add_button.xml
#	indra/newview/skins/default/xui/pl/menu_place_add_button.xml
#	indra/newview/skins/default/xui/pl/menu_teleport_history_item.xml
#	indra/newview/skins/default/xui/ru/menu_place_add_button.xml
#	indra/newview/skins/default/xui/ru/menu_teleport_history_item.xml
#	indra/newview/viewer_manifest.py
2021-12-16 12:32:34 +01:00
Ansariel d06070241a Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	autobuild.xml
#	indra/cmake/00-Common.cmake
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappviewer.cpp
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/llvovolume.cpp
2021-12-16 10:09:12 +01:00
Dave Houlton cf35d27dfb DRTVWR-546 merge up to 6.5.2 2021-12-15 14:37:18 -07:00
Andrey Kleshchev 7c1cd47772 Merge branch 'master' (DRTVWR-552) into DRTVWR-527-maint
# Conflicts:
#	indra/media_plugins/cef/media_plugin_cef.cpp - setOnLoadEndCallback
#	indra/newview/llviewerassetstorage.cpp - mAssetCoroCount
2021-12-15 21:16:47 +02:00
Andrey Kleshchev 7f0fcfa332 SL-15241 Cleanup 2021-11-17 23:28:50 +02:00
Ansariel c2f8517118 Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm 2021-11-16 21:01:05 +01:00
Dave Houlton 353329c2c2 DRTVWR-546 merge in master v6.5.1 2021-11-16 11:44:55 -07:00
Ansariel f00647b6fd Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm 2021-11-16 15:38:25 +01:00
Andrey Lihatskiy 0bffd3d365 Merge branch 'master' into DRTVWR-519
# Conflicts:
#	README.md
2021-11-16 01:21:05 +02:00
Andrey Lihatskiy f9373a9b4e Merge branch 'master' into DRTVWR-527-maint
# Conflicts:
#	autobuild.xml
#	indra/newview/installers/windows/lang_pl.nsi
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llinventorymodel.cpp
2021-11-16 00:54:53 +02:00
Ansariel 7427b46ea5 Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	.gitignore
#	indra/cmake/Copy3rdPartyLibs.cmake
#	indra/llcommon/llcommon.cpp
#	indra/llcommon/llerror.cpp
#	indra/llcommon/llprofiler.h
#	indra/llcommon/llthread.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llprimitive/llmodel.h
#	indra/llrender/llfontgl.cpp
#	indra/llrender/llfontgl.h
#	indra/llrender/llgl.cpp
#	indra/llrender/llvertexbuffer.cpp
#	indra/llrender/llvertexbuffer.h
#	indra/llwindow/llwindowmacosx.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/llwindow/llwindowwin32.h
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewer.h
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/lldrawpoolavatar.h
#	indra/newview/lldynamictexture.cpp
#	indra/newview/llfloatermodelpreview.cpp
#	indra/newview/llimview.cpp
#	indra/newview/llmeshrepository.h
#	indra/newview/llmodelpreview.cpp
#	indra/newview/llnetmap.cpp
#	indra/newview/llskinningutil.cpp
#	indra/newview/llskinningutil.h
#	indra/newview/llspatialpartition.cpp
#	indra/newview/llteleporthistory.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llviewerobject.cpp
#	indra/newview/llviewerobjectlist.cpp
#	indra/newview/llviewertexture.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llviewerwindow.cpp
#	indra/newview/llvoicevivox.cpp
#	indra/newview/llvosky.cpp
#	indra/newview/llvovolume.cpp
2021-11-12 15:21:52 +01:00
Dave Parks 675514bdb3 SL-16093 Don't force the console window to be open on developer builds because it causes frame stalls while logging. 2021-09-27 23:56:06 +00:00
Ansariel 59906ecd60 Merge branch 'DRTVWR-527-maint' of https://bitbucket.org/lindenlab/viewer 2021-09-20 11:59:11 +02:00
Andrey Kleshchev 96d7cd29f6 SL-16004 Fix bugsplat displaying wrong top function
bugsplat shows KERNELBASE!RaiseException and flush() insread of forceErrorLLError, function crashes too early.
2021-09-16 01:04:02 +03:00
Ansariel 7ff7317779 Merge branch 'DRTVWR-521-maint' of https://bitbucket.org/lindenlab/viewer 2021-08-02 09:35:11 +02:00
Ansariel 9718a38e9a Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm 2021-07-21 03:07:48 +02:00
Andrey Lihatskiy 6c8e6f033b Merge branch 'master' into DRTVWR-521-maint
# Conflicts:
#	autobuild.xml
#	indra/llcommon/llerror.cpp
#	indra/llui/llnotifications.h
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewermacosx.cpp
2021-07-20 02:48:05 +03:00
Callum Prentice 8631a7a077 Merge with tip of Master after a Viewer release 2021-07-19 14:35:44 -07:00
Ansariel 9e415cdbb2 Merge branch 'DRTVWR-516-maint' of https://bitbucket.org/lindenlab/viewer 2021-05-25 11:03:48 +02:00
Nat Goodspeed 91c20363ee SL-10297: Get rid of LLError::LLCallStacks::allocateStackBuffer().
Also freeStackBuffer() and all the funky classic-C string management of a big
flat buffer divided into exactly 512 128-byte strings. Define StringVector as
a std::vector<std::string>, and use that instead.

Retain the behavior of clearing the vector if it exceeds 512 entries.

This eliminates the LLError::Log::flush(const std::ostringstream&, char*)
overload as well, with its baffling mix of std::string and classic-C (e.g.
strlen(out.str().c_str()).

If we absolutely MUST use a big memory pool for performance reasons, let's
use StringVector with allocators.
2021-05-12 13:37:24 -04:00
Nat Goodspeed 5b96ee0e10 SL-10297: Eliminate llerror.cpp's Globals::messageStream and bool.
Instead of a single std::ostringstream instance shared by all callers, even
those on different threads, make each of the relevant lllog_test_() and
llcallstacks macros instantiate independent (stack) std::ostringstream
objects. lllog_test_() is called by LL_DEBUGS(), LLINFOS(), LL_WARNS(),
LL_ERRS(), LL_VLOGS() et al.

Eliminate LLError::Log::out(), whose sole function was to arbitrate use of
that shared std::ostringstream. Amusingly, if the lock couldn't be locked or
if messageStreamInUse was set, out() would allocate a new (heap!)
std::ostringstream anyway, which would then have to be freed by flush().

Make both LLError::Log::flush() overloads accept const std::ostringstream&.
Make LL_ENDL pass the local _out instance. This eliminates the need to check
whether the passed std::ostringstream* references the shared instance and
(if so) reset it or (if not) delete it.

Make LLError::LLCallStacks::insert() accept the local _out instance as non-
const std::ostream&, rather than acquiring and returning std::ostringstream*.
Make end() accept the local instance as const std::ostringstream&.
2021-05-12 12:02:57 -04:00
Nat Goodspeed c9fc4349b7 SL-10297: Move LL_ERRS crash location into the LL_ERRS macro itself.
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-11 21:42:14 -04:00
Callum Prentice 168d177197 This set of changes reverts the merge with master (git revert c83e740) and results in a version of the DRTVWR-519 that matches what was presemt before it was deployed as a release viewer *plus* 3 small fixes from Maxim (See commits). This branch can now be used for additional fixes before eventually being used to release D-519 as normal 2021-03-09 14:39:51 -08:00
Andrey Lihatskiy 8d5f5b4ced Merge branch 'master' into DRTVWR-521-maint 2021-03-09 22:00:01 +02:00
Brad Payne (Vir Linden) c83e740ef9 Revert "Merge branch 'master' of https://bitbucket.org/lindenlab/viewer into DRTVWR-519"
This reverts commit e61f485a04, reversing
changes made to 00c47d079f.
2021-03-08 13:56:16 +00:00