summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-02-09 14:19:31 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-02-09 14:19:31 +0200
commitbd786ada4f773b0ba13536f26a7858bd9ad69791 (patch)
treece884962fa6b5a5a1d342c42b667a7a73f9512fc
parentb10e46167b7aa3b44c4d2fb3fcdcbdc4f6e11096 (diff)
MAINT-8279 Fix for crash on unset pcode
-rw-r--r--indra/newview/llviewerobjectlist.cpp24
-rw-r--r--indra/newview/llviewerpartsim.cpp4
2 files changed, 19 insertions, 9 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index fede9a792f..dc54346d59 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -478,15 +478,25 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
{
U32 flags = 0;
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
-
- if(flags & FLAGS_TEMPORARY_ON_REZ)
+
+ compressed_dp.unpackUUID(fullid, "ID");
+ compressed_dp.unpackU32(local_id, "LocalID");
+ compressed_dp.unpackU8(pcode, "PCode");
+
+ if (pcode == 0)
{
- compressed_dp.unpackUUID(fullid, "ID");
- compressed_dp.unpackU32(local_id, "LocalID");
- compressed_dp.unpackU8(pcode, "PCode");
- }
- else //send to object cache
+ // object creation will fail, LLViewerObject::createObject()
+ LL_WARNS() << "Received object " << fullid
+ << " with 0 PCode. Local id: " << local_id
+ << " Flags: " << flags
+ << " Region: " << regionp->getName()
+ << " Region id: " << regionp->getRegionID() << LL_ENDL;
+ recorder.objectUpdateFailure(local_id, update_type, msg_size);
+ continue;
+ }
+ else if ((flags & FLAGS_TEMPORARY_ON_REZ) == 0)
{
+ //send to object cache
regionp->cacheFullUpdate(compressed_dp, flags);
continue;
}
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index b066793e3d..25cf082751 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -756,7 +756,7 @@ void LLViewerPartSim::updateSimulation()
LLViewerObject* vobj = mViewerPartGroups[i]->mVOPartGroupp;
S32 visirate = 1;
- if (vobj)
+ if (vobj && !vobj->isDead() && vobj->mDrawable && !vobj->mDrawable->isDead())
{
LLSpatialGroup* group = vobj->mDrawable->getSpatialGroup();
if (group && !group->isVisible()) // && !group->isState(LLSpatialGroup::OBJECT_DIRTY))
@@ -767,7 +767,7 @@ void LLViewerPartSim::updateSimulation()
if ((LLDrawable::getCurrentFrame()+mViewerPartGroups[i]->mID)%visirate == 0)
{
- if (vobj)
+ if (vobj && !vobj->isDead())
{
gPipeline.markRebuild(vobj->mDrawable, LLDrawable::REBUILD_ALL, TRUE);
}