From 8617e974272c71c768942e8e25e7e1761c003fb9 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 6 Mar 2018 11:32:28 +0200 Subject: [PATCH 1/7] MAINT-8342 FIXED [maint-viewer] Viewer crash when click Take off in Temporary attachments --- indra/newview/llpanelwearing.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 75c8765c5b..89cb495db9 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -342,7 +342,11 @@ bool LLPanelWearing::isActionEnabled(const LLSD& userdata) } else { - return mTempItemsList->hasSelectedItem(); + LLScrollListItem* item = mTempItemsList->getFirstSelected(); + if (item && item->getUUID().notNull()) + { + return true; + } } } @@ -524,7 +528,7 @@ void LLPanelWearing::onEditAttachment() void LLPanelWearing::onRemoveAttachment() { LLScrollListItem* item = mTempItemsList->getFirstSelected(); - if (item) + if (item && item->getUUID().notNull()) { LLSelectMgr::getInstance()->deselectAll(); LLSelectMgr::getInstance()->selectObjectAndFamily(mAttachmentsMap[item->getUUID()]); From 4156fb832c02f8ca07620ad9e0b0960320d57806 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 6 Mar 2018 12:59:32 +0000 Subject: [PATCH 2/7] MAINT-6363 Normal and specular maps should not be downloaded if ALM is off --- indra/llrender/llgltexture.h | 1 + indra/newview/lltextureview.cpp | 4 ++-- indra/newview/llviewerobject.cpp | 8 ++++---- indra/newview/llviewertexture.cpp | 17 ++++++++++++++--- indra/newview/llviewertexturelist.cpp | 6 ++++++ indra/newview/llvovolume.cpp | 4 ++-- 6 files changed, 29 insertions(+), 11 deletions(-) diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h index 45592ee077..70610d9626 100644 --- a/indra/llrender/llgltexture.h +++ b/indra/llrender/llgltexture.h @@ -49,6 +49,7 @@ public: enum EBoostLevel { BOOST_NONE = 0, + BOOST_ALM , //acts like NONE when ALM is on, max discard when ALM is off BOOST_AVATAR_BAKED , BOOST_AVATAR , BOOST_CLOUDS , diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index b7786bcdd7..b504e50cf4 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -173,9 +173,9 @@ void LLTextureBar::draw() { color = LLColor4::green4; } - else if (mImagep->getBoostLevel() > LLGLTexture::BOOST_NONE) + else if (mImagep->getBoostLevel() > LLGLTexture::BOOST_ALM) { - color = LLColor4::magenta; + color = LLColor4::magenta; // except none and alm } else if (mImagep->getDecodePriority() <= 0.0f) { diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 5d49c888cf..624c48e945 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4376,10 +4376,10 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry &texture_entry) if (getTE(te)->getMaterialParams().notNull()) { const LLUUID& norm_id = getTE(te)->getMaterialParams()->getNormalID(); - mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE); const LLUUID& spec_id = getTE(te)->getMaterialParams()->getSpecularID(); - mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE); } } @@ -4502,14 +4502,14 @@ S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid) S32 LLViewerObject::setTENormalMap(const U8 te, const LLUUID& uuid) { LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture( - uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); + uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); return setTENormalMapCore(te, image); } S32 LLViewerObject::setTESpecularMap(const U8 te, const LLUUID& uuid) { LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture( - uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); + uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); return setTESpecularMapCore(te, image); } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 2ad6198abd..39ffbfc989 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -718,6 +718,7 @@ void LLViewerTexture::setBoostLevel(S32 level) { mBoostLevel = level; if(mBoostLevel != LLViewerTexture::BOOST_NONE && + mBoostLevel != LLViewerTexture::BOOST_ALM && mBoostLevel != LLViewerTexture::BOOST_SELECTED && mBoostLevel != LLViewerTexture::BOOST_ICON) { @@ -1557,6 +1558,10 @@ void LLViewerFetchedTexture::processTextureStats() { mDesiredDiscardLevel = 0; } + else if (!LLPipeline::sRenderDeferred && mBoostLevel == LLGLTexture::BOOST_ALM) + { + mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; + } else if (mDontDiscard && mBoostLevel == LLGLTexture::BOOST_ICON) { if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) @@ -1824,8 +1829,9 @@ void LLViewerFetchedTexture::updateVirtualSize() { if(drawable->isRecentlyVisible()) { - if (getBoostLevel() == LLViewerTexture::BOOST_NONE && - drawable->getVObj() && drawable->getVObj()->isSelected()) + if ((getBoostLevel() == LLViewerTexture::BOOST_NONE || getBoostLevel() == LLViewerTexture::BOOST_ALM) + && drawable->getVObj() + && drawable->getVObj()->isSelected()) { setBoostLevel(LLViewerTexture::BOOST_SELECTED); } @@ -1842,6 +1848,7 @@ void LLViewerFetchedTexture::updateVirtualSize() if (getBoostLevel() == LLViewerTexture::BOOST_SELECTED && gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME) { + // Could have been BOOST_ALM, but if user was working with this texture, better keep it as NONE setBoostLevel(LLViewerTexture::BOOST_NONE); } @@ -2115,7 +2122,7 @@ bool LLViewerFetchedTexture::updateFetch() // Load the texture progressively: we try not to rush to the desired discard too fast. // If the camera is not moving, we do not tweak the discard level notch by notch but go to the desired discard with larger boosted steps // This mitigates the "textures stay blurry" problem when loading while not killing the texture memory while moving around - S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_NONE) ? 2 : 1; + S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_ALM) ? 2 : 1; if (current_discard < 0) { desired_discard = llmax(desired_discard, getMaxDiscardLevel() - delta_level); @@ -3127,6 +3134,10 @@ void LLViewerLODTexture::processTextureStats() if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048 } + else if (!LLPipeline::sRenderDeferred && mBoostLevel == LLGLTexture::BOOST_ALM) + { + mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; + } else if (mBoostLevel < LLGLTexture::BOOST_HIGH && mMaxVirtualSize <= 10.f) { // If the image has not been significantly visible in a while, we don't want it diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 45ea169fb8..4308405c64 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -509,6 +509,12 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, LLPointer imagep = findImage(image_id, get_element_type(boost_priority)); if (!imagep.isNull()) { + if (boost_priority != LLViewerTexture::BOOST_ALM && imagep->getBoostLevel() == LLViewerTexture::BOOST_ALM) + { + // Workaround: we need BOOST_ALM texture for something, 'rise' to NONE + imagep->setDecodePriority(LLViewerTexture::BOOST_NONE); + } + LLViewerFetchedTexture *texture = imagep.get(); if (request_from_host.isOk() && !texture->getTargetHost().isOk()) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 9958657246..9b0d9f4a7b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -830,7 +830,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) { LLLightImageParams* params = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); LLUUID id = params->getLightTexture(); - mLightTexture = LLViewerTextureManager::getFetchedTexture(id); + mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM); if (mLightTexture.notNull()) { F32 rad = getLightRadius(); @@ -3088,7 +3088,7 @@ LLViewerTexture* LLVOVolume::getLightTexture() { if (mLightTexture.isNull() || id != mLightTexture->getID()) { - mLightTexture = LLViewerTextureManager::getFetchedTexture(id); + mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM); } } else From 2093275ad500a64db7bb14ff5a530fe0386890a2 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 6 Mar 2018 16:23:29 +0200 Subject: [PATCH 3/7] MAINT-5165 Don't show 'Maketplace listings' folder --- indra/newview/llinventorymodel.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 60f470a938..556af93963 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -344,13 +344,23 @@ LLViewerInventoryCategory* LLInventoryModel::getCategory(const LLUUID& id) const bool LLInventoryModel::isCategoryHidden(const LLUUID& id) const { + bool res = false; const LLViewerInventoryCategory* category = getCategory(id); if (category) { LLFolderType::EType cat_type = category->getPreferredType(); - return (cat_type == LLFolderType::FT_INBOX || cat_type == LLFolderType::FT_OUTBOX); + switch (cat_type) + { + case LLFolderType::FT_INBOX: + case LLFolderType::FT_OUTBOX: + case LLFolderType::FT_MARKETPLACE_LISTINGS: + res = true; + break; + default: + break; + } } - return false; + return res; } S32 LLInventoryModel::getItemCount() const From 20d7f6672274e2cb66279d54d340926f58dc6682 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 7 Mar 2018 17:26:51 +0200 Subject: [PATCH 4/7] MAINT-3399 Hairbase renders incorrectly in edit appearance mode --- indra/newview/llvoavatar.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 966fe45e34..d7a24c6823 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7366,13 +7366,11 @@ void LLVOAvatar::updateMeshTextures() debugColorizeSubMeshes(i,LLColor4::blue); } } - static LLUUID default_alpha_uuid = LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")); - bool hair_alpha_exists = (getImage(TEX_HAIR_ALPHA, 0) && getImage(TEX_HAIR_ALPHA, 0)->getID() != default_alpha_uuid); // set texture and color of hair manually if we are not using a baked image. // This can happen while loading hair for yourself, or for clients that did not // bake a hair texture. Still needed for yourself after 1.22 is depricated. - if (!is_layer_baked[BAKED_HAIR] || (isEditingAppearance() && !hair_alpha_exists)) + if (!is_layer_baked[BAKED_HAIR]) { const LLColor4 color = mTexHairColor ? mTexHairColor->getColor() : LLColor4(1,1,1,1); LLViewerTexture* hair_img = getImage( TEX_HAIR, 0 ); From 69d87dfb630032707ca1a14b8aa7e54218477ead Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 7 Mar 2018 20:31:29 +0200 Subject: [PATCH 5/7] MAINT-8364 Fix for requestAvatarNameCache_ crash --- indra/llmessage/llavatarnamecache.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index abe0e46e5d..ba1a2a035e 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -192,13 +192,21 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector Date: Fri, 9 Mar 2018 17:26:41 +0200 Subject: [PATCH 6/7] MAINT-8366 FIXED "Report Abuse" preview screenshot all black --- indra/newview/llfloaterreporter.cpp | 21 ++++++++++++--------- indra/newview/llfloaterreporter.h | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 3a3660bb31..a320bcc6fc 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -162,9 +162,9 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key) mPosition(), mCopyrightWarningSeen( FALSE ), mResourceDatap(new LLResourceData()), - mAvatarNameCacheConnection(), - mSnapshotTimer() + mAvatarNameCacheConnection() { + gIdleCallbacks.addFunction(onIdle, this); } // virtual @@ -225,6 +225,7 @@ LLFloaterReporter::~LLFloaterReporter() { mAvatarNameCacheConnection.disconnect(); } + gIdleCallbacks.deleteFunction(onIdle, this); // child views automatically deleted mObjectID = LLUUID::null; @@ -242,15 +243,17 @@ LLFloaterReporter::~LLFloaterReporter() delete mResourceDatap; } -// virtual -void LLFloaterReporter::draw() +void LLFloaterReporter::onIdle(void* user_data) { - LLFloater::draw(); - static LLCachedControl screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay"); - if (mSnapshotTimer.getStarted() && mSnapshotTimer.getElapsedTimeF32() > screenshot_delay) + LLFloaterReporter* floater_reporter = (LLFloaterReporter*)user_data; + if (floater_reporter) { - mSnapshotTimer.stop(); - takeNewSnapshot(); + static LLCachedControl screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay"); + if (floater_reporter->mSnapshotTimer.getStarted() && floater_reporter->mSnapshotTimer.getElapsedTimeF32() > screenshot_delay) + { + floater_reporter->mSnapshotTimer.stop(); + floater_reporter->takeNewSnapshot(); + } } } diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index f5ba63ce7f..d9ecb9f4ea 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -83,7 +83,8 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); - virtual void draw(); + + static void onIdle(void* user_data); void setReportType(EReportType type) { mReportType = type; } From 5c62ea3e0890a3c86280e4808dac5fc5276731ac Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 9 Mar 2018 16:57:47 +0200 Subject: [PATCH 7/7] MAINT-8362 Don't reconnect voice while in teleport --- indra/newview/llvoicevivox.cpp | 41 +++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 6e5a5e3084..838de48308 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -643,7 +643,13 @@ void LLVivoxVoiceClient::voiceControlCoro() { mIsCoroutineActive = true; LLCoros::set_consuming(true); - + + while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) + { + LL_INFOS("Voice") << "Suspending voiceControlCoro() due to teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL; + llcoro::suspendUntilTimeout(1.0); + } + do { @@ -665,7 +671,7 @@ void LLVivoxVoiceClient::voiceControlCoro() // and then reconstruct the voice connecion from scratch. if (mRelogRequested) { - while (isGatewayRunning()) + while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) { llcoro::suspendUntilTimeout(1.0); } @@ -1302,7 +1308,7 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) mAudioSession = nextSession; mAudioSessionChanged = true; - if (!mAudioSession->mReconnect) + if (!mAudioSession || !mAudioSession->mReconnect) { mNextAudioSession.reset(); } @@ -1310,16 +1316,19 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) // The old session may now need to be deleted. reapSession(oldSession); - if (!mAudioSession->mHandle.empty()) + if (mAudioSession) { - // Connect to a session by session handle + if (!mAudioSession->mHandle.empty()) + { + // Connect to a session by session handle - sessionMediaConnectSendMessage(mAudioSession); - } - else - { - // Connect to a session by URI - sessionCreateSendMessage(mAudioSession, true, false); + sessionMediaConnectSendMessage(mAudioSession); + } + else + { + // Connect to a session by URI + sessionCreateSendMessage(mAudioSession, true, false); + } } notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING); @@ -1384,6 +1393,11 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) LL_INFOS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL; if (result.has("session")) { + if (!mAudioSession) + { + LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while session is not initialized." << LL_ENDL; + continue; + } if (result.has("handle") && result["handle"] != mAudioSession->mHandle) { LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while waiting for \"" << mAudioSession->mHandle << "\"." << LL_ENDL; @@ -1722,6 +1736,11 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session) { if (result.has("handle")) { + if (!mAudioSession) + { + LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while session is not initiated." << LL_ENDL; + continue; + } if (result["handle"] != mAudioSession->mHandle) { LL_WARNS("Voice") << "Message for session handle \"" << result["handle"] << "\" while waiting for \"" << mAudioSession->mHandle << "\"." << LL_ENDL;