From 6a1846e91acf0b003c19f2d08a6ccb13d30f39a0 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 30 Aug 2023 16:16:26 +0200 Subject: SL-18366 Crash in LLCullResult::assertDrawMapsEmpty - make the error message more informative --- indra/newview/llspatialpartition.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index c5df09d6e5..29d42b3c00 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -4076,7 +4076,8 @@ void LLCullResult::assertDrawMapsEmpty() { if (mRenderMapSize[i] != 0) { - LL_ERRS() << "Stale LLDrawInfo's in LLCullResult!" << LL_ENDL; + LL_ERRS() << "Stale LLDrawInfo's in LLCullResult!" + << " (mRenderMapSize[" << i << "] = " << mRenderMapSize[i] << ")" << LL_ENDL; } } } -- cgit v1.2.3 From 200696f25c0db21469c64b89799a2dab54d082d9 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 30 Aug 2023 16:57:36 +0200 Subject: SL-19664 Crash in LLAppViewer::initStrings - make the error message more informative --- indra/newview/llappviewer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a0135fb6e2..ed9bcd9bc6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2980,7 +2980,10 @@ void LLAppViewer::initStrings() { // initial check to make sure files are there failed gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN); - LL_ERRS() << "Viewer failed to find localization and UI files. Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL; + LL_ERRS() << "Viewer failed to find localization and UI files" + << " (strings_path_full = '" << strings_path_full << "')." + << " Please reinstall viewer from https://secondlife.com/support/downloads" + << " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL; } LLTransUtil::parseStrings(strings_file, default_trans_args); LLTransUtil::parseLanguageStrings("language_settings.xml"); -- cgit v1.2.3 From a44959c00a8ec4675d40dcd81e217f905f948735 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 1 Sep 2023 19:53:05 +0200 Subject: SL-19664 Crash in LLAppViewer::initStrings(2985) - log extended info --- indra/newview/llappviewer.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ed9bcd9bc6..ce5430104e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -36,6 +36,7 @@ #include "llenvironment.h" #include "llerrorcontrol.h" #include "lleventtimer.h" +#include "llfile.h" #include "llviewertexturelist.h" #include "llgroupmgr.h" #include "llagent.h" @@ -2978,10 +2979,31 @@ void LLAppViewer::initStrings() std::string strings_path_full = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, strings_file); if (strings_path_full.empty() || !LLFile::isfile(strings_path_full)) { + if (strings_path_full.empty()) + { + LL_WARNS() << "The file '" << strings_file << "' is not found" << LL_ENDL; + } + else + { + llstat st; + int rc = LLFile::stat(strings_path_full, &st); + if (rc != 0) + { + LL_WARNS() << "The file '" << strings_path_full << "' failed to get status. Error code: " << rc << LL_ENDL; + } + else if (S_ISDIR(st.st_mode)) + { + LL_WARNS() << "The filename '" << strings_path_full << "' is a directory name" << LL_ENDL; + } + else + { + LL_WARNS() << "The filename '" << strings_path_full << "' doesn't seem to be a regular file name" << LL_ENDL; + } + } + // initial check to make sure files are there failed gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN); - LL_ERRS() << "Viewer failed to find localization and UI files" - << " (strings_path_full = '" << strings_path_full << "')." + LL_ERRS() << "Viewer failed to find localization and UI files." << " Please reinstall viewer from https://secondlife.com/support/downloads" << " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL; } -- cgit v1.2.3 From 05c8ef3f3c002e71805bb04e9eddc3280630fca1 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Fri, 1 Sep 2023 17:36:00 -0700 Subject: SL-20167: Grey out the clipboard when copying the material to clipboard is not allowed --- indra/newview/llmaterialeditor.cpp | 8 ++++++++ indra/newview/llmaterialeditor.h | 1 + indra/newview/llpanelface.cpp | 6 ++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 54d85c87ac..8f4e0658f6 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1947,6 +1947,14 @@ bool LLMaterialEditor::canSaveObjectsMaterial() return can_use_objects_material(func, std::vector({PERM_COPY, PERM_MODIFY}), permissions, item_out); } +bool LLMaterialEditor::canClipboardObjectsMaterial() +{ + LLSelectedTEGetMatData func(true); + LLPermissions permissions; + LLViewerInventoryItem* item_out; + return can_use_objects_material(func, std::vector({PERM_COPY, PERM_MODIFY, PERM_TRANSFER}), permissions, item_out); +} + void LLMaterialEditor::saveObjectsMaterialAs() { LLSelectedTEGetMatData func(true); diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h index 6b2f49e2fc..b29db706f8 100644 --- a/indra/newview/llmaterialeditor.h +++ b/indra/newview/llmaterialeditor.h @@ -115,6 +115,7 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener static bool canModifyObjectsMaterial(); static bool canSaveObjectsMaterial(); + static bool canClipboardObjectsMaterial(); static void saveObjectsMaterialAs(); static void onCopyObjectsMaterialAsMsgCallback(const LLSD& notification, const LLSD& response, const LLPermissions& permissions, const LLUUID& object_id, const LLUUID& item_id); static void onSaveObjectsMaterialAsMsgCallback(const LLSD& notification, const LLSD& response, const LLPermissions& permissions); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index b502fa3546..d86956e370 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1975,7 +1975,8 @@ void LLPanelFace::updateCopyTexButton() LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); mMenuClipboardTexture->setEnabled(objectp && objectp->getPCode() == LL_PCODE_VOLUME && objectp->permModify() && !objectp->isPermanentEnforced() && !objectp->isInventoryPending() - && (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)); + && (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1) + && LLMaterialEditor::canClipboardObjectsMaterial()); std::string tooltip = (objectp && objectp->isInventoryPending()) ? LLTrans::getString("LoadingContents") : getString("paste_options"); mMenuClipboardTexture->setToolTip(tooltip); } @@ -4147,7 +4148,8 @@ void LLPanelFace::onCopyTexture() || objectp->getPCode() != LL_PCODE_VOLUME || !objectp->permModify() || objectp->isPermanentEnforced() - || selected_count > 1) + || selected_count > 1 + || !LLMaterialEditor::canClipboardObjectsMaterial()) { return; } -- cgit v1.2.3 From f7e6b2e2e1335a0086ccaa2cf435c388a9858236 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Sat, 2 Sep 2023 12:35:35 +0200 Subject: SL-20236 BugSplat Crash in LLVertexBuffer::validateRange(708) --- indra/newview/llvopartgroup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 3ac04cf665..99874b8185 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -572,7 +572,7 @@ void LLVOPartGroup::getGeometry(const LLViewerPart& part, up.setCross3(right, at); up.normalize3fast(); - if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK) + if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK && !part.mVelocity.isExactlyZero()) { LLVector4a normvel; normvel.load3(part.mVelocity.mV); -- cgit v1.2.3 From 8d0af77d0b931781fd44e83e672f40fdb1ee458e Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 5 Sep 2023 16:54:03 +0200 Subject: SL-19709 Fix for fullbright shiny not factoring out exposure (update) --- indra/llrender/llvertexbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index b5dda23828..de27636c33 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -703,7 +703,7 @@ bool LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of for (U32 i = start; i <= end; ++i) { - if (!v->isFinite3()) + if (!v[i].isFinite3()) { LL_ERRS() << "Non-finite vertex position data detected." << LL_ENDL; } -- cgit v1.2.3 From acc7f6a271ce7695fd681ae67dd4071ad5246f10 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 4 Sep 2023 17:08:43 +0300 Subject: SL-18125 Fixed default upload permissions being ignored --- indra/newview/llmaterialeditor.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 54d85c87ac..daf6fdb20d 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1197,10 +1197,16 @@ bool LLMaterialEditor::saveIfNeeded() } else { - //make a new inventory item - std::string res_desc = buildMaterialDescription(); + // Make a new inventory item and set upload permissions LLPermissions local_permissions; local_permissions.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); + + U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Materials"); + U32 group_perm = LLFloaterPerms::getGroupPerms("Materials"); + U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials"); + local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm); + + std::string res_desc = buildMaterialDescription(); createInventoryItem(buffer, mMaterialName, res_desc, local_permissions); // We do not update floater with uploaded asset yet, so just close it. -- cgit v1.2.3 From 88a4d1f5d30bd354d9e9813c2fb3bc3f140256f4 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 5 Sep 2023 16:59:27 +0200 Subject: SL-19655 Remove a couple unused debug settings and related code (update) --- 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 3c71d3e49d..cec1f47a4c 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1174,7 +1174,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (gDebugGL) { - llassert(false); LL_WARNS() << "Index buffer overflow!" << LL_ENDL; LL_WARNS() << "Indices Count: " << mIndicesCount << " VF Num Indices: " << num_indices @@ -1182,6 +1181,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, << " VB Num Indices: " << mVertexBuffer->getNumIndices() << LL_ENDL; LL_WARNS() << " Face Index: " << f << " Pool Type: " << mPoolType << LL_ENDL; + llassert(false); } return FALSE; } @@ -1190,8 +1190,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (gDebugGL) { - llassert(false); LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL; + llassert(false); } return FALSE; } -- cgit v1.2.3 From ab66df94cb7c4cc9a4530ea547aaf81dddec34de Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 6 Sep 2023 11:02:31 -0700 Subject: SL-20167: Also check permission on paste to be certain --- indra/newview/llpanelface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index d86956e370..df464bc7e5 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -4344,7 +4344,8 @@ void LLPanelFace::onPasteTexture() || objectp->getPCode() != LL_PCODE_VOLUME || !objectp->permModify() || objectp->isPermanentEnforced() - || selected_count > 1) + || selected_count > 1 + || !LLMaterialEditor::canClipboardObjectsMaterial()) { // not supposed to happen LL_WARNS() << "Failed to paste texture due to missing or wrong selection" << LL_ENDL; -- cgit v1.2.3 From c0bcc3740ea4c6662f9707d49ab5c7132bb2a0a8 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 6 Sep 2023 11:47:34 -0700 Subject: SL-20167: Don't block clipboard if GLTF material is null --- indra/newview/llmaterialeditor.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 8f4e0658f6..d4ea725af7 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1949,6 +1949,24 @@ bool LLMaterialEditor::canSaveObjectsMaterial() bool LLMaterialEditor::canClipboardObjectsMaterial() { + if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 1) + { + return false; + } + + struct LLSelectedTEGetNullMat : public LLSelectedTEFunctor + { + bool apply(LLViewerObject* objectp, S32 te_index) + { + return objectp->getRenderMaterialID(te_index).isNull(); + } + } null_func; + + if (LLSelectMgr::getInstance()->getSelection()->applyToTEs(&null_func)) + { + return true; + } + LLSelectedTEGetMatData func(true); LLPermissions permissions; LLViewerInventoryItem* item_out; -- cgit v1.2.3