summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/featuretable.txt2
-rw-r--r--indra/newview/featuretable_mac.txt2
-rw-r--r--indra/newview/gltfscenemanager.cpp11
-rw-r--r--indra/newview/llcallingcard.cpp2
-rw-r--r--indra/newview/lldrawable.cpp10
-rw-r--r--indra/newview/lleventpoll.cpp14
-rw-r--r--indra/newview/lllocalbitmaps.cpp6
-rw-r--r--indra/newview/llmaterialeditor.cpp11
-rw-r--r--indra/newview/llselectmgr.cpp2
-rw-r--r--indra/newview/lltoast.cpp8
-rw-r--r--indra/newview/llvoavatar.h2
-rw-r--r--indra/newview/llvoavatarself.cpp9
-rw-r--r--indra/newview/llvoavatarself.h4
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml10
14 files changed, 79 insertions, 14 deletions
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index c0009d24ee..1090dd8ffb 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 73
+version 74
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index d545962e94..3233afc28d 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 72
+version 73
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index 43e8fa3e3c..bf3fada3bd 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -69,9 +69,16 @@ void GLTFSceneManager::load()
{
return;
}
- if (filenames.size() > 0)
+ try
+ {
+ if (filenames.size() > 0)
+ {
+ GLTFSceneManager::instance().load(filenames[0]);
+ }
+ }
+ catch (std::bad_alloc&)
{
- GLTFSceneManager::instance().load(filenames[0]);
+ LLNotificationsUtil::add("CannotOpenFileTooBig");
}
},
LLFilePicker::FFLOAD_GLTF,
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 829b6380cd..76e308a966 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -504,7 +504,7 @@ void LLAvatarTracker::idleNotifyObservers()
void LLAvatarTracker::notifyObservers()
{
- if (mIsNotifyObservers)
+ if (mIsNotifyObservers || (LLStartUp::getStartupState() <= STATE_INVENTORY_CALLBACKS))
{
// Don't allow multiple calls.
// new masks and ids will be processed later from idle.
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 4921964b35..9d212cfe8b 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -253,7 +253,15 @@ void LLDrawable::cleanupReferences()
std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
mFaces.clear();
- gPipeline.unlinkDrawable(this);
+ if (gPipeline.mInitialized)
+ {
+ gPipeline.unlinkDrawable(this);
+ }
+ else if (getSpatialGroup())
+ {
+ // Not supposed to happen?
+ getSpatialGroup()->getSpatialPartition()->remove(this, getSpatialGroup());
+ }
removeFromOctree();
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index c05a7fef44..c6fea1ba82 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -101,10 +101,18 @@ namespace Details
void LLEventPollImpl::handleMessage(const LLSD& content)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
- std::string msg_name = content["message"];
+ std::string msg_name = content["message"].asString();
LLSD message;
- message["sender"] = mSenderIp;
- message["body"] = content["body"];
+ try
+ {
+ message["sender"] = mSenderIp;
+ message["body"] = content["body"];
+ }
+ catch (std::bad_alloc&)
+ {
+ LLError::LLUserWarningMsg::showOutOfMemory();
+ LL_ERRS("LLCoros") << "Bad memory allocation on message: " << msg_name << LL_ENDL;
+ }
LLMessageSystem::dispatch(msg_name, message);
}
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index f08582e860..101ee215cb 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -680,11 +680,15 @@ void LLLocalBitmap::updateGLTFMaterials(LLUUID old_id, LLUUID new_id)
// do not create a new material, reuse existing pointer
// so that mTextureEntires remains untouched
LLGLTFMaterial* render_mat = entry->getGLTFRenderMaterial();
- if (render_mat)
+ if (render_mat && render_mat != mat)
{
*render_mat = *mat;
render_mat->applyOverride(*override_mat); // can update mGLTFMaterialWithLocalTextures
}
+ else
+ {
+ LL_WARNS() << "A TE had an override, but no render material" << LL_ENDL;
+ }
}
}
}
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 1e3a328464..28160177f6 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -2857,9 +2857,16 @@ void LLMaterialEditor::importMaterial()
{
return;
}
- if (filenames.size() > 0)
+ try
{
- LLMaterialEditor::loadMaterialFromFile(filenames[0], -1);
+ if (filenames.size() > 0)
+ {
+ LLMaterialEditor::loadMaterialFromFile(filenames[0], -1);
+ }
+ }
+ catch (std::bad_alloc&)
+ {
+ LLNotificationsUtil::add("CannotOpenFileTooBig");
}
},
LLFilePicker::FFLOAD_MATERIAL,
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 6ef202cf28..1876cd3086 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -7490,7 +7490,7 @@ void LLSelectMgr::updatePointAt()
LLVector3 select_offset;
const LLPickInfo& pick = gViewerWindow->getLastPick();
LLViewerObject *click_object = pick.getObject();
- bool was_hud = pick.mPickHUD && !click_object->isHUDAttachment();
+ bool was_hud = pick.mPickHUD && click_object && !click_object->isHUDAttachment();
if (click_object && click_object->isSelected() && !was_hud)
{
// clicked on another object in our selection group, use that as target
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 84503e66a5..84854a79d4 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -436,6 +436,14 @@ void LLToast::setVisible(bool show)
void LLToast::updateHoveredState()
{
+ if (!mWrapperPanel)
+ {
+ // Shouldn't be happening.
+ // mWrapperPanel should have been inited in the constructor
+ // This needs to be figured out and fixed
+ llassert(false);
+ return;
+ }
S32 x, y;
LLUI::getInstance()->getMousePositionScreen(&x, &y);
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 263c3dadf6..a2232d21a2 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -547,7 +547,7 @@ public:
U32 renderTransparent(bool first_pass);
void renderCollisionVolumes();
void renderBones(const std::string &selected_joint = std::string());
- void renderJoints();
+ virtual void renderJoints();
static void deleteCachedImages(bool clearAll=true);
static void destroyGL();
static void restoreGL();
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 746ef7cacb..f23af5afa4 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -697,6 +697,7 @@ void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time)
// virtual
LLJoint *LLVOAvatarSelf::getJoint(const std::string &name)
{
+ std::lock_guard lock(mJointMapMutex);
LLJoint *jointp = NULL;
jointp = LLVOAvatar::getJoint(name);
if (!jointp && mScreenp)
@@ -714,6 +715,14 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name)
return jointp;
}
+
+//virtual
+void LLVOAvatarSelf::renderJoints()
+{
+ std::lock_guard lock(mJointMapMutex);
+ LLVOAvatar::renderJoints();
+}
+
// virtual
bool LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight)
{
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 051ac791c0..f9bea41b1d 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -92,6 +92,8 @@ public:
/*virtual*/ void requestStopMotion(LLMotion* motion);
/*virtual*/ LLJoint* getJoint(const std::string &name);
+ /*virtual*/ void renderJoints();
+
/*virtual*/ bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
/*virtual*/ bool setVisualParamWeight(const char* param_name, F32 weight);
/*virtual*/ bool setVisualParamWeight(S32 index, F32 weight);
@@ -103,6 +105,8 @@ private:
// helper function. Passed in param is assumed to be in avatar's parameter list.
bool setParamWeight(const LLViewerVisualParam *param, F32 weight);
+ std::mutex mJointMapMutex; // getJoint gets used from mesh thread
+
/********************************************************************************
** **
** STATE
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 4439e476a2..4245b22e88 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2408,6 +2408,16 @@ Unable to upload snapshot.
File might be too big, try reducing resolution or try again later.
<tag>fail</tag>
</notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CannotOpenFileTooBig"
+ type="alertmodal">
+Unable to open file.
+
+Viewer run out of memory while opening file. File might be too big.
+ <tag>fail</tag>
+ </notification>
<notification
icon="notifytip.tga"