Commit Graph

40429 Commits (bd008a170898e69beeb8bc0481b4bfd94de86c55)

Author SHA1 Message Date
Nat Goodspeed e241670694 increment viewer version to 6.3.2 2019-09-10 11:40:40 -04:00
Nat Goodspeed 4798dea988 Added tag 6.3.1-release for changeset ece699718f16 2019-09-10 11:40:39 -04:00
Oz Linden b74f698caa handle slvoice executable separately from the vivox libraries, and update mac slvoice package 2019-09-06 11:51:36 -04:00
AndreyL ProductEngine cd895d6e58 Merged in lindenlab/viewer-bear 2019-09-05 21:55:56 +03:00
AndreyL ProductEngine 05f1e3e713 Merged in lindenlab/viewer-lynx 2019-09-05 21:53:24 +03:00
andreykproductengine fe0b881acc SL-11718 Another exit crash 2019-09-05 15:13:56 +03:00
andreykproductengine e1451bb1d1 DRTVWR-493 Do not recreate proxy only to destroy it 2019-09-04 20:56:45 +03:00
andreykproductengine 27d391b2bb SL-11868 Fix cache init after purge 2019-09-04 19:20:52 +03:00
andreykproductengine a8bc48b334 SL-11866 [D493] Some startup elements can be executed twice, added protections 2019-09-04 17:30:50 +03:00
andreykproductengine 05dee4c10b SL-11865 Fixed weird existance check 2019-09-04 16:32:54 +03:00
AndreyL ProductEngine e8194e6aba SL-11856 Backed out SL-11012
changeset: 0d43d9754b79
2019-09-03 00:25:07 +03:00
andreykproductengine 23acff80c0 SL-11657 Further improvements 2019-08-29 22:15:54 +03:00
andreykproductengine e439f0366f Merge from lindenlab/viewer-release 2019-08-29 15:43:02 +03:00
Nat Goodspeed ff60e1049d Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2019-08-26 15:34:47 -04:00
AndreyL ProductEngine 1aedd96cd1 Merged in lindenlab/viewer-release 2019-08-26 22:21:30 +03:00
Nat Goodspeed 5986bf4826 increment viewer version to 6.3.1 2019-08-26 14:55:20 -04:00
Nat Goodspeed 3208ce1b7a Added tag 6.3.0-release for changeset 9777aec6dc4a 2019-08-26 14:55:19 -04:00
Nat Goodspeed 716c552f0b DRTVWR-476: Update to libndofdev build 530327 2019-08-22 20:01:50 -04:00
Nat Goodspeed 1d585c0c40 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2019-08-22 20:00:44 -04:00
Nat Goodspeed 834a1dbfbe Automated merge with ssh://bitbucket.org/lindenlab/viewer-vs2017 2019-08-22 20:00:21 -04:00
Nat Goodspeed d13b4d1803 Automated merge with ssh://bitbucket.org/andreykproductengine/drtvwr-493 2019-08-20 12:50:43 -04:00
Nat Goodspeed 5b5eb55f0c DRTVWR-493: Clarify capturing LLError::getFatalFunction() in a var.
VS 2013 thought we were storing an initialization-list.
2019-08-20 12:48:21 -04:00
Nat Goodspeed 54b98cb8c1 DRTVWR-493: Defend LL[Param]Singleton against ctor/init exceptions.
An exception in the LLSingleton subclass constructor, or in its
initSingleton() method, could leave the LLSingleton machinery in a bad state:
the failing instance would remain in the MasterList, also on the stack of
initializing LLSingletons. Catch exceptions in either and perform relevant
cleanup.

This problem is highlighted by test programs, in which LL_ERRS throws an
exception rather than crashing the whole process.

In the relevant catch clauses, clean up the initializing stack BEFORE logging.
Otherwise we get tangled up recording bogus dependencies.

Move capture_dependency() out of finishInitializing(): it must be called by
every valid getInstance() call, both from LLSingleton and LLParamSingleton.

Introduce new CONSTRUCTED EInitState value to distinguish "have called the
constructor but not yet the initSingleton() method" from "currently within
initSingleton() method." This is transient, but we execute the 'switch' on
state within that moment. One could argue that the previous enum used
INITIALIZING for current CONSTRUCTED, and INITIALIZED meant INITIALIZING too,
but this is clearer.

