From 2b5396a8e8962ad03ef74c60fe0bf6515a4b8521 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 2 Oct 2020 13:24:00 +0300 Subject: [PATCH 01/17] SL-14050 Remove all Help question marks from Viewer UI --- indra/llui/llfloater.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index abb043f428..e9c980ad9a 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -303,12 +303,10 @@ void LLFloater::initFloater(const Params& p) mButtonsEnabled[BUTTON_CLOSE] = TRUE; } - // Help button: '?' - if ( !mHelpTopic.empty() ) - { - mButtonsEnabled[BUTTON_HELP] = TRUE; - } - + // Help button: '?' + //SL-14050 Disable all Help question marks + mButtonsEnabled[BUTTON_HELP] = FALSE; + // Minimize button only for top draggers if ( !mDragOnLeft && mCanMinimize ) { From 8803157a214507cf9ea8454f9951710053262aaf Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 5 Oct 2020 20:53:20 +0300 Subject: [PATCH 02/17] SL-13953 Builds should fail if symbols upload failed --- autobuild.xml | 14 +++++++------- build.sh | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index eacf11fb0f..183999bdc1 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -244,9 +244,9 @@ archive hash - 471b0b350955152fd87518575057dfc4 + d127d78db697bca2066358c63c9c6f32 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/60326/566593/bugsplat-1.0.7.542667-darwin64-542667.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/69727/673273/bugsplat-1.0.7.550012-darwin64-550012.tar.bz2 name darwin64 @@ -256,9 +256,9 @@ archive hash - 70e8bf46145c4cbae6f93e8b70ba5499 + 5b5124ef7f3705fe267e6ca0c405870b url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/60320/566541/bugsplat-3.6.0.4.542667-windows-542667.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/69728/673286/bugsplat-3.6.0.4.550012-windows-550012.tar.bz2 name windows @@ -268,16 +268,16 @@ archive hash - a73696e859fad3f19f835740815a2bd3 + db59bda4b152f0f65be18c122bc95bfc url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/60321/566542/bugsplat-3.6.0.4.542667-windows64-542667.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/69726/673272/bugsplat-3.6.0.4.550012-windows64-550012.tar.bz2 name windows64 version - 1.0.7.542667 + 3.6.0.4.550012 colladadom diff --git a/build.sh b/build.sh index 545c913f92..3b0cf97731 100755 --- a/build.sh +++ b/build.sh @@ -480,10 +480,12 @@ then fi # Run upload extensions + # Ex: bugsplat if [ -d ${build_dir}/packages/upload-extensions ]; then for extension in ${build_dir}/packages/upload-extensions/*.sh; do begin_section "Upload Extension $extension" . $extension + [ $? -eq 0 ] || fatal "Upload of extension $extension failed" end_section "Upload Extension $extension" done fi From fc17790a35402e25d7790dfed467e9c46b059554 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 6 Oct 2020 19:45:26 +0300 Subject: [PATCH 03/17] SL-14030 FIXED Clicking in Places > My Landmarks scrolls the Places window. --- indra/llui/llaccordionctrl.cpp | 3 ++- indra/llui/llaccordionctrl.h | 4 ++++ indra/newview/llpanellandmarks.cpp | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 61a119800e..809d72208f 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -55,6 +55,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) , mTabComparator( NULL ) , mNoVisibleTabsHelpText(NULL) , mNoVisibleTabsOrigString(params.no_visible_tabs_text.initial_value().asString()) + , mSkipScrollToChild(false) { initNoTabsWidget(params.no_matched_tabs_text); @@ -659,7 +660,7 @@ void LLAccordionCtrl::onScrollPosChangeCallback(S32, LLScrollbar*) // virtual void LLAccordionCtrl::onUpdateScrollToChild(const LLUICtrl *cntrl) { - if (mScrollbar && mScrollbar->getVisible()) + if (mScrollbar && mScrollbar->getVisible() && !mSkipScrollToChild) { // same as scrollToShowRect LLRect rect; diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index b38a76d27f..2828254472 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -138,6 +138,8 @@ public: bool getFitParent() const {return mFitParent;} + void setSkipScrollToChild(bool skip) { mSkipScrollToChild = skip; } + private: void initNoTabsWidget(const LLTextBox::Params& tb_params); void updateNoTabsHelpTextVisibility(); @@ -183,6 +185,8 @@ private: F32 mAutoScrollRate; LLTextBox* mNoVisibleTabsHelpText; + bool mSkipScrollToChild; + std::string mNoMatchedTabsOrigString; std::string mNoVisibleTabsOrigString; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index cd1dc0f070..ccd8497484 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -227,6 +227,12 @@ BOOL LLLandmarksPanel::postBuild() initMyInventoryPanel(); initLibraryInventoryPanel(); + LLAccordionCtrl* accordion = getChild("landmarks_accordion"); + if (accordion) + { + accordion->setSkipScrollToChild(true); + } + return TRUE; } From f08421e6512da49c633823a65c459de32aae61de Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 6 Oct 2020 01:46:00 +0300 Subject: [PATCH 04/17] SL-14012 Crashes from Win10 are sent with uninformative callstacks Simplify name generation according to slack discussion, also helps bugsplat with matching files --- autobuild.xml | 14 +++++++------- indra/newview/viewer_manifest.py | 13 +++++++++++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 183999bdc1..5e02db7406 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -244,9 +244,9 @@ archive hash - d127d78db697bca2066358c63c9c6f32 + ee1e3e1a18e7b123e69516e9725d5bbc url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/69727/673273/bugsplat-1.0.7.550012-darwin64-550012.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/69791/674226/bugsplat-1.0.7.550056-darwin64-550056.tar.bz2 name darwin64 @@ -256,9 +256,9 @@ archive hash - 5b5124ef7f3705fe267e6ca0c405870b + 4682feb72e972e0790615de7046877ee url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/69728/673286/bugsplat-3.6.0.4.550012-windows-550012.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/69789/674221/bugsplat-3.6.0.4.550056-windows-550056.tar.bz2 name windows @@ -268,16 +268,16 @@ archive hash - db59bda4b152f0f65be18c122bc95bfc + e8be5b56ebee7e3f9ce5c212f90dc70c url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/69726/673272/bugsplat-3.6.0.4.550012-windows64-550012.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/69790/674223/bugsplat-3.6.0.4.550056-windows64-550056.tar.bz2 name windows64 version - 3.6.0.4.550012 + 3.6.0.4.550056 colladadom diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 90a2af98f7..c6f149b5fe 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -260,6 +260,9 @@ class ViewerManifest(LLManifest): app_suffix=self.channel_variant() return CHANNEL_VENDOR_BASE + ' ' + app_suffix + def exec_name(self): + return "SecondLifeViewer" + def app_name_oneword(self): return ''.join(self.app_name().split()) @@ -419,10 +422,12 @@ class WindowsManifest(ViewerManifest): build_data_json_platform = 'win' def final_exe(self): - return self.app_name_oneword()+".exe" + return self.exec_name()+".exe" + + def final_pdb(self): + return self.exec_name()+".pdb" def finish_build_data_dict(self, build_data_dict): - #MAINT-7294: Windows exe names depend on channel name, so write that in also build_data_dict['Executable'] = self.final_exe() build_data_dict['AppName'] = self.app_name() return build_data_dict @@ -487,6 +492,10 @@ class WindowsManifest(ViewerManifest): if self.is_packaging_viewer(): # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) + # Bugsplat for some reason requires a match between user's exe and supplied pdb on Windows 10 + # this feels wrong and doesn't make any sense, since often we are supposed to match a whole + # folder of symbol files to a random exe. But Bugsplat says 'it's expected' so just rename files. + self.ccopyfile(src='%s/secondlife-bin.pdb' % self.args['configuration'], dst='%s/%s' % (self.args['configuration'], self.final_pdb())) with self.prefix(src=os.path.join(pkgdir, "VMP")): # include the compiled launcher scripts so that it gets included in the file_list From 3c6237f4eb87b74c94fb99b3bab6d8dda7f6dede Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 6 Oct 2020 15:56:11 +0300 Subject: [PATCH 05/17] SL-14067 FIXED The 'Unable to Buy' (L$) error persists until relogin --- indra/newview/llcurrencyuimanager.cpp | 5 +++++ indra/newview/llcurrencyuimanager.h | 2 ++ indra/newview/llfloaterbuycurrency.cpp | 1 + 3 files changed, 8 insertions(+) diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index df94e337da..2acddf0d26 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -603,6 +603,11 @@ bool LLCurrencyUIManager::bought() return impl.mBought; } +void LLCurrencyUIManager::clearError() +{ + return impl.clearError(); +} + bool LLCurrencyUIManager::hasError() { return impl.mError; diff --git a/indra/newview/llcurrencyuimanager.h b/indra/newview/llcurrencyuimanager.h index 3f37db8db1..7c05acbb05 100644 --- a/indra/newview/llcurrencyuimanager.h +++ b/indra/newview/llcurrencyuimanager.h @@ -80,6 +80,8 @@ public: bool buying(); // are we in the process of buying? bool bought(); // did the buy() transaction complete successfully + void clearError(); + bool hasError(); std::string errorMessage(); std::string errorURI(); diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 25348474a1..1751d54b5a 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -184,6 +184,7 @@ void LLFloaterBuyCurrencyUI::updateUI() args["TITLE"] = getString("info_cannot_buy"); args["MESSAGE"] = mManager.errorMessage(); LLNotificationsUtil::add("CouldNotBuyCurrency", args); + mManager.clearError(); closeFloater(); } else From 838f49b7a5e8a1da48ee8952352c873f69630f48 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 7 Oct 2020 15:18:57 +0300 Subject: [PATCH 06/17] SL-14067 minor cleanup --- indra/newview/llcurrencyuimanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index 2acddf0d26..d4fc1fe64d 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -605,7 +605,7 @@ bool LLCurrencyUIManager::bought() void LLCurrencyUIManager::clearError() { - return impl.clearError(); + impl.clearError(); } bool LLCurrencyUIManager::hasError() From 1ff3f15203dad9b3df2282ffc9c99dc6bc2fa053 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Oct 2020 19:56:13 +0300 Subject: [PATCH 07/17] SL-14074 LLConversationItemParticipant crash --- indra/newview/llfloaterimcontainer.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 82ce97f311..ab44735306 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -453,19 +453,23 @@ void LLFloaterIMContainer::idleUpdate() const LLConversationItem *current_session = getCurSelectedViewModelItem(); if (current_session) { - // Update moderator options visibility - LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = current_session->getChildrenBegin(); - LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = current_session->getChildrenEnd(); - bool is_moderator = isGroupModerator(); - bool can_ban = haveAbilityToBan(); - while (current_participant_model != end_participant_model) + if (current_session->getType() == LLConversationItem::CONV_SESSION_GROUP) { - LLConversationItemParticipant* participant_model = dynamic_cast(*current_participant_model); - participant_model->setModeratorOptionsVisible(is_moderator); - participant_model->setGroupBanVisible(can_ban && participant_model->getUUID() != gAgentID); + // Update moderator options visibility + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = current_session->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = current_session->getChildrenEnd(); + bool is_moderator = isGroupModerator(); + bool can_ban = haveAbilityToBan(); + while (current_participant_model != end_participant_model) + { + LLConversationItemParticipant* participant_model = dynamic_cast(*current_participant_model); + participant_model->setModeratorOptionsVisible(is_moderator); + participant_model->setGroupBanVisible(can_ban && participant_model->getUUID() != gAgentID); - current_participant_model++; + current_participant_model++; + } } + // Update floater's title as required by the currently selected session or use the default title LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(current_session->getUUID()); setTitle(conversation_floaterp && conversation_floaterp->needsTitleOverwrite() ? conversation_floaterp->getTitle() : mGeneralTitle); From 3ad517c6e20934932af712eec6ac50ee6cd6ac4c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Oct 2020 22:24:10 +0300 Subject: [PATCH 08/17] SL-14080 Crash in updateTextureVirtualSize LLVOVolume::updateTextures() does not check for null drawable prior to updateTextureVirtualSize --- indra/newview/llvovolume.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5dd662f03d..641adbd147 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -694,6 +694,11 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) LL_RECORD_BLOCK_TIME(FTM_VOLUME_TEXTURES); // Update the pixel area of all faces + if (mDrawable.isNull()) + { + return; + } + if(!forced) { if(!isVisible()) From 6531ba9a58c010d6ab8a4fc50afc7be45209e246 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 8 Oct 2020 20:55:16 +0300 Subject: [PATCH 09/17] SL-14079 crash accessing LLHUDText LLHUDObject has a lot of deriveds stored as LLPointer, no-virtual destructor is unlikely to be cause of the crash, but might be related --- indra/newview/llfloaterworldmap.h | 1 - indra/newview/llhudobject.h | 2 +- indra/newview/llhudtext.cpp | 5 ++++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index fce945df6c..97e99297cf 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -33,7 +33,6 @@ #define LL_LLFLOATERWORLDMAP_H #include "llfloater.h" -#include "llhudtext.h" #include "llmapimagetype.h" #include "lltracker.h" #include "llslurl.h" diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index 2f7a98c86c..ce128519ea 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -102,7 +102,7 @@ protected: static void sortObjects(); LLHUDObject(const U8 type); - ~LLHUDObject(); + virtual ~LLHUDObject(); virtual void render() = 0; virtual void renderForTimer() {}; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 82824861a9..72d28a3d44 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -565,7 +565,10 @@ S32 LLHUDText::getMaxLines() void LLHUDText::markDead() { - sTextObjects.erase(LLPointer(this)); + // make sure we have at least one pointer + // till the end of the function + LLPointer ptr(this); + sTextObjects.erase(ptr); LLHUDObject::markDead(); } From 30bcce4e7a18e0a249f8d2fe029c91b27291e072 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 9 Oct 2020 14:05:47 +0300 Subject: [PATCH 10/17] SL-13699 FIXED The sky settings are changed after entering the 'Editing Appearance' mode --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 898ac63939..b49747837d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6514,7 +6514,7 @@ void LLPipeline::enableLightsDynamic() { gPipeline.enableLightsAvatar(); } - else if (gAgentAvatarp->mSpecialRenderMode >= 1) // anim preview + else if (gAgentAvatarp->mSpecialRenderMode == 2) // anim preview { gPipeline.enableLightsAvatarEdit(LLColor4(0.7f, 0.6f, 0.3f, 1.f)); } From 26ef8e6c65c53b00be09400897761239ca15187c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Oct 2020 18:39:53 +0300 Subject: [PATCH 11/17] SL-14078 Validate region id for environments It is possible for agent to pass multiple region borders fast, resulting in environment updates affecting wrong regions --- indra/newview/llenvironment.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 342ee3ccf5..647e9bee22 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1612,6 +1612,17 @@ void LLEnvironment::updateShaderUniforms(LLGLSLShader *shader) void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envinfo, LLSettingsBase::Seconds transition) { + if (!gAgent.getRegion()) + { + return; + } + // mRegionId id can be null, no specification as to why and if it's valid so check valid ids only + if (gAgent.getRegion()->getRegionID() != envinfo->mRegionId && envinfo->mRegionId.notNull()) + { + LL_INFOS("ENVIRONMENT") << "Requested environmend region id: " << envinfo->mRegionId << " agent is on: " << gAgent.getRegion()->getRegionID() << LL_ENDL; + return; + } + if (envinfo->mParcelId == INVALID_PARCEL_ID) { // the returned info applies to an entire region. From 1cf3a5c505f1705a9d7169570799bda55f76e675 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Oct 2020 18:49:35 +0300 Subject: [PATCH 12/17] SL-14078 Caps request should log region they are requested for --- indra/newview/llviewerregion.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index a30c5156fa..8aa928f50d 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -291,6 +291,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) LL_INFOS("AppInit", "Capabilities") << "Requesting seed from " << url << " region name " << regionp->getName() + << " region id " << regionp->getRegionID() << " (attempt #" << mSeedCapAttempts + 1 << ")" << LL_ENDL; LL_DEBUGS("AppInit", "Capabilities") << "Capabilities requested: " << capabilityNames << LL_ENDL; @@ -405,7 +406,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle) LLSD capabilityNames = LLSD::emptyArray(); buildCapabilityNames(capabilityNames); - LL_INFOS("AppInit", "Capabilities") << "Requesting second Seed from " << url << LL_ENDL; + LL_INFOS("AppInit", "Capabilities") << "Requesting second Seed from " << url << " for region " << regionp->getRegionID() << LL_ENDL; regionp = NULL; result = httpAdapter->postAndSuspend(httpRequest, url, capabilityNames); @@ -2221,7 +2222,7 @@ void LLViewerRegion::requestSimulatorFeatures() LLCoros::instance().launch("LLViewerRegionImpl::requestSimulatorFeatureCoro", boost::bind(&LLViewerRegionImpl::requestSimulatorFeatureCoro, mImpl, url, getHandle())); - LL_INFOS("AppInit", "SimulatorFeatures") << "Launching " << coroname << " requesting simulator features from " << url << LL_ENDL; + LL_INFOS("AppInit", "SimulatorFeatures") << "Launching " << coroname << " requesting simulator features from " << url << " for region " << getRegionID() << LL_ENDL; } else { @@ -3028,7 +3029,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) if (getCapability("Seed") == url) { setCapabilityDebug("Seed", url); - LL_WARNS("CrossingCaps") << "Received duplicate seed capability, posting to seed " << + LL_WARNS("CrossingCaps") << "Received duplicate seed capability for " << getRegionID() << ", posting to seed " << url << LL_ENDL; //Instead of just returning we build up a second set of seed caps and compare them @@ -3049,7 +3050,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) LLCoros::instance().launch("LLViewerRegionImpl::requestBaseCapabilitiesCoro", boost::bind(&LLViewerRegionImpl::requestBaseCapabilitiesCoro, mImpl, getHandle())); - LL_INFOS("AppInit", "Capabilities") << "Launching " << coroname << " requesting seed capabilities from " << url << LL_ENDL; + LL_INFOS("AppInit", "Capabilities") << "Launching " << coroname << " requesting seed capabilities from " << url << " for region " << getRegionID() << LL_ENDL; } S32 LLViewerRegion::getNumSeedCapRetries() From fc63aa74247b9a62871cf2ee929457d68bfdf63d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Oct 2020 21:53:53 +0300 Subject: [PATCH 13/17] SL-14078 No point in verifying display name cap each frame Convoluted due to multiple workarounds. Might be a good idea to spend some time refactoring this, but for now just trottled checks. --- indra/llmessage/llavatarnamecache.cpp | 6 ++ indra/llmessage/llavatarnamecache.h | 2 + indra/newview/llappviewer.cpp | 92 +++++++++++++++------------ 3 files changed, 61 insertions(+), 39 deletions(-) diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 7380df041d..756fb940aa 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -549,6 +549,12 @@ void LLAvatarNameCache::idle() eraseUnrefreshed(); } +//static +bool LLAvatarNameCache::hasWork() +{ + return sRequestTimer.hasExpired(); +} + bool LLAvatarNameCache::isRequestPending(const LLUUID& agent_id) { bool isPending = false; diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 549d1703fa..04400490c7 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -62,6 +62,8 @@ public: // cache. Called once per frame. void idle(); + static bool hasWork(); + // If name is in cache, returns true and fills in provided LLAvatarName // otherwise returns false. static bool get(const LLUUID& agent_id, LLAvatarName *av_name); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ee055c48d4..cffa346d99 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5170,9 +5170,14 @@ void LLAppViewer::sendLogoutRequest() void LLAppViewer::idleNameCache() { + static bool cache_needs_update = true; // Neither old nor new name cache can function before agent has a region LLViewerRegion* region = gAgent.getRegion(); - if (!region) return; + if (!region) + { + cache_needs_update = true; + return; + } // deal with any queued name requests and replies. gCacheName->processPending(); @@ -5180,47 +5185,56 @@ void LLAppViewer::idleNameCache() // Can't run the new cache until we have the list of capabilities // for the agent region, and can therefore decide whether to use // display names or fall back to the old name system. - if (!region->capabilitiesReceived()) return; + if (!region->capabilitiesReceived()) + { + cache_needs_update = true; + return; + } - // Agent may have moved to a different region, so need to update cap URL - // for name lookups. Can't do this in the cap grant code, as caps are - // granted to neighbor regions before the main agent gets there. Can't - // do it in the move-into-region code because cap not guaranteed to be - // granted yet, for example on teleport. - LLAvatarNameCache *name_cache = LLAvatarNameCache::getInstance(); - bool had_capability = LLAvatarNameCache::getInstance()->hasNameLookupURL(); - std::string name_lookup_url; - name_lookup_url.reserve(128); // avoid a memory allocation below - name_lookup_url = region->getCapability("GetDisplayNames"); - bool have_capability = !name_lookup_url.empty(); - if (have_capability) - { - // we have support for display names, use it - U32 url_size = name_lookup_url.size(); - // capabilities require URLs with slashes before query params: - // https://:/cap//?ids= - // but the caps are granted like: - // https://:/cap/ - if (url_size > 0 && name_lookup_url[url_size-1] != '/') - { - name_lookup_url += '/'; - } - name_cache->setNameLookupURL(name_lookup_url); - } - else - { - // Display names not available on this region - name_cache->setNameLookupURL( std::string() ); - } + // Agent may have moved to a different region, so need to update cap URL + // for name lookups. Can't do this in the cap grant code, as caps are + // granted to neighbor regions before the main agent gets there. Can't + // do it in the move-into-region code because cap not guaranteed to be + // granted yet, for example on teleport. + // hasWork() is cache's 'idle' timer, 10 updates per second + if (LLAvatarNameCache::hasWork() || cache_needs_update) + { + cache_needs_update = false; + LLAvatarNameCache *name_cache = LLAvatarNameCache::getInstance(); + bool had_capability = name_cache->hasNameLookupURL(); + std::string name_lookup_url; + name_lookup_url.reserve(128); // avoid a memory allocation below + name_lookup_url = region->getCapability("GetDisplayNames"); + bool have_capability = !name_lookup_url.empty(); + if (have_capability) + { + // we have support for display names, use it + U32 url_size = name_lookup_url.size(); + // capabilities require URLs with slashes before query params: + // https://:/cap//?ids= + // but the caps are granted like: + // https://:/cap/ + if (url_size > 0 && name_lookup_url[url_size - 1] != '/') + { + name_lookup_url += '/'; + } + name_cache->setNameLookupURL(name_lookup_url); + } + else + { + // Display names not available on this region + name_cache->setNameLookupURL(std::string()); + } - // Error recovery - did we change state? - if (had_capability != have_capability) - { - // name tags are persistant on screen, so make sure they refresh - LLVOAvatar::invalidateNameTags(); - } + // Error recovery - did we change state? + if (had_capability != have_capability) + { + // name tags are persistant on screen, so make sure they refresh + LLVOAvatar::invalidateNameTags(); + } - name_cache->idle(); + name_cache->idle(); + } } // From 1edd38e742b571064c4acece8f29daf25a5e69bb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 12 Oct 2020 18:35:34 +0300 Subject: [PATCH 14/17] SL-14078 Maked couple functions as const --- indra/newview/llappearancemgr.cpp | 4 ++-- indra/newview/llappearancemgr.h | 2 +- indra/newview/llinventorybridge.cpp | 4 ++-- indra/newview/llinventorybridge.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 168b8eb47a..9e0ecbb605 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1957,7 +1957,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id) } // Moved from LLWearableList::ContextMenu for wider utility. -bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids) +bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids) const { // TODO: investigate wearables may not be loaded at this point EXT-8231 @@ -1967,7 +1967,7 @@ bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids) // Count given clothes (by wearable type) and objects. for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it) { - LLViewerInventoryItem* item = gInventory.getItem(*it); + const LLViewerInventoryItem* item = gInventory.getItem(*it); if (!item) { return false; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index c274a8b049..8a55a848db 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -101,7 +101,7 @@ public: bool getCanReplaceCOF(const LLUUID& outfit_cat_id); // Can we add all referenced items to the avatar? - bool canAddWearables(const uuid_vec_t& item_ids); + bool canAddWearables(const uuid_vec_t& item_ids) const; // Copy all items in a category. void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id, diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3802527ead..7f2c7c6103 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7644,11 +7644,11 @@ void LLFolderViewGroupedItemBridge::groupFilterContextMenu(folder_view_item_dequ disable_context_entries_if_present(menu, disabled_items); } -bool LLFolderViewGroupedItemBridge::canWearSelected(uuid_vec_t item_ids) +bool LLFolderViewGroupedItemBridge::canWearSelected(const uuid_vec_t item_ids) const { for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it) { - LLViewerInventoryItem* item = gInventory.getItem(*it); + const LLViewerInventoryItem* item = gInventory.getItem(*it); if (!item || (item->getType() >= LLAssetType::AT_COUNT) || (item->getType() <= LLAssetType::AT_NONE)) { return false; diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index fce7ade661..07994ca467 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -760,7 +760,7 @@ class LLFolderViewGroupedItemBridge: public LLFolderViewGroupedItemModel public: LLFolderViewGroupedItemBridge(); virtual void groupFilterContextMenu(folder_view_item_deque& selected_items, LLMenuGL& menu); - bool canWearSelected(uuid_vec_t item_ids); + bool canWearSelected(const uuid_vec_t item_ids) const; }; #endif // LL_LLINVENTORYBRIDGE_H From 0a2b748705c6e74eaff814d48b8b110c1364b45f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 12 Oct 2020 18:35:43 +0300 Subject: [PATCH 15/17] SL-14078 No point in verifying display name cap each frame #2 --- indra/llmessage/llavatarnamecache.cpp | 6 -- indra/llmessage/llavatarnamecache.h | 2 - indra/newview/llagent.cpp | 15 ++++- indra/newview/llagent.h | 2 + indra/newview/llappviewer.cpp | 90 +++++++++++++-------------- indra/newview/llappviewer.h | 4 +- 6 files changed, 62 insertions(+), 57 deletions(-) diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 756fb940aa..7380df041d 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -549,12 +549,6 @@ void LLAvatarNameCache::idle() eraseUnrefreshed(); } -//static -bool LLAvatarNameCache::hasWork() -{ - return sRequestTimer.hasExpired(); -} - bool LLAvatarNameCache::isRequestPending(const LLUUID& agent_id) { bool isPending = false; diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 04400490c7..549d1703fa 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -62,8 +62,6 @@ public: // cache. Called once per frame. void idle(); - static bool hasWork(); - // If name is in cache, returns true and fills in provided LLAvatarName // otherwise returns false. static bool get(const LLUUID& agent_id, LLAvatarName *av_name); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 166c2d67c8..04ff0e627e 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -858,6 +858,18 @@ boost::signals2::connection LLAgent::addParcelChangedCallback(parcel_changed_cal return mParcelChangedSignal.connect(cb); } +// static +void LLAgent::capabilityReceivedCallback(const LLUUID ®ion_id) +{ + LLViewerRegion* region = gAgent.getRegion(); + if (region && region->getRegionID() == region_id) + { + region->requestSimulatorFeatures(); + LLAppViewer::instance()->updateNameLookupUrl(); + } +} + + //----------------------------------------------------------------------------- // setRegion() //----------------------------------------------------------------------------- @@ -899,10 +911,11 @@ void LLAgent::setRegion(LLViewerRegion *regionp) if (regionp->capabilitiesReceived()) { regionp->requestSimulatorFeatures(); + LLAppViewer::instance()->updateNameLookupUrl(); } else { - regionp->setCapabilitiesReceivedCallback(boost::bind(&LLViewerRegion::requestSimulatorFeatures, regionp)); + regionp->setCapabilitiesReceivedCallback(LLAgent::capabilityReceivedCallback); } } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 88cce0b911..78303ee560 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -261,6 +261,8 @@ public: boost::signals2::connection addParcelChangedCallback(parcel_changed_callback_t); private: + static void capabilityReceivedCallback(const LLUUID ®ion_id); + typedef boost::signals2::signal parcel_changed_signal_t; parcel_changed_signal_t mParcelChangedSignal; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index cffa346d99..384b644dd5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5168,14 +5168,54 @@ void LLAppViewer::sendLogoutRequest() } } +void LLAppViewer::updateNameLookupUrl() +{ + LLViewerRegion* region = gAgent.getRegion(); + if (!region || !region->capabilitiesReceived()) + { + return; + } + + LLAvatarNameCache *name_cache = LLAvatarNameCache::getInstance(); + bool had_capability = LLAvatarNameCache::getInstance()->hasNameLookupURL(); + std::string name_lookup_url; + name_lookup_url.reserve(128); // avoid a memory allocation below + name_lookup_url = region->getCapability("GetDisplayNames"); + bool have_capability = !name_lookup_url.empty(); + if (have_capability) + { + // we have support for display names, use it + U32 url_size = name_lookup_url.size(); + // capabilities require URLs with slashes before query params: + // https://:/cap//?ids= + // but the caps are granted like: + // https://:/cap/ + if (url_size > 0 && name_lookup_url[url_size - 1] != '/') + { + name_lookup_url += '/'; + } + name_cache->setNameLookupURL(name_lookup_url); + } + else + { + // Display names not available on this region + name_cache->setNameLookupURL(std::string()); + } + + // Error recovery - did we change state? + if (had_capability != have_capability) + { + // name tags are persistant on screen, so make sure they refresh + LLVOAvatar::invalidateNameTags(); + } +} + void LLAppViewer::idleNameCache() { - static bool cache_needs_update = true; // Neither old nor new name cache can function before agent has a region LLViewerRegion* region = gAgent.getRegion(); if (!region) { - cache_needs_update = true; return; } @@ -5187,54 +5227,10 @@ void LLAppViewer::idleNameCache() // display names or fall back to the old name system. if (!region->capabilitiesReceived()) { - cache_needs_update = true; return; } - // Agent may have moved to a different region, so need to update cap URL - // for name lookups. Can't do this in the cap grant code, as caps are - // granted to neighbor regions before the main agent gets there. Can't - // do it in the move-into-region code because cap not guaranteed to be - // granted yet, for example on teleport. - // hasWork() is cache's 'idle' timer, 10 updates per second - if (LLAvatarNameCache::hasWork() || cache_needs_update) - { - cache_needs_update = false; - LLAvatarNameCache *name_cache = LLAvatarNameCache::getInstance(); - bool had_capability = name_cache->hasNameLookupURL(); - std::string name_lookup_url; - name_lookup_url.reserve(128); // avoid a memory allocation below - name_lookup_url = region->getCapability("GetDisplayNames"); - bool have_capability = !name_lookup_url.empty(); - if (have_capability) - { - // we have support for display names, use it - U32 url_size = name_lookup_url.size(); - // capabilities require URLs with slashes before query params: - // https://:/cap//?ids= - // but the caps are granted like: - // https://:/cap/ - if (url_size > 0 && name_lookup_url[url_size - 1] != '/') - { - name_lookup_url += '/'; - } - name_cache->setNameLookupURL(name_lookup_url); - } - else - { - // Display names not available on this region - name_cache->setNameLookupURL(std::string()); - } - - // Error recovery - did we change state? - if (had_capability != have_capability) - { - // name tags are persistant on screen, so make sure they refresh - LLVOAvatar::invalidateNameTags(); - } - - name_cache->idle(); - } + LLAvatarNameCache::getInstance()->idle(); } // diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 8f0f54de3b..4352905f7d 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -205,7 +205,9 @@ public: // llcorehttp init/shutdown/config information. LLAppCoreHttp & getAppCoreHttp() { return mAppCoreHttp; } - + + void updateNameLookupUrl(); + protected: virtual bool initWindow(); // Initialize the viewer's window. virtual void initLoggingAndGetLastDuration(); // Initialize log files, logging system From 131996176f647e710bf4625cc2f93a631be9bcb2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 12 Oct 2020 22:52:45 +0300 Subject: [PATCH 16/17] SL-14078 Small optimization --- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llinventorybridge.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 7f2c7c6103..18fbbb8650 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7644,7 +7644,7 @@ void LLFolderViewGroupedItemBridge::groupFilterContextMenu(folder_view_item_dequ disable_context_entries_if_present(menu, disabled_items); } -bool LLFolderViewGroupedItemBridge::canWearSelected(const uuid_vec_t item_ids) const +bool LLFolderViewGroupedItemBridge::canWearSelected(const uuid_vec_t& item_ids) const { for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it) { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 07994ca467..9af8664388 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -760,7 +760,7 @@ class LLFolderViewGroupedItemBridge: public LLFolderViewGroupedItemModel public: LLFolderViewGroupedItemBridge(); virtual void groupFilterContextMenu(folder_view_item_deque& selected_items, LLMenuGL& menu); - bool canWearSelected(const uuid_vec_t item_ids) const; + bool canWearSelected(const uuid_vec_t& item_ids) const; }; #endif // LL_LLINVENTORYBRIDGE_H From 8a64ded50f3d168d5ffc9df49c41a572c3439b43 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 14 Oct 2020 11:47:54 +0300 Subject: [PATCH 17/17] SL-14119 Crash at LLVolumeFace::cacheOptimize --- indra/llinventory/llinventory.h | 2 +- indra/llmath/llvolume.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 70b200e139..96659cd602 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -247,7 +247,7 @@ public: LLInventoryCategory(const LLInventoryCategory* other); void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy protected: - ~LLInventoryCategory(); + virtual ~LLInventoryCategory(); //-------------------------------------------------------------------- // Accessors And Mutators diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 7da53bf8c8..e085fa6ada 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5241,9 +5241,9 @@ public: LLVCacheTriangleData* tri = *iter; if (tri->mActive) { - tri->mScore = tri->mVertex[0]->mScore; - tri->mScore += tri->mVertex[1]->mScore; - tri->mScore += tri->mVertex[2]->mScore; + tri->mScore = tri->mVertex[0] ? tri->mVertex[0]->mScore : 0; + tri->mScore += tri->mVertex[1] ? tri->mVertex[1]->mScore : 0; + tri->mScore += tri->mVertex[2] ? tri->mVertex[2]->mScore : 0; if (!mBestTriangle || mBestTriangle->mScore < tri->mScore) {