From 014dd037dde0a93f6c591618e4c111c6b598b60e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 20 Sep 2021 21:22:17 +0000 Subject: SL-16043 Fix DisableVerticalSync, default DisableVerticalSync to off, remove broken frame limiter code (use vsync if you want to limit framerate). --- indra/newview/llappviewer.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/newview/llappviewer.h') diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 0afb70958c..64e7caa36b 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -262,8 +262,6 @@ private: void sendLogoutRequest(); void disconnectViewer(); - bool onChangeFrameLimit(LLSD const & evt); - // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. static LLAppViewer* sInstance; @@ -319,10 +317,7 @@ private: // llcorehttp library init/shutdown helper LLAppCoreHttp mAppCoreHttp; - bool mIsFirstRun; - U64 mMinMicroSecPerFrame; // frame throttling - - + bool mIsFirstRun; }; // consts from viewer.h -- cgit v1.2.3 From cb85a4aaee714fee90a0f610532b9e6e0d2b7a10 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 30 Nov 2021 13:51:29 -0500 Subject: SL-16421: Unify LLAppViewer class declaration alignment. Use hard tabs as most of the class declaration already uses those. --- indra/newview/llappviewer.h | 88 ++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'indra/newview/llappviewer.h') diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 37119aeef9..d23a00be7f 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -67,13 +67,13 @@ public: LLAppViewer(); virtual ~LLAppViewer(); - /** - * @brief Access to the LLAppViewer singleton. - * - * The LLAppViewer singleton is created in main()/WinMain(). - * So don't use it in pre-entry (static initialization) code. - */ - static LLAppViewer* instance() {return sInstance; } + /** + * @brief Access to the LLAppViewer singleton. + * + * The LLAppViewer singleton is created in main()/WinMain(). + * So don't use it in pre-entry (static initialization) code. + */ + static LLAppViewer* instance() {return sInstance; } // // Main application logic @@ -91,12 +91,12 @@ public: void earlyExit(const std::string& name, const LLSD& substitutions = LLSD()); // Display an error dialog and forcibly quit. void earlyExitNoNotify(); // Do not display error dialog then forcibly quit. - void abortQuit(); // Called to abort a quit request. + void abortQuit(); // Called to abort a quit request. - bool quitRequested() { return mQuitRequested; } - bool logoutRequestSent() { return mLogoutRequestSent; } + bool quitRequested() { return mQuitRequested; } + bool logoutRequestSent() { return mLogoutRequestSent; } bool isSecondInstance() { return mSecondInstance; } - bool isUpdaterMissing() { return mUpdaterNotFound; } + bool isUpdaterMissing() { return mUpdaterNotFound; } void writeDebugInfo(bool isStatic=true); @@ -110,7 +110,7 @@ public: virtual bool restoreErrorTrap() = 0; // Require platform specific override to reset error handling mechanism. // return false if the error trap needed restoration. static void handleViewerCrash(); // Hey! The viewer crashed. Do this, soon. - void checkForCrash(); + void checkForCrash(); // Thread accessors static LLTextureCache* getTextureCache() { return sTextureCache; } @@ -121,37 +121,37 @@ public: static U32 getObjectCacheVersion() ; const std::string& getSerialNumber() { return mSerialNumber; } - + bool getPurgeCache() const { return mPurgeCache; } - + std::string getSecondLifeTitle() const; // The Second Life title. std::string getWindowTitle() const; // The window display name. - void forceDisconnect(const std::string& msg); // Force disconnection, with a message to the user. - void badNetworkHandler(); // Cause a crash state due to bad network packet. + void forceDisconnect(const std::string& msg); // Force disconnection, with a message to the user. + void badNetworkHandler(); // Cause a crash state due to bad network packet. bool hasSavedFinalSnapshot() { return mSavedFinalSnapshot; } void saveFinalSnapshot(); - void loadNameCache(); - void saveNameCache(); + void loadNameCache(); + void saveNameCache(); void loadExperienceCache(); void saveExperienceCache(); void removeMarkerFiles(); - + void removeDumpDir(); - // LLAppViewer testing helpers. - // *NOTE: These will potentially crash the viewer. Only for debugging. - virtual void forceErrorLLError(); - virtual void forceErrorBreakpoint(); - virtual void forceErrorBadMemoryAccess(); - virtual void forceErrorInfiniteLoop(); - virtual void forceErrorSoftwareException(); - virtual void forceErrorDriverCrash(); - virtual void forceErrorCoroutineCrash(); - virtual void forceErrorThreadCrash(); + // LLAppViewer testing helpers. + // *NOTE: These will potentially crash the viewer. Only for debugging. + virtual void forceErrorLLError(); + virtual void forceErrorBreakpoint(); + virtual void forceErrorBadMemoryAccess(); + virtual void forceErrorInfiniteLoop(); + virtual void forceErrorSoftwareException(); + virtual void forceErrorDriverCrash(); + virtual void forceErrorCoroutineCrash(); + virtual void forceErrorThreadCrash(); // The list is found in app_settings/settings_files.xml // but since they are used explicitly in code, @@ -184,7 +184,7 @@ public: // *NOTE:Mani Fix this for login abstraction!! void handleLoginComplete(); - LLAllocator & getAllocator() { return mAlloc; } + LLAllocator & getAllocator() { return mAlloc; } // On LoginCompleted callback typedef boost::signals2::signal login_completed_signal_t; @@ -199,7 +199,7 @@ public: S32 updateTextureThreads(F32 max_time); void loadKeyBindings(); - + // mute/unmute the system's master audio virtual void setMasterSystemAudioMute(bool mute); virtual bool getMasterSystemAudioMute(); @@ -211,7 +211,7 @@ public: // llcorehttp init/shutdown/config information. LLAppCoreHttp & getAppCoreHttp() { return mAppCoreHttp; } - void updateNameLookupUrl(const LLViewerRegion* regionp); + void updateNameLookupUrl(const LLViewerRegion* regionp); protected: virtual bool initWindow(); // Initialize the viewer's window. @@ -222,7 +222,7 @@ protected: virtual bool sendURLToOtherInstance(const std::string& url); virtual bool initParseCommandLine(LLCommandLineParser& clp) - { return true; } // Allow platforms to specify the command line args. + { return true; } // Allow platforms to specify the command line args. virtual std::string generateSerialNumber() = 0; // Platforms specific classes generate this. @@ -250,22 +250,22 @@ private: void processMarkerFiles(); static void recordMarkerVersion(LLAPRFile& marker_file); bool markerIsSameVersion(const std::string& marker_name) const; - - void idle(); - void idleShutdown(); + + void idle(); + void idleShutdown(); // update avatar SLID and display name caches void idleExperienceCache(); void idleNameCache(); - void idleNetwork(); + void idleNetwork(); - void sendLogoutRequest(); - void disconnectViewer(); + void sendLogoutRequest(); + void disconnectViewer(); // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. static LLAppViewer* sInstance; - bool mSecondInstance; // Is this a second instance of the app? + bool mSecondInstance; // Is this a second instance of the app? bool mUpdaterNotFound; // True when attempt to start updater failed std::string mMarkerFileName; @@ -296,8 +296,8 @@ private: boost::optional mForceGraphicsLevel; - bool mQuitRequested; // User wants to quit, may have modified documents open. - bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim. + bool mQuitRequested; // User wants to quit, may have modified documents open. + bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim. U32 mLastAgentControlFlags; F32 mLastAgentForceUpdate; struct SettingsFiles* mSettingsLocationList; @@ -311,12 +311,12 @@ private: bool mAgentRegionLastAlive; LLUUID mAgentRegionLastID; - LLAllocator mAlloc; + LLAllocator mAlloc; // llcorehttp library init/shutdown helper LLAppCoreHttp mAppCoreHttp; - bool mIsFirstRun; + bool mIsFirstRun; }; // consts from viewer.h -- cgit v1.2.3 From 01317a2faded53c79db7e0814426f1d8b2fd12fc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 30 Nov 2021 15:22:26 -0500 Subject: SL-16421: Destroy the "General" ThreadPool as soon as cleanup starts. Introduce LLAppViewer::onCleanup(), a method that accepts a nullary callable to execute once viewer shutdown begins. Fire the collected callables in LLAppViewer::cleanup(). In llstartup.cpp, instead of declaring a static unique_ptr and relying on static object destruction to clean up the "General" ThreadPool, bind the pointer to the new ThreadPool into an onCleanup() lambda that will delete it when called. ~ThreadPool() takes care of orderly shutdown. --- indra/newview/llappviewer.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.h') diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index d23a00be7f..f456cbbd36 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -49,6 +49,8 @@ #include "lltimer.h" #include "llappcorehttp.h" +#include + class LLCommandLineParser; class LLFrameTimer; class LLPumpIO; @@ -189,10 +191,20 @@ public: // On LoginCompleted callback typedef boost::signals2::signal login_completed_signal_t; login_completed_signal_t mOnLoginCompleted; - boost::signals2::connection setOnLoginCompletedCallback( const login_completed_signal_t::slot_type& cb ) { return mOnLoginCompleted.connect(cb); } + boost::signals2::connection setOnLoginCompletedCallback( const login_completed_signal_t::slot_type& cb ) + { + return mOnLoginCompleted.connect(cb); + } void addOnIdleCallback(const boost::function& cb); // add a callback to fire (once) when idle + typedef boost::signals2::signal cleanup_signal_t; + cleanup_signal_t mOnCleanup; + boost::signals2::connection onCleanup(const cleanup_signal_t::slot_type& cb) + { + return mOnCleanup.connect(cb); + } + void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; } void purgeCache(); // Clear the local cache. void purgeCacheImmediate(); //clear local cache immediately. -- cgit v1.2.3 From cf7bc4406e983b3779db0bffff8057b36702cf8d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 20 Apr 2022 23:15:04 +0300 Subject: SL-17159 Crash initializing LLInstanceTrackerPrivate --- indra/newview/llappviewer.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'indra/newview/llappviewer.h') diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index d807cf9765..a86fa7d873 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -63,6 +63,11 @@ class LLViewerJoystick; class LLPurgeDiskCacheThread; class LLViewerRegion; +namespace LL +{ + class ThreadPool; +} + extern LLTrace::BlockTimerStatHandle FTM_FRAME; class LLAppViewer : public LLApp @@ -201,13 +206,7 @@ public: void addOnIdleCallback(const boost::function& cb); // add a callback to fire (once) when idle - typedef boost::signals2::signal cleanup_signal_t; - cleanup_signal_t mOnCleanup; - boost::signals2::connection onCleanup(const cleanup_signal_t::slot_type& cb) - { - return mOnCleanup.connect(cb); - } - + void initGeneralThread(); void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; } void purgeCache(); // Clear the local cache. void purgeCacheImmediate(); //clear local cache immediately. @@ -269,7 +268,6 @@ private: void idle(); void idleShutdown(); // update avatar SLID and display name caches - void idleExperienceCache(); void idleNameCache(); void idleNetwork(); @@ -298,6 +296,7 @@ private: static LLImageDecodeThread* sImageDecodeThread; static LLTextureFetch* sTextureFetch; static LLPurgeDiskCacheThread* sPurgeDiskCacheThread; + LL::ThreadPool* mGeneralThreadPool; S32 mNumSessions; -- cgit v1.2.3