Introduce template LLSingletonBase::classname() helper methods to clarify
verbose demangle(typeid(stuff).name()) calls.

Similarly, introduce LLSingleton::pop_initializing() shorthand method.
2019-08-20 12:36:06 -04:00
Nat Goodspeed 310db14bee DRTVWR-493: Improve exception safety of LLSingleton initialization.
Add try/catch clauses to constructSingleton() (to catch exceptions in the
subclass constructor) and finishInitializing() (to catch exceptions in the
subclass initSingleton() method). Each of these catch clauses rethrows the
exception -- they're for cleanup, not for ultimate handling.

Introduce LLSingletonBase::reset_initializing(list_t::size_t). The idea is
that since we can't know whether the exception happened before or after the
push_initializing() call in LLSingletonBase's constructor, we can't just pop
the stack. Instead, constructSingleton() captures the stack size before
attempting to construct the new LLSingleton subclass. On exception, it calls
reset_initializing() to restore the stack to that size.

Naturally that requires a corresponding LLSingleton_manage_master method,
whose MasterList specialization is a no-op.

finishInitializing()'s exception handling is a bit simpler because it has a
constructed LLSingleton subclass instance in hand, therefore
push_initializing() has definitely been called, therefore it can call
pop_initializing().

Break out new static capture_dependency() method from finishInitializing()
because, in the previous LLSingleton::getInstance() implementation, the logic
now wrapped in capture_dependency() was reached even in the INITIALIZED case.
TODO: Add a new EInitState to differentiate "have been constructed, now
calling initSingleton()" from "fully initialized, normal case" -- in the
latter control path we should not be calling capture_dependency().

The LLSingleton_manage_master<LLSingletonBase::MasterList> specialization's
get_initializing() function (which called get_initializing_from()) was
potentially dangerous. get_initializing() is called by push_initializing(),
which (in the general case) is called by LLSingletonBase's constructor. If
somehow the MasterList's LLSingletonBase constructor ended up calling
get_initializing(), it would have called get_initializing_from(), passing an
LLSingletonBase which had not yet been constructed into the MasterList. In
particular, its mInitializing map would not yet have been initialized at all.

Since the MasterList must not, by design, depend on any other LLSingletons,
LLSingleton_manage_master<LLSingletonBase::MasterList>::get_initializing()
need not return a list from the official mInitializing map anyway. It can, and
should, and now does, return a static dummy list. That obviates
get_initializing_from(), which is removed.

That in turn means we no longer need to pass get_initializing() an
LLSingletonBase*. Remove that parameter.
2019-08-19 11:44:56 -04:00
Nat Goodspeed d10b06dc4f DRTVWR-493: When a test fails due to exception, display exception. 2019-08-19 10:00:09 -04:00
Brad Payne (Vir Linden) bd01474e23 SL-11662 - apparently a race condition between image loading and material property setting 2019-08-15 15:08:38 +01:00
Nat Goodspeed 0e6a6c7775 DRTVWR-493: Work around static initialization order problem.
LLParamSingleton contained a static member mutex. Unfortunately that wasn't
guaranteed to be initialized by the time its getInstance() was entered. Use a
function-local static instead.
2019-08-14 13:57:13 -04:00
Nat Goodspeed 63103afb65 No such thing as 'virtual static' 2019-08-14 13:43:08 -04:00
andreykproductengine be7713cab2 Merged in lindenlab/viewer-release 2019-08-14 15:02:56 +03:00
Brad Payne (Vir Linden) 15db923cae merge 2019-08-13 20:08:37 +01:00
AndreyL ProductEngine cdcdc4b3e3 Merged in lindenlab/viewer-bear 2019-08-13 21:59:37 +03:00
AndreyL ProductEngine 823cef92ed Merged in lindenlab/viewer-lynx 2019-08-13 21:58:10 +03:00
AndreyL ProductEngine ef423bfb81 Merged in lindenlab/viewer-release 2019-08-13 21:54:23 +03:00
andreykproductengine bc5d79e06e DRTVWR-493 Test fix for W64 2019-08-13 21:46:12 +03:00
andreykproductengine 82f259b133 DRTVWR-493 Converted LLViewerParcelMediaAutoPlay to singleton 2019-08-13 20:47:02 +03:00
andreykproductengine 24a0601a50 DRTVWR-493 Reworked a number of inits 2019-08-13 20:19:46 +03:00
Nat Goodspeed e9ead7cc2e increment viewer version to 6.2.5 2019-08-13 12:30:44 -04:00
Nat Goodspeed b04b741945 Added tag 6.2.4-release for changeset 67297f990285 2019-08-13 12:30:44 -04:00
andreykproductengine 1233842012 SL-11718 Crash in LLRender2D 2019-08-13 17:22:58 +03:00
Nat Goodspeed 5196af8663 DRTVWR-493: Rely on recursive_mutex to handle circularity
from LLParamSingleton::initSingleton().
2019-08-12 17:47:48 -04:00
Nat Goodspeed a5f58663c0 Automated merge with ssh://bitbucket.org/andreykproductengine/drtvwr-493 2019-08-12 17:43:09 -04:00
Nat Goodspeed 4fce6dc435 DRTVWR-493: Permit LLParamSingleton::initSingleton() circularity.
This was forbidden, but AndreyK points out cases in which LLParamSingleton::
initSingleton() should in fact be allowed to circle back to its own instance()
method. Use a recursive_mutex instead of plain mutex to permit that; remove
LL_ERRS preventing it.

