Commit Graph

1673 Commits (f729cfc33f258781c5fd85a3d8773bf6149d12db)

Author SHA1 Message Date
Bennett Goble f729cfc33f SL-15742: Convert build scripts to Python 3
This changeset makes it possible to build the Second Life viewer using
Python 3. It is designed to be used with an equivalent Autobuild branch
so that a developer can compile without needing Python 2 on their
machine.

Breaking change: Python 2 support ending

Rather than supporting two versions of Python, including one that was
discontinued at the beginning of the year, this branch focuses on
pouring future effort into Python 3 only. As a result, scripts do not
need to be backwards compatible. This means that build environments,
be they on personal computers and on build agents, need to have a
compatible interpreter.

Notes

- SLVersionChecker will still use Python 2 on macOS
- Fixed the message template url used by template_verifier.py
2021-12-10 14:42:49 -08:00
Mnikolenko ProductEngine 8c7db0ad6c SL-15902 Cleanup gSecAPIHandler 2021-09-03 22:21:29 +03:00
Andrey Lihatskiy 97f09de4fc Merge branch 'master' into DRTVWR-520-apple-notarization
# Conflicts:
#	autobuild.xml
#	build.sh
#	indra/CMakeLists.txt
#	indra/newview/CMakeLists.txt
#	indra/newview/llappviewermacosx.cpp
#	indra/newview/llappviewerwin32.h
#	indra/newview/viewer_manifest.py
#	indra/win_crash_logger/llcrashloggerwindows.cpp
2021-08-12 23:13:12 +03:00
Andrey Lihatskiy 3d92a7dfe2 Merge branch 'master' into DRTVWR-520-apple-notarization 2021-06-25 01:02:29 +03:00
Andrey Lihatskiy a4c6c7059f Merge branch 'master' into DRTVWR-516-maint
# Conflicts:
#	indra/newview/app_settings/settings.xml
#	indra/newview/llvoicevivox.cpp
2021-06-25 00:51:02 +03:00
Andrey Lihatskiy fa8f186213 Merge branch 'master' into DRTVWR-520-apple-notarization 2021-06-07 21:03:36 +03:00
Andrey Lihatskiy e7319fb671 Merge branch 'master' into DRTVWR-518-ui 2021-06-07 21:03:27 +03:00
Andrey Lihatskiy fef6c1f51e Merge branch 'master' into DRTVWR-516-maint 2021-06-07 20:54:41 +03:00
Andrey Lihatskiy 2922c59316 Merge branch 'sl-10297' into DRTVWR-516-maint 2021-05-21 20:31:53 +03:00
Nat Goodspeed 28862ab53b SL-10297: Clean up a few merge glitches. 2021-05-12 14:21:27 -04:00
Nat Goodspeed fd1545197a SL-10297: Merge branch 'sl-10297-oz' into sl-10297.
Bring in Oz's tweaks to the way BugSplat is engaged and tested, plus a few
other miscellaneous goodies.
2021-05-12 13:56:19 -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
Andrey Kleshchev cfb6ca569b SL-15168 Viewer side functionality for guidebook window opening 2021-05-06 02:46:42 +03:00
Andrey Lihatskiy 789be6b933 Merge branch 'master' into DRTVWR-520-apple-notarization 2021-04-30 03:05:19 +03:00
Andrey Kleshchev 3f31901640 Merge master (DRTVWR-515) into DRTVWR-516-maint
# Conflicts:
#	autobuild.xml
#	doc/contributions.txt
#	indra/llcommon/llcoros.cpp
#	indra/llmessage/llcoproceduremanager.cpp
#	indra/newview/llfloaterfixedenvironment.cpp
#	indra/newview/llfloaterimsessiontab.cpp
2021-04-29 21:00:25 +03:00
Dave Houlton 2386125ae0 Merge master into DV525-merge-6.4.19 2021-04-29 11:40:22 -06:00
Andrey Kleshchev 4a99fe56d9 SL-14914 New release viewer install updated to RC unexpectedly
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-15 17:35:43 +03:00
Dave Houlton 3cad30d9ee Merge branch 'master' into DV525-merge-6.4.18 2021-04-01 14:49:07 -06:00
Andrey Lihatskiy 347126a644 Merge branch 'master' into DRTVWR-520-apple-notarization
# Conflicts:
#	autobuild.xml
2021-04-01 20:48:19 +03:00
Andrey Lihatskiy 9fe758e8bc Merge branch 'master' into DRTVWR-516-maint 2021-04-01 20:45:16 +03:00
Andrey Lihatskiy 6240168f24 Merge branch 'master' into DRTVWR-515-maint 2021-04-01 20:45:06 +03:00
Andrey Kleshchev 022ff98193 SL-14990 ig75icd64 and other intel crashes
Obsolete driver detection
2021-03-31 09:25:27 +03:00
Andrey Kleshchev c0f28ae362 SL-14927 Some avatar names not resolving 2021-03-18 23:01:04 +02:00
Andrey Kleshchev 6b73a8331f SL-14541 removed breakpad, win_crash_logger, updated zlib 2021-03-17 00:19:38 +02:00
Andrey Kleshchev ed98ebb811 SL-14961 Coroutine crash was not reported to bugsplat 2021-03-13 11:21:01 +02:00
Andrey Kleshchev 4076208a72 SL-14961 Bugsplat logging 2021-03-12 00:25:53 +02:00
Dave Houlton 303feae305 Merge branch 'master' v6.4.17 into DRTVWR-525 2021-03-10 09:34:16 -07:00
Andrey Lihatskiy 9a36df5763 Merge branch 'master' into DRTVWR-514-keymappings 2021-03-09 21:59:14 +02:00
Andrey Lihatskiy bb17e4b78e Merge branch 'master' into DRTVWR-515-maint 2021-03-09 21:56:14 +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
Dave Houlton 363bc9d9d0 Merge branch 'master' v 6.4.15 into DRTVWR-525 2021-03-02 14:25:36 -07:00
Andrey Lihatskiy 35550e36db Merge branch 'master' into DRTVWR-515-maint 2021-03-02 21:41:26 +02:00
Andrey Lihatskiy f271ba3277 Merge branch 'master' into DRTVWR-514-keymappings 2021-03-02 21:41:13 +02:00
Callum Prentice d26567915c Merge with Master after Viewer release 2021-02-03 09:31:32 -08:00
Dave Houlton f07b332ef0 Merge branch 'master' into DV525-merge-6.4.13 2021-02-01 15:59:08 -07:00
Andrey Kleshchev 44b6459dfa Merge branch 'master' into DRTVWR-514-keymappings
# Conflicts:
#	indra/llui/llscrolllistctrl.cpp
2021-02-01 23:33:41 +02:00
Andrey Kleshchev 609a26b59a Merge branch 'master' of https://bitbucket.org/lindenlab/viewer/src/master 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-01 22:28:15 +02:00
Mnikolenko Productengine 9fc3014435 SL-14422 Crash at LLSceneMonitor::dumpToFile 2021-01-27 18:32:41 +02:00
Andrey Kleshchev 4ba1ea1a65 SL-14283 Don't crash viewer, only show a notification 2021-01-15 00:58:51 +02:00
Andrey Kleshchev fa710f3a9e SL-14283 When updater is missing, viewer fails to launch silently 2021-01-14 23:49:19 +02:00
Andrey Kleshchev 47bd603ceb SL-13733 One more vivox shutdown crash
Vivox was using dead pump
2020-11-25 18:09:54 +02:00
Andrey Kleshchev f534e37328 SL-14368 Expanding the 'People' floater to the right does not expand the displayed values 2020-11-21 00:06:47 +02:00
Mnikolenko Productengine dd887e24d5 SL-14342 FIXED Crash: "Uninitialized param singleton LLVoiceClient" 2020-11-17 14:15:06 +02:00
Andrey Lihatskiy 0bba892bb0 Merge branch 'master' into DRTVWR-515-maint
# Conflicts:
#	indra/newview/llfloatereditextdaycycle.cpp
#	indra/newview/llfloaterfixedenvironment.cpp
2020-11-13 18:22:43 +02:00
Mnikolenko Productengine 2d84f8f6c8 SL-14312 Show simulator host names for AWS hosted regions 2020-11-13 15:45:39 +02:00
Dave Houlton 21e2f3e974 Merge branch 'master' 6.4.12 into DRTVWR-510 2020-11-11 15:43:06 -07:00
Callum Prentice 9b1d9150c2 Merge branch 'master' into DRTVWR-519 2020-11-11 13:22:35 -08:00
Andrey Kleshchev 74c3b7a0ee Merged master (DRTVWR-507) into DRTVWR-514-keymappings 2020-11-11 22:16:04 +02:00
Andrey Lihatskiy 0303dd8179 Merge branch 'master' into DRTVWR-513-maint
# Conflicts:
#	autobuild.xml
#	indra/llui/llfolderviewmodel.h
#	indra/newview/lltexturecache.cpp
#	indra/newview/llviewermenu.h
#	indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
2020-11-11 22:14:24 +02:00
Andrey Kleshchev 6154e72d94 reverted part of SL-10625 since it is now obsolete
see SL-13565
2020-11-11 20:38:24 +02:00