summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
AgeCommit message (Collapse)Author
2020-03-25SL-11216: Remove LLSingletonBase::cleanupAll().Nat Goodspeed
Remove call from LLAppViewer::cleanup(). Instead, make each LLSingleton<T>::deleteSingleton() call cleanupSingleton() just before destroying the instance. Since deleteSingleton() is not a destructor, it's fine to call cleanupSingleton() from there; and since deleteAll() calls deleteSingleton() on every remaining instance, the former cleanupAll() functionality has been subsumed into deleteAll(). Since cleanupSingleton() is now called at exactly one point in the instance's lifetime, we no longer need a bool indicating whether it has been called. The previous protocol of calling cleanupAll() before deleteAll() implemented a two-phase cleanup strategy for the application. That is no longer needed. Moreover, the cleanupAll() / deleteAll() sequence created a time window during which individual LLSingleton<T> instances weren't usable (to the extent that their cleanupSingleton() methods released essential resources) but still existed -- so a getInstance() call would return the crippled instance rather than recreating it. Remove cleanupAll() calls from tests; adjust to new order of expected side effects: instead of A::cleanupSingleton(), B::cleanupSingleton(), ~A(), ~B(), now we get A::cleanupSingleton(), ~A(), B::cleanupSingleton(), ~B().
2020-03-25DRTVWR-494: Defend LLInstanceTracker against multi-thread usage.Nat Goodspeed
The previous implementation went to some effort to crash if anyone attempted to create or destroy an LLInstanceTracker subclass instance during traversal. That restriction is manageable within a single thread, but becomes unworkable if it's possible that a given subclass might be used on more than one thread. Remove LLInstanceTracker::instance_iter, beginInstances(), endInstances(), also key_iter, beginKeys() and endKeys(). Instead, introduce key_snapshot() and instance_snapshot(), the only means of iterating over LLInstanceTracker instances. (These are intended to resemble functions, but in fact the current implementation simply presents the classes.) Iterating over a captured snapshot defends against container modifications during traversal. The term 'snapshot' reminds the coder that a new instance created during traversal will not be considered. To defend against instance deletion during traversal, a snapshot stores std::weak_ptrs which it lazily dereferences, skipping on the fly any that have expired. Dereferencing instance_snapshot::iterator gets you a reference rather than a pointer. Because some use cases want to delete all existing instances, add an instance_snapshot::deleteAll() method that extracts the pointer. Those cases used to require explicitly copying instance pointers into a separate container; instance_snapshot() now takes care of that. It remains the caller's responsibility to ensure that all instances of that LLInstanceTracker subclass were allocated on the heap. Replace unkeyed static LLInstanceTracker::getInstance(T*) -- which returned nullptr if that instance had been destroyed -- with new getWeak() method returning std::weak_ptr<T>. Caller must detect expiration of that weak_ptr. Adjust tests accordingly. Use of std::weak_ptr to detect expired instances requires engaging std::shared_ptr in the constructor. We now store shared_ptrs in the static containers (std::map for keyed, std::set for unkeyed). Make LLInstanceTrackerBase a template parameterized on the type of the static data it manages. For that reason, hoist static data class declarations out of the class definitions to an LLInstanceTrackerStuff namespace. Remove the static atomic sIterationNestDepth and its methods incrementDepth(), decrementDepth() and getDepth(), since they were used only to forbid creation and destruction during traversal. Add a std::mutex to static data. Introduce an internal LockStatic class that locks the mutex while providing a pointer to static data, making that the only way to access the static data. The LLINSTANCETRACKER_DTOR_NOEXCEPT macro goes away because we no longer expect ~LLInstanceTracker() to throw an exception in test programs. That affects LLTrace::StatBase as well as LLInstanceTracker itself. Adapt consumers to the new LLInstanceTracker API.
2020-03-10DRTVWR-440 Add compile switch SHADER_CRASH_NONFATAL to prevent app exit on ↵Dave Houlton
shader failure
2020-02-10SL-12660 Hide top level domain namemaxim_productengine
2020-02-06Merge branch 'master' into DRTVWR-497Andrey Lihatskiy
2020-02-05SL-12660 Hide top level domain name and IP address for simulatorsMnikolenko Productengine
2020-02-03Merge branch 'DRTVWR-501' into trunkAndrey Lihatskiy
2020-02-03Merge branch 'DRTVWR-500' into DRTVWR-501Andrey Lihatskiy
2020-02-03Merge branch 'DRTVWR-499' into DRTVWR-500Andrey Lihatskiy
2020-01-28DRTVWR-440, merge in latest from 6.3.7 releaseDave Houlton
2020-01-07SL-12486 Better data deletionandreykproductengine
2020-01-06Merged in viewer-releaseAndreyL ProductEngine
2019-12-16Merge viewer-release 6.3.6 into viewwer-eep repoDave Houlton
2019-12-06SL-12198 Log source of quit commandandreykproductengine
2019-11-27Upstream merge from viewer-nekoAndreyL ProductEngine
2019-11-27Downstream merge from lindenlab/viewer-lynxAndreyL ProductEngine
2019-11-15SL-11898 Hi-res snapshots do not support UI and HUDs and should not show themandreykproductengine
2019-11-14Fix merge-related unitialized ptr deref crash on loginDave Houlton
2019-11-13Merge in from viewer-release 6.3.5Dave Houlton
2019-11-12Downstream merge from 494-maint-wassailAndreyL ProductEngine
2019-11-12Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-11-04SL-6109andreykproductengine
- Fixed defaults not restoring reliably - Fixed temporary changes not lifting reliably - Fixed switching modes was dropping changes to mode we switch to
2019-10-23MAC build fixandreykproductengine
2019-10-23SL-11727 Fix build warningsandreykproductengine
2019-10-23SL-12164 crash on userQuitandreykproductengine
2019-10-22SL-12168 FIXED crash on exit, if resetting camera was performedMnikolenko Productengine
2019-10-21SL-12164 attempt to close viewer on window init resulted in crashandreykproductengine
2019-10-16mergeBrad Payne (Vir Linden)
2019-10-15Merge from viewer-releaseandreykproductengine
2019-10-03SL-6109 Remade 'ignore' list processing, renamed and reformed keybindingsandreykproductengine
2019-09-30SL-8191 RenderUseVAO with Basic Shaders turned off caused textures not to showruslantproductengine
- Disable VAO for fixed pipeline + UI
2019-09-27SL-6109 Small reorganisationandreykproductengine
2019-09-26SL-6109 Conflict resolutionandreykproductengine
2019-09-25when using bugsplat, do not catch SIGABRT; also, fix signal setting in Mac ↵Oz Linden
(broken macro)
2019-09-25SL-6109 Mouse support readyandreykproductengine
2019-09-24improve fatal hook loggingOz Linden
2019-09-10Merge viewer-release 6.3.2Graham Linden
2019-09-10Merged in lindenlab/viewer-releaseandreykproductengine
2019-09-05SL-11315 Viewer asks to play media and retains selected choiceandreykproductengine
2019-09-04SL-11868 Fix cache init after purgeandreykproductengine
2019-08-13DRTVWR-493 Reworked a number of initsandreykproductengine
2019-08-12DRTVWR-493 LLWearableType to LLParamSingletonandreykproductengine
2019-08-10DRTVWR-493 LLUI to LLParamSingletonandreykproductengine
2019-08-10SL-11716 Fixed crash on initializing LLUIAndreyL ProductEngine
2019-07-25DRTVWR-493 LLRender2D to LLParamSingletonandreykproductengine
2019-07-25DRTVWR-493 LLImage to LLParamSingletonandreykproductengine
2019-07-11DRTVWR-493 Cleanup LLSkinningUtilandreykproductengine
2019-07-04DRTVWR-493 Cleaned up unneded inits.andreykproductengine
2019-07-03DRTVWR-493 LLAvatarNameCache to singletoneandreykproductengine
2019-07-01SL-1566 Fixed watchdog killer event line missing from crash logandreykproductengine