Add LLParamSingleton::instance() method that calls
LLParamSingleton::getInstance(). Inheriting LLSingleton::instance() called
LLSingleton::getInstance() -- not at all what we want.

Add LLParamSingleton unit tests.
2019-08-12 17:35:45 -04:00
andreykproductengine 3c552696bf DRTVWR-493 LLWearableType to LLParamSingleton 2019-08-12 22:56:15 +03:00
andreykproductengine b6a3901c2f Merge from nat_linden/drtvwr-493 2019-08-12 20:35:27 +03:00
AndreyL ProductEngine d6030c7376 SL-11719 Initialize the conversation dialog on login screen appearance to avoid crash 2019-08-12 19:54:20 +03:00
Nat Goodspeed 5a72d34b76 Automated merge with file:///Users/nat/linden/viewer-catch 2019-08-12 09:58:08 -04:00
Nat Goodspeed 98be6e141c DRTVWR-493: Streamline LLParamSingleton, LLLockedSingleton.
Simplify LLSingleton::SingletonLifetimeManager to SingletonInitializer: that
struct has not been responsible for deletion ever since LLSingletonBase
acquired dependency-ordered deleteAll().

Move SingletonData::mInitState changes from SingletonLifetimeManager to
constructSingleton() method. Similarly, constructSingleton() now sets
SingletonData::mInstance instead of making its caller store the pointer.

Add variadic arguments to LLSingleton::constructSingleton() so we can reuse it
for LLParamSingleton.

Add finishInitializing() method to encapsulate logic reused for
getInstance()'s INITIALIZING and DELETED cases.

Make LLParamSingleton a subclass of LLSingleton, just as LLLockedSingleton is
a subclass of LLParamSingleton. Make LLParamSingleton a friend of LLSingleton,
so it can access private members of LLSingleton without also granting access
to any DERIVED_CLASS subclass. This eliminates the need for protected
getInitState().

LLParamSingleton::initParamSingleton() reuses LLSingleton::constructSingleton()
and finishInitializing(). Its getInstance() method completely replaces
LLSingleton::getInstance(): in most EInitStates, LLParamSingleton::getInstance()
is an error.

Use a std::mutex to serialize calls to LLParamSingleton::initParamSingleton()
and getInstance(). While LLSingleton::getInstance() relies on the "initialized
exactly once" guarantee for block-scope static declarations, LLParamSingleton
cannot rely on the same mechanism.

LLLockedSingleton is now a very succinct subclass of LLParamSingleton -- they
have very similar functionality.

Giving the LLSINGLETON() macro variadic arguments eliminates the need for a
separate LLPARAMSINGLETON() macro, while continuing to support existing usage.
2019-08-12 09:44:56 -04:00
Nat Goodspeed f0fa4f94a5 DRTVWR-493: Make catch_llerrs() a member of WrapLLErrs. 2019-08-12 08:26:51 -04:00
Nat Goodspeed 17902bc735 Automated merge with ssh://bitbucket.org/nat_linden/viewer-vs2017 2019-08-12 08:04:30 -04:00
andreykproductengine 1be08814e2 DRTVWR-493 tiny optimization 2019-08-11 12:50:24 +03:00