From 1ca2a8167b70e28af148071c14819920d4285092 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 6 Oct 2025 11:33:34 -0400 Subject: [PATCH 1/5] Fix uninitialized use of mIsReuseInitialized in LLFloater --- indra/llui/llfloater.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 49c83e63ecb..5be78ff302b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -270,6 +270,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mTitle(p.title), mShortTitle(p.short_title), mSingleInstance(p.single_instance), + mIsReuseInitialized(p.reuse_instance.isProvided()), mReuseInstance(p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance), // reuse single-instance floaters by default mKey(key), mCanTearOff(p.can_tear_off), @@ -3515,6 +3516,7 @@ void LLFloater::initFromParams(const LLFloater::Params& p) mHeaderHeight = p.header_height; mLegacyHeaderHeight = p.legacy_header_height; mSingleInstance = p.single_instance; + mIsReuseInitialized = p.reuse_instance.isProvided(); mReuseInstance = p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance; mDefaultRelativeX = p.rel_x; From 323ccf1ac41433a0802957f5c39d648f2b95d06c Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 6 Oct 2025 11:33:48 -0400 Subject: [PATCH 2/5] Fix leak of LLUUID in ui preview floater --- indra/newview/llfloateruipreview.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index f60ce425d4b..f9c788bc1c1 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -702,13 +702,9 @@ void LLFloaterUIPreview::refreshList() // Note: no deduplification (shouldn't be necessary) void LLFloaterUIPreview::addFloaterEntry(const std::string& path) { - LLUUID* entry_id = new LLUUID(); // create a new UUID - entry_id->generate(path); - const LLUUID& entry_id_ref = *entry_id; // get a reference to the UUID for the LLSD block - // fill LLSD column entry: initialize row/col structure LLSD row; - row["id"] = entry_id_ref; + row["id"] = LLUUID::generateNewID(path); // create a new UUID LLSD& columns = row["columns"]; // Get name of floater: From 2e7ce83a2d6016eef25fc3cbe7f93251f98a9d8c Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 6 Oct 2025 11:56:33 -0400 Subject: [PATCH 3/5] Fix various uninitialized variable warnings from ubsan --- indra/newview/llinventorygallery.cpp | 1 + indra/newview/lllocationinputctrl.h | 2 +- indra/newview/llmediactrl.cpp | 4 ---- indra/newview/llmediactrl.h | 1 - indra/newview/llnetmap.cpp | 1 + indra/newview/llreflectionmapmanager.h | 1 - indra/newview/llscrollingpanelparambase.h | 6 +++--- indra/newview/llvoavatar.h | 4 ++-- 8 files changed, 8 insertions(+), 12 deletions(-) diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index a4cb6ea65d7..74e8f9b91d9 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -2768,6 +2768,7 @@ static LLDefaultChildRegistry::Register r("inventory_gal LLInventoryGalleryItem::LLInventoryGalleryItem(const Params& p) : LLPanel(p), mSelected(false), + mWorn(false), mDefaultImage(true), mItemName(""), mWornSuffix(""), diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index aedb965a299..d345b9a2dd5 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -210,7 +210,7 @@ class LLLocationInputCtrl std::string mEditLandmarkTooltip; // this field holds a human-readable form of the location string, it is needed to be able to compare copy-pated value and real location std::string mHumanReadableLocation; - bool isHumanReadableLocationVisible; + bool isHumanReadableLocationVisible = true; std::string mMaturityHelpTopic; }; diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index c7b60b2fd56..809628cf6c2 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -1030,10 +1030,6 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) case MEDIA_EVENT_NAVIGATE_COMPLETE: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL; - if(mHidingInitialLoad) - { - mHidingInitialLoad = false; - } }; break; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index a644ef30719..d2735a009b2 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -202,7 +202,6 @@ class LLMediaCtrl : mStretchToFill, mMaintainAspectRatio, mHideLoading, - mHidingInitialLoad, mClearCache, mHoverTextChanged, mDecoupleTextureSize, diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index fa692b640ea..0c96c239026 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -105,6 +105,7 @@ LLNetMap::LLNetMap (const Params & p) mPopupWorldPos(0.f, 0.f, 0.f), mMouseDown(0, 0), mPanning(false), + mCentering(false), mObjectImageCenterGlobal( gAgentCamera.getCameraPositionGlobal() ), mObjectRawImagep(), mObjectImagep(), diff --git a/indra/newview/llreflectionmapmanager.h b/indra/newview/llreflectionmapmanager.h index 5daed7d1cf1..9e55f5c6ea2 100644 --- a/indra/newview/llreflectionmapmanager.h +++ b/indra/newview/llreflectionmapmanager.h @@ -269,7 +269,6 @@ class alignas(16) LLReflectionMapManager bool mReset = false; float mResetFade = 1.f; - float mGlobalFadeTarget = 1.f; // if true, only update the default probe bool mPaused = false; diff --git a/indra/newview/llscrollingpanelparambase.h b/indra/newview/llscrollingpanelparambase.h index d5477a83975..cfe24d0f51a 100644 --- a/indra/newview/llscrollingpanelparambase.h +++ b/indra/newview/llscrollingpanelparambase.h @@ -53,11 +53,11 @@ class LLScrollingPanelParamBase : public LLScrollingPanel F32 percentToWeight( F32 percent ); public: - LLViewerVisualParam* mParam; + LLViewerVisualParam* mParam = nullptr; protected: LLUICtrl* mParamSlider = nullptr; - bool mAllowModify; - LLWearable *mWearable; + bool mAllowModify = false; + LLWearable *mWearable = nullptr; }; #endif diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 57de2d72768..7fc601d5a23 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -1028,7 +1028,7 @@ class LLVOAvatar : void startTyping() { mTyping = true; mTypingTimer.reset(); } void stopTyping() { mTyping = false; } private: - bool mVisibleChat; + bool mVisibleChat = false; //-------------------------------------------------------------------- // Lip synch morphs @@ -1211,7 +1211,7 @@ class LLVOAvatar : static F32 sGreyUpdateTime; // Last time stats were updated (to prevent multiple updates per frame) protected: S32 getUnbakedPixelAreaRank(); - bool mHasGrey; + bool mHasGrey = false; private: F32 mMinPixelArea; F32 mMaxPixelArea; From 911e70344cc2f592662272d3b3a54ce5e9e8508b Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 6 Oct 2025 11:56:42 -0400 Subject: [PATCH 4/5] Fix broken mutex lock during model upload --- indra/newview/llmodelpreview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index f3c476a41dc..b3168923fc1 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -3637,7 +3637,7 @@ bool LLModelPreview::render() LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread; if (decomp) { - LLMutexLock(decomp->mMutex); + LLMutexLock decomp_lock(decomp->mMutex); LLModel::Decomposition& physics = model->mPhysics; @@ -3758,7 +3758,7 @@ bool LLModelPreview::render() LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread; if (decomp) { - LLMutexLock(decomp->mMutex); + LLMutexLock decomp_lock(decomp->mMutex); LLModel::Decomposition& physics = model->mPhysics; From 3727a092f403b413c0a3d55cf2fe7468026ca8f4 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 6 Oct 2025 11:57:03 -0400 Subject: [PATCH 5/5] Fix nullptr crash if converting to upload file fails for texture --- indra/newview/llviewertexturelist.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 44119e25b93..93aabec1a1d 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1400,6 +1400,11 @@ bool LLViewerTextureList::createUploadFile(LLPointer raw_image, raw_image->getComponents()); LLPointer compressedImage = LLViewerTextureList::convertToUploadFile(scale_image, max_image_dimentions); + if (compressedImage.isNull()) + { + LL_INFOS() << "Couldn't convert to j2c, file : " << out_filename << LL_ENDL; + return false; + } if (compressedImage->getWidth() < min_image_dimentions || compressedImage->getHeight() < min_image_dimentions) { std::string reason = llformat("Images below %d x %d pixels are not allowed. Actual size: %d x %dpx", @@ -1410,12 +1415,6 @@ bool LLViewerTextureList::createUploadFile(LLPointer raw_image, compressedImage->setLastError(reason); return false; } - if (compressedImage.isNull()) - { - compressedImage->setLastError("Couldn't convert the image to jpeg2000."); - LL_INFOS() << "Couldn't convert to j2c, file : " << out_filename << LL_ENDL; - return false; - } if (!compressedImage->save(out_filename)) { compressedImage->setLastError("Couldn't create the jpeg2000 image for upload.");