Commit Graph

39866 Commits (05dee4c10b248dfd646bde8dcf9e7c68709adc4d)

Author SHA1 Message Date
andreykproductengine 05dee4c10b SL-11865 Fixed weird existance check 2019-09-04 16:32:54 +03:00
andreykproductengine e439f0366f Merge from lindenlab/viewer-release 2019-08-29 15:43:02 +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 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
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
Nat Goodspeed adb3f447b3 DRTVWR-493: Introduce test catch_what(), catch_llerrs() functions.
Use them in place of awkward try/catch test boilerplate.
2019-08-10 20:33:59 -04:00
andreykproductengine c61d0f4297 DRTVWR-493 LLUI to LLParamSingleton 2019-08-10 15:31:03 +03:00
andreykproductengine 34d8200d0f DRTVWR-493 LLRender2D init cleanup 2019-08-10 09:01:54 +03:00
AndreyL ProductEngine c2660070ce SL-11716 Fixed crash on initializing LLUI 2019-08-10 03:09:30 +03:00
andreykproductengine adeee613c6 DRTVWR-493 LLRender2D to LLParamSingleton 2019-07-25 18:20:17 +03:00
maxim_productengine cb49f2a795 SL-11649 FIXED [Love Me Render] Mesh links in HUDs do not have highlights when selected. 2019-07-25 16:28:11 +03:00
andreykproductengine 17fae30f72 DRTVWR-493 LLImage to LLParamSingleton 2019-07-25 15:17:11 +03:00
Brad Payne (Vir Linden) 7d309ed5d7 no-op change to force build and build number update 2019-07-24 21:30:28 +01:00
andreykproductengine aa1dd6bb7b SL-11597 Fix crash on dead object 2019-07-16 18:31:58 +03:00
maxim_productengine 68b69714b7 SL-11528 FIXED Object Profile > Details does not show magenta highlight for mesh objects 2019-07-15 18:01:26 +03:00
Ruslan Teliuk 3c0469cbbd Merged in ruslantproductengine/viewer-cougar-4cr-5 (pull request #59)
SL-11435 When ALM is enabled, Depth mode shots are broken when snapshot size is set to anything above current window size

Approved-by: Simon Linden <simon@lindenlab.com>
Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com>
2019-07-12 14:21:04 +00:00
ruslantproductengine 9c966e51da SL-11435 When ALM is enabled, Depth mode shots are broken when snapshot size is set to anything above current window size
- fixed bug described in the ticket
- fixed bug with UI (when user change the layer type (color/depth))
2019-07-11 20:30:30 +03:00
andreykproductengine 8df0583db0 DRTVWR-493 Cleanup LLSkinningUtil 2019-07-11 16:25:24 +03:00
Anchor 417a2d43f3 [SL-11548] - checked in the commented code by mistake 2019-07-10 00:47:58 -07:00
Anchor 72ed28efed [SL-11548] - don't treat the local avatar bakes as alpha masks 2019-07-10 00:46:17 -07:00
andreykproductengine 47cbcb61f8 DRTVWR-493 Cleaned up unneded inits. 2019-07-04 20:24:38 +03:00
andreykproductengine 56715de2cf DRTVWR-493 LLUrlWhiteList to LLSingleton 2019-07-04 18:07:46 +03:00
maxim_productengine f69db2616b SL-11534 FIXED Animated mesh objects aren't highlighted when viewing objects owned by users in the 'About Land' floater 2019-07-04 14:59:43 +03:00
andreykproductengine 779b5627c5 DRTVWR-493 LLAvatarNameCache to singletone 2019-07-03 20:06:47 +03:00