From 35cec6e3ad5ba4fceea8c8caef69c28155e0fcc4 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 28 Feb 2022 22:20:41 +0100 Subject: [PATCH 01/16] Initialize PODs with 0 and not leave anyting to chance. --- indra/llinventory/llparcel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index e2469f3c7e..e25dae8a90 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -463,13 +463,13 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr } else if ("time" == keyword) { - S32 when; + S32 when{}; LLStringUtil::convertToS32(value, when); entry->mTime = when; } else if ("flags" == keyword) { - U32 setting; + U32 setting{}; LLStringUtil::convertToU32(value, setting); entry->mFlags = setting; } From 69065824014ce0ac0981b5fac4dfe4a4d05ad7b4 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 28 Feb 2022 22:23:05 +0100 Subject: [PATCH 02/16] Calling a method on a pointer that is 100% certain to be inalid is a really bad idea ... --- indra/newview/llviewertexturelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 37344056e1..4709094591 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1263,7 +1263,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, LLPointer image = LLImageFormatted::createFromType(codec); if (image.isNull()) { - image->setLastError("Couldn't open the image to be uploaded."); + LL_WARNS() << "Couldn't open the image to be uploaded." << LL_ENDL; return FALSE; } if (!image->load(filename)) From df00e8a0b2e9cdd9700f51e964d040c19a4bf2ec Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 28 Feb 2022 23:23:31 +0100 Subject: [PATCH 03/16] There seems to be a reluctance to kill boost for VS2005(!), lets get rid of it. --- indra/cmake/Boost.cmake | 75 +++++++++++++---------------------------- 1 file changed, 24 insertions(+), 51 deletions(-) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 06a7ab6d75..0a61e33532 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -24,57 +24,30 @@ else (USESYSTEMLIBS) set(addrsfx "-x${ADDRESS_SIZE}") if (WINDOWS) - if(MSVC80) - # This should be obsolete at this point - set(BOOST_VERSION "1.55") - set(BOOST_CONTEXT_LIBRARY - optimized libboost_context-vc80-mt-${BOOST_VERSION} - debug libboost_context-vc80-mt-gd-${BOOST_VERSION}) - set(BOOST_FILESYSTEM_LIBRARY - optimized libboost_filesystem-vc80-mt-${BOOST_VERSION} - debug libboost_filesystem-vc80-mt-gd-${BOOST_VERSION}) - set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized libboost_program_options-vc80-mt-${BOOST_VERSION} - debug libboost_program_options-vc80-mt-gd-${BOOST_VERSION}) - set(BOOST_REGEX_LIBRARY - optimized libboost_regex-vc80-mt-${BOOST_VERSION} - debug libboost_regex-vc80-mt-gd-${BOOST_VERSION}) - set(BOOST_SIGNALS_LIBRARY - optimized libboost_signals-vc80-mt-${BOOST_VERSION} - debug libboost_signals-vc80-mt-gd-${BOOST_VERSION}) - set(BOOST_SYSTEM_LIBRARY - optimized libboost_system-vc80-mt-${BOOST_VERSION} - debug libboost_system-vc80-mt-gd-${BOOST_VERSION}) - set(BOOST_THREAD_LIBRARY - optimized libboost_thread-vc80-mt-${BOOST_VERSION} - debug libboost_thread-vc80-mt-gd-${BOOST_VERSION}) - else(MSVC80) - # MSVC 10.0 config - set(BOOST_CONTEXT_LIBRARY - optimized libboost_context-mt${addrsfx} - debug libboost_context-mt${addrsfx}-gd) - set(BOOST_FIBER_LIBRARY - optimized libboost_fiber-mt${addrsfx} - debug libboost_fiber-mt${addrsfx}-gd) - set(BOOST_FILESYSTEM_LIBRARY - optimized libboost_filesystem-mt${addrsfx} - debug libboost_filesystem-mt${addrsfx}-gd) - set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized libboost_program_options-mt${addrsfx} - debug libboost_program_options-mt${addrsfx}-gd) - set(BOOST_REGEX_LIBRARY - optimized libboost_regex-mt${addrsfx} - debug libboost_regex-mt${addrsfx}-gd) - set(BOOST_SIGNALS_LIBRARY - optimized libboost_signals-mt${addrsfx} - debug libboost_signals-mt${addrsfx}-gd) - set(BOOST_SYSTEM_LIBRARY - optimized libboost_system-mt${addrsfx} - debug libboost_system-mt${addrsfx}-gd) - set(BOOST_THREAD_LIBRARY - optimized libboost_thread-mt${addrsfx} - debug libboost_thread-mt${addrsfx}-gd) - endif (MSVC80) + set(BOOST_CONTEXT_LIBRARY + optimized libboost_context-mt${addrsfx} + debug libboost_context-mt${addrsfx}-gd) + set(BOOST_FIBER_LIBRARY + optimized libboost_fiber-mt${addrsfx} + debug libboost_fiber-mt${addrsfx}-gd) + set(BOOST_FILESYSTEM_LIBRARY + optimized libboost_filesystem-mt${addrsfx} + debug libboost_filesystem-mt${addrsfx}-gd) + set(BOOST_PROGRAM_OPTIONS_LIBRARY + optimized libboost_program_options-mt${addrsfx} + debug libboost_program_options-mt${addrsfx}-gd) + set(BOOST_REGEX_LIBRARY + optimized libboost_regex-mt${addrsfx} + debug libboost_regex-mt${addrsfx}-gd) + set(BOOST_SIGNALS_LIBRARY + optimized libboost_signals-mt${addrsfx} + debug libboost_signals-mt${addrsfx}-gd) + set(BOOST_SYSTEM_LIBRARY + optimized libboost_system-mt${addrsfx} + debug libboost_system-mt${addrsfx}-gd) + set(BOOST_THREAD_LIBRARY + optimized libboost_thread-mt${addrsfx} + debug libboost_thread-mt${addrsfx}-gd) elseif (LINUX) set(BOOST_CONTEXT_LIBRARY optimized boost_context-mt${addrsfx} From 51e318fd8db70b94db2163e4098a155e3c4cc0e2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 5 Mar 2022 11:34:13 +0200 Subject: [PATCH 04/16] SL-14541 Pull in updated zlib-ng Nicky Dasmijn's contribution for zlib-ng Linux builds --- autobuild.xml | 16 ++++++++-------- doc/contributions.txt | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 41d4e072b2..e4b6de6d35 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1640,7 +1640,7 @@ name llappearance_utility platforms - + linux archive @@ -1903,9 +1903,9 @@ archive hash - d00bed67d307d5435280fc7b42ceb822 + 843587a078102d86d90054d03354684d url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87785/805884/minizip_ng-3.0.2.563851-darwin64-563851.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95876/856095/minizip_ng-3.0.2.569217-darwin64-569217.tar.bz2 name darwin64 @@ -1915,9 +1915,9 @@ archive hash - e7cf61cde66e5c632e0e2c1fc5770dbb + 26dc254f443ca9c5509547d7fbd9d8e5 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87787/805898/minizip_ng-3.0.2.563851-windows-563851.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95878/856107/minizip_ng-3.0.2.569217-windows-569217.tar.bz2 name windows @@ -1927,16 +1927,16 @@ archive hash - b3c69f9d05cfb531b591347f7b6785cb + e9241fa325f4014995b62193321e7a1c url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87788/805899/minizip_ng-3.0.2.563851-windows64-563851.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95877/856106/minizip_ng-3.0.2.569217-windows64-569217.tar.bz2 name windows64 version - 3.0.2.563851 + 3.0.2.569217 nghttp2 diff --git a/doc/contributions.txt b/doc/contributions.txt index 669a0cd671..590c807019 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1116,6 +1116,7 @@ Nicky Dasmijn SL-11072 SL-13141 SL-13642 + SL-14541 SL-16438 Nicky Perian OPEN-1 From 3e1619d2fc1fdb043f9906e38e027d69fd49940c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 5 Mar 2022 22:52:00 +0200 Subject: [PATCH 05/16] SL-14541 Pull in updated collada --- autobuild.xml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index e4b6de6d35..3b9eaa0ff0 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -236,9 +236,9 @@ archive hash - 84d625d41067e6dc633ac53367ae4e87 + 4699b8389dfb754da0393ddb5d325722 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87796/805943/colladadom-2.3.563854-darwin64-563854.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95882/856117/colladadom-2.3.569219-darwin64-569219.tar.bz2 name darwin64 @@ -260,9 +260,9 @@ archive hash - d365992132ca2bd89f48a2dab1f3b1f2 + 343e46ea49a08ad6596d3dc702d5b812 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87794/805955/colladadom-2.3.563854-windows-563854.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95883/856128/colladadom-2.3.569219-windows-569219.tar.bz2 name windows @@ -272,16 +272,16 @@ archive hash - 27687df032caffdc1ec92611341adfe3 + de5bdfb61b31db56c5fe7d0962ad11e2 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87795/805951/colladadom-2.3.563854-windows64-563854.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95884/856129/colladadom-2.3.569219-windows64-569219.tar.bz2 name windows64 version - 2.3.563854 + 2.3.569219 cubemaptoequirectangular @@ -2127,9 +2127,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors LICENSES/libndofdev.txt name open-libndofdev - platforms - - version 0.3 From 952aee3f49d9591473b0bc2029dd485dd70a4132 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 23 Mar 2022 20:34:31 +0200 Subject: [PATCH 06/16] SL-17064 Add a Remember Password checkbox to the first time login screen. --- indra/newview/llpanellogin.cpp | 49 +++++---------- .../skins/default/xui/en/panel_login.xml | 2 +- .../default/xui/en/panel_login_first.xml | 60 ++++++++++++------- 3 files changed, 55 insertions(+), 56 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index deb1a963a0..302ff40bbc 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -323,11 +323,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, username_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this)); username_combo->setKeystrokeOnEsc(TRUE); - if (!mFirstLoginThisInstall) - { - LLCheckBoxCtrl* remember_name = getChild("remember_name"); - remember_name->setCommitCallback(boost::bind(&LLPanelLogin::onRememberUserCheck, this)); - } + + LLCheckBoxCtrl* remember_name = getChild("remember_name"); + remember_name->setCommitCallback(boost::bind(&LLPanelLogin::onRememberUserCheck, this)); } void LLPanelLogin::addFavoritesToStartLocation() @@ -527,21 +525,12 @@ void LLPanelLogin::populateFields(LLPointer credential, bool remem LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL; return; } - if (sInstance->mFirstLoginThisInstall) - { - LLUICtrl* remember_check = sInstance->getChild("remember_check"); - remember_check->setValue(remember_psswrd); - // no list to populate - setFields(credential); - } - else - { - sInstance->getChild("remember_name")->setValue(remember_user); - LLUICtrl* remember_password = sInstance->getChild("remember_password"); - remember_password->setValue(remember_user && remember_psswrd); - remember_password->setEnabled(remember_user); - sInstance->populateUserList(credential); - } + + sInstance->getChild("remember_name")->setValue(remember_user); + LLUICtrl* remember_password = sInstance->getChild("remember_password"); + remember_password->setValue(remember_user && remember_psswrd); + remember_password->setEnabled(remember_user); + sInstance->populateUserList(credential); } //static @@ -702,16 +691,9 @@ void LLPanelLogin::getFields(LLPointer& credential, } } credential = gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator); - if (!sInstance->mFirstLoginThisInstall) - { - remember_psswrd = sInstance->getChild("remember_password")->getValue(); - remember_user = sInstance->getChild("remember_name")->getValue(); - } - else - { - remember_psswrd = sInstance->getChild("remember_check")->getValue(); - remember_user = remember_psswrd; // on panel_login_first "remember_check" is named as 'remember me' - } + + remember_psswrd = sInstance->getChild("remember_password")->getValue(); + remember_user = sInstance->getChild("remember_name")->getValue(); } @@ -1074,17 +1056,18 @@ void LLPanelLogin::onUserListCommit(void*) } // static -// At the moment only happens if !mFirstLoginThisInstall void LLPanelLogin::onRememberUserCheck(void*) { - if (sInstance && !sInstance->mFirstLoginThisInstall) + if (sInstance) { LLCheckBoxCtrl* remember_name(sInstance->getChild("remember_name")); LLCheckBoxCtrl* remember_psswrd(sInstance->getChild("remember_password")); LLComboBox* user_combo(sInstance->getChild("username_combo")); bool remember = remember_name->getValue().asBoolean(); - if (user_combo->getCurrentIndex() != -1 && !remember) + if (!sInstance->mFirstLoginThisInstall + && user_combo->getCurrentIndex() != -1 + && !remember) { remember = true; remember_name->setValue(true); diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index ade004f9d0..3aba80909a 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -145,7 +145,7 @@ follows="left|top" font="SansSerifMedium" text_color="EmphasisColor" - height="16" + height="24" left="408" bottom_delta="0" label="Remember password" diff --git a/indra/newview/skins/default/xui/en/panel_login_first.xml b/indra/newview/skins/default/xui/en/panel_login_first.xml index cdf07c8aef..d36c83d292 100644 --- a/indra/newview/skins/default/xui/en/panel_login_first.xml +++ b/indra/newview/skins/default/xui/en/panel_login_first.xml @@ -98,7 +98,7 @@ auto_resize="false" follows="left|right|top" name="widget_container" - width="532" + width="730" left="0" top="0" height="80"> @@ -106,7 +106,7 @@ allow_text_entry="true" follows="left|bottom" height="32" - left="2" + left="42" label="Username" combo_editor.font="SansSerifLarge" max_chars="128" @@ -126,7 +126,7 @@ follows="left|top" width="200" height="32" - left="220" + left="262" max_length_chars="16" name="password_edit" label="Password" @@ -145,43 +145,59 @@ label_color="White" font="SansSerifLarge" name="connect_btn" - left="432" - width="100" + left_pad="15" + width="120" height="32" top="0" /> + + Sign up + + + name="remember_password" + width="198" /> Forgotten password - - Sign up - Date: Mon, 28 Mar 2022 17:41:48 +0300 Subject: [PATCH 07/16] SL-17039 "Remember Password" checkbox state should be saved per account name --- indra/newview/app_settings/settings.xml | 11 ++++++++++ indra/newview/llfavoritesbar.cpp | 10 +++++++-- indra/newview/llpanellogin.cpp | 27 ++++++++++++++++++++++++- indra/newview/llpanellogin.h | 1 + 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6eab73cd8a..73efa16abe 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8613,6 +8613,17 @@ Value 1 + UpdateRememberPasswordSetting + + Comment + Save 'rememeber password' setting for current user. + Persist + 0 + Type + Boolean + Value + 0 + OctreeMaxNodeCapacity Comment diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 6b93f204f7..a02bb56489 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1614,7 +1614,7 @@ void LLFavoritesOrderStorage::destroyClass() file.close(); LLFile::remove(filename); } - if(mSaveOnExit) + if(mSaveOnExit || gSavedSettings.getBOOL("UpdateRememberPasswordSetting")) { LLFavoritesOrderStorage::instance().saveFavoritesRecord(true); } @@ -1974,7 +1974,7 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed) } } - if((items != mPrevFavorites) || name_changed || pref_changed) + if((items != mPrevFavorites) || name_changed || pref_changed || gSavedSettings.getBOOL("UpdateRememberPasswordSetting")) { std::string filename = getStoredFavoritesFilename(); if (!filename.empty()) @@ -1995,6 +1995,12 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed) LLSD user_llsd; S32 fav_iter = 0; mMissingSLURLs.clear(); + + LLSD save_pass; + save_pass["save_password"] = gSavedSettings.getBOOL("RememberPassword"); + user_llsd[fav_iter] = save_pass; + fav_iter++; + for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++) { LLSD value; diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 302ff40bbc..9df3a8e31a 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -326,6 +326,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLCheckBoxCtrl* remember_name = getChild("remember_name"); remember_name->setCommitCallback(boost::bind(&LLPanelLogin::onRememberUserCheck, this)); + getChild("remember_password")->setCommitCallback(boost::bind(&LLPanelLogin::onRememberPasswordCheck, this)); } void LLPanelLogin::addFavoritesToStartLocation() @@ -398,10 +399,22 @@ void LLPanelLogin::addFavoritesToStartLocation() combo->addSeparator(); LL_DEBUGS() << "Loading favorites for " << iter->first << LL_ENDL; LLSD user_llsd = iter->second; + bool update_password_setting = true; for (LLSD::array_const_iterator iter1 = user_llsd.beginArray(); iter1 != user_llsd.endArray(); ++iter1) { - std::string label = (*iter1)["name"].asString(); + if ((*iter1).has("save_password")) + { + bool save_password = (*iter1)["save_password"].asBoolean(); + gSavedSettings.setBOOL("RememberPassword", save_password); + if (!save_password) + { + getChild("connect_btn")->setEnabled(false); + } + update_password_setting = false; + } + + std::string label = (*iter1)["name"].asString(); std::string value = (*iter1)["slurl"].asString(); if(label != "" && value != "") { @@ -413,6 +426,10 @@ void LLPanelLogin::addFavoritesToStartLocation() } } } + if (update_password_setting) + { + gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE); + } break; } if (combo->getValue().asString().empty()) @@ -1081,6 +1098,14 @@ void LLPanelLogin::onRememberUserCheck(void*) } } +void LLPanelLogin::onRememberPasswordCheck(void*) +{ + if (sInstance) + { + gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE); + } +} + // static void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index c5e6b41def..c6254f72cf 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -107,6 +107,7 @@ private: static void onUserNameTextEnty(void*); static void onUserListCommit(void*); static void onRememberUserCheck(void*); + static void onRememberPasswordCheck(void*); static void onPassKey(LLLineEditor* caller, void* user_data); static void updateServerCombo(); From 6c663d733149b384373a7464fa5d44f3810cc7c8 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 22:16:20 +0200 Subject: [PATCH 08/16] Parameter to onClickConnect must be bool, not int. (cherry picked from commit 5c6228e56a688a98606ce28077d6089adc833873) --- indra/newview/llpanelloginlistener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelloginlistener.cpp b/indra/newview/llpanelloginlistener.cpp index 33efde11f3..fb3e8dc244 100644 --- a/indra/newview/llpanelloginlistener.cpp +++ b/indra/newview/llpanelloginlistener.cpp @@ -47,5 +47,5 @@ LLPanelLoginListener::LLPanelLoginListener(LLPanelLogin* instance): void LLPanelLoginListener::onClickConnect(const LLSD&) const { - mPanel->onClickConnect(NULL); + mPanel->onClickConnect(false); } From 46824ae0e8ae72fff04b96647edca2de0d0aa849 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 22:35:21 +0200 Subject: [PATCH 09/16] Semicolon at end of for loop was making sure nothing ever got done. The whole methode is questionable in doing nothing and it seems there was a deliberate change that made sure it does nothing. I am not sure what this method really is supposed to do, thus I did opt for the most basic version of "do nothing" like it was before. (cherry picked from commit 1c1a93e42e209e959f09ec46ca414a8936f4ac20) --- indra/llappearance/lltexlayer.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index a4600069ce..65ffbb1af3 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -478,18 +478,6 @@ void LLTexLayerSet::asLLSD(LLSD& sd) const { sd["visible"] = LLSD::Boolean(isVisible()); LLSD layer_list_sd; - layer_list_t::const_iterator layer_iter = mLayerList.begin(); - layer_list_t::const_iterator layer_end = mLayerList.end(); - for(; layer_iter != layer_end; ++layer_iter); - { - LLSD layer_sd; - //LLTexLayerInterface* layer = (*layer_iter); - //if (layer) - //{ - // layer->asLLSD(layer_sd); - //} - layer_list_sd.append(layer_sd); - } LLSD mask_list_sd; LLSD info_sd; sd["layers"] = layer_list_sd; From 0dc325c1e9de059d36c7b0e2c6ba997160ff1f53 Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 14 Apr 2022 16:39:06 +0200 Subject: [PATCH 10/16] void LLTexLayerSet::asLLSD was never used, remove it completely. (cherry picked from commit 7f0259f0e767969d260514e9ea810cbde7f1d24c) --- indra/llappearance/lltexlayer.cpp | 14 -------------- indra/llappearance/lltexlayer.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 65ffbb1af3..ca72dd5fd3 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -472,20 +472,6 @@ const std::string LLTexLayerSet::getBodyRegionName() const return mInfo->mBodyRegion; } - -// virtual -void LLTexLayerSet::asLLSD(LLSD& sd) const -{ - sd["visible"] = LLSD::Boolean(isVisible()); - LLSD layer_list_sd; - LLSD mask_list_sd; - LLSD info_sd; - sd["layers"] = layer_list_sd; - sd["masks"] = mask_list_sd; - sd["info"] = info_sd; -} - - void LLTexLayerSet::destroyComposite() { if( mComposite ) diff --git a/indra/llappearance/lltexlayer.h b/indra/llappearance/lltexlayer.h index 6a5040cf0b..74b421d3ee 100644 --- a/indra/llappearance/lltexlayer.h +++ b/indra/llappearance/lltexlayer.h @@ -220,8 +220,6 @@ public: static BOOL sHasCaches; - virtual void asLLSD(LLSD& sd) const; - protected: typedef std::vector layer_list_t; layer_list_t mLayerList; From e5cd4da823fe61e57c2d4bb829e39a587276af09 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 14 Apr 2022 22:24:11 +0300 Subject: [PATCH 11/16] SL-17035 Crash at gl_debug_callback RenderDebugGL was avaliable from develop menu, but since it was persistent, caused slowdowns and crashes it could result in users crashing or lagging without knowing the cause. To resolve the issue it was made to last for a single session. --- indra/llrender/llgl.cpp | 7 +++---- indra/llrender/llgl.h | 1 + indra/newview/app_settings/cmd_line.xml | 2 +- indra/newview/app_settings/settings.xml | 4 ++-- indra/newview/llappviewer.cpp | 11 ++++++++++- indra/newview/llface.cpp | 2 -- indra/newview/llviewercontrol.cpp | 8 -------- indra/newview/llvovolume.cpp | 2 -- indra/newview/skins/default/xui/en/menu_viewer.xml | 6 +++--- 9 files changed, 20 insertions(+), 23 deletions(-) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 43fedeca64..43e2c5751c 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -60,10 +60,10 @@ BOOL gDebugSession = FALSE; +BOOL gDebugGLSession = FALSE; BOOL gClothRipple = FALSE; BOOL gHeadlessClient = FALSE; BOOL gGLActive = FALSE; -BOOL gGLDebugLoggingEnabled = TRUE; static const std::string HEADLESS_VENDOR_STRING("Linden Lab"); static const std::string HEADLESS_RENDERER_STRING("Headless"); @@ -85,8 +85,6 @@ void APIENTRY gl_debug_callback(GLenum source, const GLchar* message, GLvoid* userParam) { - if (gGLDebugLoggingEnabled) - { if (severity == GL_DEBUG_SEVERITY_HIGH_ARB) { LL_WARNS() << "----- GL ERROR --------" << LL_ENDL; @@ -100,11 +98,12 @@ void APIENTRY gl_debug_callback(GLenum source, LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL; LL_WARNS() << "Message: " << message << LL_ENDL; LL_WARNS() << "-----------------------" << LL_ENDL; +#ifndef LL_RELEASE_FOR_DOWNLOAD if (severity == GL_DEBUG_SEVERITY_HIGH_ARB) { LL_ERRS() << "Halting on GL Error" << LL_ENDL; } -} +#endif //LL_RELEASE_FOR_DOWNLOAD } #endif diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index a07e2d9bb0..ad4d69cde4 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -47,6 +47,7 @@ extern BOOL gDebugGL; extern BOOL gDebugSession; +extern BOOL gDebugGLSession; extern llofstream gFailLog; #define LL_GL_ERRS LL_ERRS("RenderState") diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 4e186292f7..6da14b7599 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -55,7 +55,7 @@ debugsession desc - Run as if RenderDebugGL is TRUE, but log errors until end of session. + Run as if RenderDebugGLSession is TRUE, but log errors until end of session. map-to DebugSession diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 73efa16abe..f545a5d1f1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9163,10 +9163,10 @@ Value 0.5 - RenderDebugGL + RenderDebugGLSession Comment - Enable strict GL debugging. + Enable strict GL debugging on the start of next session. Persist 1 Type diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e01d713501..af7c21706a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -604,7 +604,7 @@ static void settings_modify() LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred && gSavedSettings.getBOOL("RenderAvatarVP"); LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] - gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession; + gDebugGL = gDebugGLSession || gDebugSession; gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline"); } @@ -2708,6 +2708,15 @@ bool LLAppViewer::initConfiguration() ll_init_fail_log(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "test_failures.log")); } + if (gSavedSettings.getBOOL("RenderDebugGLSession")) + { + gDebugGLSession = TRUE; + gDebugGL = TRUE; + // gDebugGL can cause excessive logging + // so it's limited to a single session + gSavedSettings.setBOOL("RenderDebugGLSession", FALSE); + } + const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) { diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index f1b64a5899..445615fdd5 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -63,7 +63,6 @@ #pragma GCC diagnostic ignored "-Wuninitialized" #endif -extern BOOL gGLDebugLoggingEnabled; #define LL_MAX_INDICES_COUNT 1000000 static LLStaticHashedString sTextureIndexIn("texture_index_in"); @@ -1522,7 +1521,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, !rebuild_weights && //TODO: add support for weights !volume.isUnique()) //source volume is NOT flexi { //use transform feedback to pack vertex buffer - //gGLDebugLoggingEnabled = TRUE; LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK); LLGLEnable discard(GL_RASTERIZER_DISCARD); LLVertexBuffer* buff = (LLVertexBuffer*) vf.mVertexBuffer.get(); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index bc425123e1..3d1f4e61cc 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -484,13 +484,6 @@ static bool handleRenderBumpChanged(const LLSD& newval) return true; } -static bool handleRenderDebugGLChanged(const LLSD& newvalue) -{ - gDebugGL = newvalue.asBoolean() || gDebugSession; - gGL.clearErrors(); - return true; -} - static bool handleRenderDebugPipelineChanged(const LLSD& newvalue) { gDebugPipeline = newvalue.asBoolean(); @@ -697,7 +690,6 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleRenderBumpChanged, _2)); gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2)); - gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _2)); gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2)); gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _2)); gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleRenderDeferredChanged, _2)); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 77f756a123..7da40bd504 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -107,8 +107,6 @@ static LLTrace::BlockTimerStatHandle FTM_GEN_TRIANGLES("Generate Triangles"); static LLTrace::BlockTimerStatHandle FTM_GEN_VOLUME("Generate Volumes"); static LLTrace::BlockTimerStatHandle FTM_VOLUME_TEXTURES("Volume Textures"); -extern BOOL gGLDebugLoggingEnabled; - // Implementation class of LLMediaDataClientObject. See llmediadataclient.h class LLMediaDataClientObjectImpl : public LLMediaDataClientObject { diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index bea06299da..1caa0908ea 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3121,14 +3121,14 @@ function="World.EnvPreset" + parameter="RenderDebugGLSession" /> + parameter="RenderDebugGLSession" /> Date: Thu, 14 Apr 2022 15:29:05 -0400 Subject: [PATCH 12/16] SL-17218: Update faulty test for null LLFace::mTangents --- indra/newview/llface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index f1b64a5899..547d9dad38 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1028,11 +1028,11 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po const LLMatrix4& vol_mat = getWorldMatrix(); const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset); const LLVector4a& normal4a = vf.mNormals[0]; - const LLVector4a& tangent = vf.mTangents[0]; - if (!&tangent) + if (! vf.mTangents) { return; } + const LLVector4a& tangent = *vf.mTangents; LLVector4a binormal4a; binormal4a.setCross3(normal4a, tangent); From 4e282db26bc0348460f94b7cf8735d385c2896c2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 14 Apr 2022 15:32:19 -0400 Subject: [PATCH 13/16] SL-17218: Credit NickyD's contributions to this Jira. --- doc/contributions.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 590c807019..7b57fbbd47 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1107,17 +1107,18 @@ Nicky Dasmijn STORM-1937 OPEN-187 SL-15234 - STORM-2010 + STORM-2010 STORM-2082 MAINT-6665 SL-10291 SL-10293 SL-11061 - SL-11072 + SL-11072 SL-13141 SL-13642 SL-14541 SL-16438 + SL-17218 Nicky Perian OPEN-1 STORM-1087 From b9ed5f9e79799d1b180b9b548c1093d771154d5e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 14 Apr 2022 15:48:09 -0400 Subject: [PATCH 14/16] SL-17218: Per NickyD review feedback, test LLFace::mNormals too. --- indra/newview/llface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 547d9dad38..2e32ffca26 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1027,12 +1027,12 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po { const LLMatrix4& vol_mat = getWorldMatrix(); const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset); - const LLVector4a& normal4a = vf.mNormals[0]; - if (! vf.mTangents) + if (! (vf.mNormals && vf.mTangents)) { return; } - const LLVector4a& tangent = *vf.mTangents; + const LLVector4a& normal4a = *vf.mNormals; + const LLVector4a& tangent = *vf.mTangents; LLVector4a binormal4a; binormal4a.setCross3(normal4a, tangent); From c184c882c634035ad54e13b6e2534a0725cf9b3a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 15 Apr 2022 00:13:18 +0300 Subject: [PATCH 15/16] SL-17035 Reverted a part of previous commit According to davep, the intent of Debug GL is to crash and in this it's doing it's job, but the rest of the fix that makes the state not persist is a good solution. --- indra/llrender/llgl.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 43e2c5751c..08b2f9fa7d 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -98,12 +98,10 @@ void APIENTRY gl_debug_callback(GLenum source, LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL; LL_WARNS() << "Message: " << message << LL_ENDL; LL_WARNS() << "-----------------------" << LL_ENDL; -#ifndef LL_RELEASE_FOR_DOWNLOAD if (severity == GL_DEBUG_SEVERITY_HIGH_ARB) { LL_ERRS() << "Halting on GL Error" << LL_ENDL; } -#endif //LL_RELEASE_FOR_DOWNLOAD } #endif From 94973e736c5373dc75eb42cd43156193401dcd1b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 15 Apr 2022 21:27:50 +0300 Subject: [PATCH 16/16] SL-17224 Update FMOD to version 2.02.06 --- autobuild.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 3b9eaa0ff0..68e00cc1cd 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -602,9 +602,9 @@ archive hash - c36808a58384a52672d81593de61f7ff + 2c619c1bef969dc42b4f44a4651b314e url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/89681/818422/fmodstudio-2.02.03.565082-darwin64-565082.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/98369/869141/fmodstudio-2.02.06.570913-darwin64-570913.tar.bz2 name darwin64 @@ -626,9 +626,9 @@ archive hash - 96853d91ce4da14e14ea322122629551 + 875ccd8c1feec8ff03438d453371044b url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/89683/818438/fmodstudio-2.02.03.565082-windows-565082.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/98371/869153/fmodstudio-2.02.06.570913-windows-570913.tar.bz2 name windows @@ -638,16 +638,16 @@ archive hash - 58d0cc28a1d90bacefbda48fcd8d379c + 5e402f4828741bce942e2ced318cd02a url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/89684/818439/fmodstudio-2.02.03.565082-windows64-565082.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/98372/869154/fmodstudio-2.02.06.570913-windows64-570913.tar.bz2 name windows64 version - 2.02.03.565082 + 2.02.06.570913 fontconfig