From 562fe5bf6345fe79f91c657f4d1a30bfc07fbb34 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 27 May 2019 17:32:53 +0300 Subject: SL-10908 Output class names we are clearing on startup --- indra/newview/llstartup.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 0d99b35aee..9397356d40 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -348,6 +348,14 @@ bool idle_startup() // to work. gIdleCallbacks.callFunctions(); gViewerWindow->updateUI(); + + // There is a crash on updateClass, this is an attempt to get more information + if (LLMortician::graveyardCount()) + { + std::stringstream log_stream; + LLMortician::logClass(log_stream); + LL_INFOS() << log_stream.str() << LL_ENDL; + } LLMortician::updateClass(); const std::string delims (" "); -- cgit v1.2.3 From d081df14ef4c19395b6c0f6e826764d91d4e034f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 29 May 2019 19:28:52 +0300 Subject: SL-11309 Crash on attempt to costruct singletone --- indra/newview/llstartup.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9397356d40..e9d3cfa993 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -162,6 +162,7 @@ #include "llviewerparcelmgr.h" #include "llviewerregion.h" #include "llviewerstats.h" +#include "llviewerstatsrecorder.h" #include "llviewerthrottle.h" #include "llviewerwindow.h" #include "llvoavatar.h" @@ -1228,6 +1229,7 @@ bool idle_startup() // // Initialize classes w/graphics stuff. // + LLViewerStatsRecorder::instance(); // Since textures work in threads gTextureList.doPrefetchImages(); display_startup(); -- cgit v1.2.3 From 19221d9ccf38a5b10e7e2ecefb1ad121f1fb51d7 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 12 Jun 2019 16:17:37 +0300 Subject: SL-11402 Save last session image per grid --- indra/newview/llstartup.cpp | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index e9d3cfa993..e34a9beb49 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -210,8 +210,8 @@ bool gAgentMovementCompleted = false; S32 gMaxAgentGroups; -std::string SCREEN_HOME_FILENAME = "screen_home.bmp"; -std::string SCREEN_LAST_FILENAME = "screen_last.bmp"; +const std::string SCREEN_HOME_FILENAME = "screen_home%s.bmp"; +const std::string SCREEN_LAST_FILENAME = "screen_last%s.bmp"; LLPointer gStartTexture; @@ -2577,6 +2577,34 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response) return false; } +std::string get_screen_filename(const std::string& pattern) +{ + if (LLGridManager::getInstance()->isInProductionGrid()) + { + return llformat(pattern.c_str(), ""); + } + else + { + const std::string& grid_id_str = LLGridManager::getInstance()->getGridId(); + const std::string& grid_id_lower = utf8str_tolower(grid_id_str); + std::string grid = "." + grid_id_lower; + return llformat(pattern.c_str(), grid.c_str()); + } +} + +//static +std::string LLStartUp::getScreenLastFilename() +{ + return get_screen_filename(SCREEN_LAST_FILENAME); +} + +//static +std::string LLStartUp::getScreenHomeFilename() +{ + return get_screen_filename(SCREEN_HOME_FILENAME); +} + +//static void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ) { @@ -2674,11 +2702,11 @@ void init_start_screen(S32 location_id) if ((S32)START_LOCATION_ID_LAST == location_id) { - temp_str += SCREEN_LAST_FILENAME; + temp_str += LLStartUp::getScreenLastFilename(); } else { - temp_str += SCREEN_HOME_FILENAME; + temp_str += LLStartUp::getScreenHomeFilename(); } LLPointer start_image_bmp = new LLImageBMP; -- cgit v1.2.3 From 04e67fa12d1dac368e2f88a04af4cd266b8b2063 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 12 Jun 2019 19:12:09 +0300 Subject: SL-11402 Last session image should be saved as png --- indra/newview/llstartup.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index e34a9beb49..256ece594c 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -113,7 +113,7 @@ #include "llgroupmgr.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" -#include "llimagebmp.h" +#include "llimagepng.h" #include "llinventorybridge.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" @@ -210,8 +210,8 @@ bool gAgentMovementCompleted = false; S32 gMaxAgentGroups; -const std::string SCREEN_HOME_FILENAME = "screen_home%s.bmp"; -const std::string SCREEN_LAST_FILENAME = "screen_last%s.bmp"; +const std::string SCREEN_HOME_FILENAME = "screen_home%s.png"; +const std::string SCREEN_LAST_FILENAME = "screen_last%s.png"; LLPointer gStartTexture; @@ -2709,7 +2709,7 @@ void init_start_screen(S32 location_id) temp_str += LLStartUp::getScreenHomeFilename(); } - LLPointer start_image_bmp = new LLImageBMP; + LLPointer start_image_png = new LLImagePNG; // Turn off start screen to get around the occasional readback // driver bug @@ -2718,18 +2718,18 @@ void init_start_screen(S32 location_id) LL_INFOS("AppInit") << "Bitmap load disabled" << LL_ENDL; return; } - else if(!start_image_bmp->load(temp_str) ) + else if(!start_image_png->load(temp_str) ) { LL_WARNS("AppInit") << "Bitmap load failed" << LL_ENDL; gStartTexture = NULL; } else { - gStartImageWidth = start_image_bmp->getWidth(); - gStartImageHeight = start_image_bmp->getHeight(); + gStartImageWidth = start_image_png->getWidth(); + gStartImageHeight = start_image_png->getHeight(); LLPointer raw = new LLImageRaw; - if (!start_image_bmp->decode(raw, 0.0f)) + if (!start_image_png->decode(raw, 0.0f)) { LL_WARNS("AppInit") << "Bitmap decode failed" << LL_ENDL; gStartTexture = NULL; -- cgit v1.2.3 From 31a22910c1df637970b66e91b0fd1dc5975aa33c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 13 Jun 2019 17:35:15 +0300 Subject: SL-11402 Fallback for home image --- indra/newview/llstartup.cpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 256ece594c..6e0a36be49 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -113,7 +113,7 @@ #include "llgroupmgr.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" -#include "llimagepng.h" +#include "llimage.h" #include "llinventorybridge.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" @@ -2698,6 +2698,7 @@ void init_start_screen(S32 location_id) LL_DEBUGS("AppInit") << "Loading startup bitmap..." << LL_ENDL; + U8 image_codec = IMG_CODEC_PNG; std::string temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter(); if ((S32)START_LOCATION_ID_LAST == location_id) @@ -2706,11 +2707,23 @@ void init_start_screen(S32 location_id) } else { - temp_str += LLStartUp::getScreenHomeFilename(); + std::string path = temp_str + LLStartUp::getScreenHomeFilename(); + + if (!gDirUtilp->fileExists(path) && LLGridManager::getInstance()->isInProductionGrid()) + { + // Fallback to old file, can be removed later + // Home image only sets when user changes home, so it will take time for users to switch to pngs + temp_str += "screen_home.bmp"; + image_codec = IMG_CODEC_BMP; + } + else + { + temp_str = path; + } } - LLPointer start_image_png = new LLImagePNG; - + LLPointer start_image_frmted = LLImageFormatted::createFromType(image_codec); + // Turn off start screen to get around the occasional readback // driver bug if(!gSavedSettings.getBOOL("UseStartScreen")) @@ -2718,18 +2731,18 @@ void init_start_screen(S32 location_id) LL_INFOS("AppInit") << "Bitmap load disabled" << LL_ENDL; return; } - else if(!start_image_png->load(temp_str) ) + else if(!start_image_frmted->load(temp_str) ) { LL_WARNS("AppInit") << "Bitmap load failed" << LL_ENDL; gStartTexture = NULL; } else { - gStartImageWidth = start_image_png->getWidth(); - gStartImageHeight = start_image_png->getHeight(); + gStartImageWidth = start_image_frmted->getWidth(); + gStartImageHeight = start_image_frmted->getHeight(); LLPointer raw = new LLImageRaw; - if (!start_image_png->decode(raw, 0.0f)) + if (!start_image_frmted->decode(raw, 0.0f)) { LL_WARNS("AppInit") << "Bitmap decode failed" << LL_ENDL; gStartTexture = NULL; -- cgit v1.2.3 From 8369276a4967185985cb5957b22cda6897e2df29 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 21 Jun 2019 20:55:39 +0300 Subject: DRTVWR-493 LLViewerMedia to singleton --- indra/newview/llstartup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 0d99b35aee..d3be7c64f8 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3543,7 +3543,7 @@ bool process_login_success_response() if(!openid_url.empty()) { std::string openid_token = response["openid_token"]; - LLViewerMedia::openIDSetup(openid_url, openid_token); + LLViewerMedia::getInstance()->openIDSetup(openid_url, openid_token); } gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS; -- cgit v1.2.3 From 30cc3ff01f39952b6138fad4095ea032d4b832a4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 21 Jun 2019 21:31:40 +0300 Subject: DRTVWR-493 LLViewerParcelMedia to singleton --- indra/newview/llstartup.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d3be7c64f8..8be453ad6c 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2806,9 +2806,6 @@ void LLStartUp::multimediaInit() std::string msg = LLTrans::getString("LoginInitializingMultimedia"); set_startup_status(0.42f, msg.c_str(), gAgent.mMOTD.c_str()); display_startup(); - - // LLViewerMedia::initClass(); - LLViewerParcelMedia::initClass(); } void LLStartUp::fontInit() -- cgit v1.2.3 From 779b5627c5e9c76a06938cd4e73a5b8f0440cabc Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 3 Jul 2019 20:06:47 +0300 Subject: DRTVWR-493 LLAvatarNameCache to singletone --- indra/newview/llstartup.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8be453ad6c..15b3ba75c9 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2833,9 +2833,10 @@ void LLStartUp::initNameCache() // Start cache in not-running state until we figure out if we have // capabilities for display name lookup - LLAvatarNameCache::initClass(false,gSavedSettings.getBOOL("UsePeopleAPI")); - LLAvatarNameCache::setUseDisplayNames(gSavedSettings.getBOOL("UseDisplayNames")); - LLAvatarNameCache::setUseUsernames(gSavedSettings.getBOOL("NameTagShowUsernames")); + LLAvatarNameCache* cache_inst = LLAvatarNameCache::getInstance(); + cache_inst->setUsePeopleAPI(gSavedSettings.getBOOL("UsePeopleAPI")); + cache_inst->setUseDisplayNames(gSavedSettings.getBOOL("UseDisplayNames")); + cache_inst->setUseUsernames(gSavedSettings.getBOOL("NameTagShowUsernames")); } @@ -2850,8 +2851,6 @@ void LLStartUp::initExperiences() void LLStartUp::cleanupNameCache() { - SUBSYSTEM_CLEANUP(LLAvatarNameCache); - delete gCacheName; gCacheName = NULL; } -- cgit v1.2.3 From 47cbcb61f8b7cbfb0f14043118c4e50b100d0068 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 4 Jul 2019 20:24:38 +0300 Subject: DRTVWR-493 Cleaned up unneded inits. --- indra/newview/llstartup.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 15b3ba75c9..7f9f0da315 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1226,8 +1226,6 @@ bool idle_startup() LLSurface::initClasses(); display_startup(); - - LLFace::initClass(); display_startup(); LLDrawable::initClass(); -- cgit v1.2.3 From 17fae30f721c716bab1dd78cc5f8ac6b0aad49e0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 25 Jul 2019 15:17:11 +0300 Subject: DRTVWR-493 LLImage to LLParamSingleton --- indra/newview/llstartup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7f9f0da315..82e1d6be4a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1289,7 +1289,7 @@ bool idle_startup() display_startup(); LLStartUp::setStartupState( STATE_MULTIMEDIA_INIT ); - LLConversationLog::getInstance(); + LLConversationLog::initParamSingleton(); return FALSE; } -- cgit v1.2.3 From d6030c7376b930d0bfc40c29ec9888e3db851c06 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 12 Aug 2019 19:54:20 +0300 Subject: SL-11719 Initialize the conversation dialog on login screen appearance to avoid crash --- indra/newview/llstartup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 82e1d6be4a..e4cabbaddd 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -806,6 +806,8 @@ bool idle_startup() gLoginMenuBarView->setEnabled( TRUE ); show_debug_menus(); + LLConversationLog::initParamSingleton(); + // Hide the splash screen LLSplashScreen::hide(); // Push our window frontmost @@ -1288,8 +1290,6 @@ bool idle_startup() display_startup(); LLStartUp::setStartupState( STATE_MULTIMEDIA_INIT ); - - LLConversationLog::initParamSingleton(); return FALSE; } -- cgit v1.2.3 From 24a0601a50f81b8f1a21c2c64c118702dd93f645 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 13 Aug 2019 20:19:46 +0300 Subject: DRTVWR-493 Reworked a number of inits --- indra/newview/llstartup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index e4cabbaddd..d7b8080efd 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -895,8 +895,8 @@ bool idle_startup() LLFile::mkdir(gDirUtilp->getLindenUserDir()); // As soon as directories are ready initialize notification storages - LLPersistentNotificationStorage::getInstance()->initialize(); - LLDoNotDisturbNotificationStorage::getInstance()->initialize(); + LLPersistentNotificationStorage::initParamSingleton(); + LLDoNotDisturbNotificationStorage::initParamSingleton(); // Set PerAccountSettingsFile to the default value. gSavedSettings.setString("PerAccountSettingsFile", -- cgit v1.2.3 From a8bc48b334428ab0d809c93d3d70b8a84df6723e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 4 Sep 2019 17:30:50 +0300 Subject: SL-11866 [D493] Some startup elements can be executed twice, added protections --- indra/newview/llstartup.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d7b8080efd..5e9ad1cbce 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -806,7 +806,11 @@ bool idle_startup() gLoginMenuBarView->setEnabled( TRUE ); show_debug_menus(); - LLConversationLog::initParamSingleton(); + if (!LLConversationLog::instanceExists()) + { + // Check existance since this part can be reached twice if login fails + LLConversationLog::initParamSingleton(); + } // Hide the splash screen LLSplashScreen::hide(); @@ -895,8 +899,13 @@ bool idle_startup() LLFile::mkdir(gDirUtilp->getLindenUserDir()); // As soon as directories are ready initialize notification storages - LLPersistentNotificationStorage::initParamSingleton(); - LLDoNotDisturbNotificationStorage::initParamSingleton(); + if (!LLPersistentNotificationStorage::instanceExists()) + { + // check existance since this part of code can be reached + // twice due to login failures + LLPersistentNotificationStorage::initParamSingleton(); + LLDoNotDisturbNotificationStorage::initParamSingleton(); + } // Set PerAccountSettingsFile to the default value. gSavedSettings.setString("PerAccountSettingsFile", -- cgit v1.2.3 From 5ce0d6268b4750fb376c293d566736052185f638 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 10 Oct 2019 16:35:11 +0300 Subject: SL-12093 FIXED [ordered shutdown] conversation.log erased at log in when all logs are set to be saved --- indra/newview/llstartup.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 5e9ad1cbce..6cbd83d656 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -806,12 +806,6 @@ bool idle_startup() gLoginMenuBarView->setEnabled( TRUE ); show_debug_menus(); - if (!LLConversationLog::instanceExists()) - { - // Check existance since this part can be reached twice if login fails - LLConversationLog::initParamSingleton(); - } - // Hide the splash screen LLSplashScreen::hide(); // Push our window frontmost @@ -948,6 +942,12 @@ bool idle_startup() LLFile::mkdir(gDirUtilp->getChatLogsDir()); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); + //Initialize conversation log only when chat log directories are ready + if (!LLConversationLog::instanceExists()) + { + // Check existance since this part can be reached twice if login fails + LLConversationLog::initParamSingleton(); + } //good a place as any to create user windlight directories std::string user_windlight_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", "")); -- cgit v1.2.3 From bd42fd13b038dea5bddf06ed8da7b51d08b38bae Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 14 Oct 2019 20:49:16 +0300 Subject: SL-11719 Fixed init of conversation log --- indra/newview/llstartup.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 6cbd83d656..a861def704 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -942,12 +942,6 @@ bool idle_startup() LLFile::mkdir(gDirUtilp->getChatLogsDir()); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); - //Initialize conversation log only when chat log directories are ready - if (!LLConversationLog::instanceExists()) - { - // Check existance since this part can be reached twice if login fails - LLConversationLog::initParamSingleton(); - } //good a place as any to create user windlight directories std::string user_windlight_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", "")); @@ -1298,6 +1292,12 @@ bool idle_startup() LLStartUp::initExperiences(); display_startup(); + + // If logging should be enebled, turns it on and loads history from disk + // Note: does not happen on init of singleton because preferences can use + // this instance without logging in + LLConversationLog::getInstance()->initLoggingState(); + LLStartUp::setStartupState( STATE_MULTIMEDIA_INIT ); return FALSE; -- cgit v1.2.3