SL-18720 getDataBegin() and stateSort() crashes
No repro, but likely cause is in mOctreeNode being NULL. Marked octree group as dead when destroyed and added isDead verificationmaster
parent
a22dfc28a1
commit
d8872d5273
|
|
@ -627,13 +627,17 @@ void LLViewerOctreeGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntr
|
|||
//virtual
|
||||
void LLViewerOctreeGroup::handleDestruction(const TreeNode* node)
|
||||
{
|
||||
if (isDead())
|
||||
{
|
||||
return;
|
||||
}
|
||||
setState(DEAD);
|
||||
for (OctreeNode::element_iter i = mOctreeNode->getDataBegin(); i != mOctreeNode->getDataEnd(); ++i)
|
||||
{
|
||||
LLViewerOctreeEntry* obj = *i;
|
||||
if (obj && obj->getGroup() == this)
|
||||
{
|
||||
obj->nullGroup();
|
||||
//obj->setGroup(NULL);
|
||||
}
|
||||
}
|
||||
mOctreeNode = NULL;
|
||||
|
|
|
|||
|
|
@ -2466,8 +2466,11 @@ void LLPipeline::doOcclusion(LLCamera& camera)
|
|||
for (LLCullResult::sg_iterator iter = sCull->beginOcclusionGroups(); iter != sCull->endOcclusionGroups(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
group->doOcclusion(&camera);
|
||||
group->clearOcclusionState(LLSpatialGroup::ACTIVE_OCCLUSION);
|
||||
if (!group->isDead())
|
||||
{
|
||||
group->doOcclusion(&camera);
|
||||
group->clearOcclusionState(LLSpatialGroup::ACTIVE_OCCLUSION);
|
||||
}
|
||||
}
|
||||
|
||||
//apply occlusion culling to object cache tree
|
||||
|
|
@ -2912,6 +2915,10 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
|
|||
for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
if (group->isDead())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
group->checkOcclusion();
|
||||
if (sUseOcclusion > 1 && group->isOcclusionState(LLSpatialGroup::OCCLUDED))
|
||||
{
|
||||
|
|
@ -2971,6 +2978,10 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
|
|||
for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
if (group->isDead())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
group->checkOcclusion();
|
||||
if (sUseOcclusion > 1 && group->isOcclusionState(LLSpatialGroup::OCCLUDED))
|
||||
{
|
||||
|
|
@ -3130,7 +3141,12 @@ void forAllDrawables(LLCullResult::sg_iterator begin,
|
|||
{
|
||||
for (LLCullResult::sg_iterator i = begin; i != end; ++i)
|
||||
{
|
||||
for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j)
|
||||
LLSpatialGroup* group = *i;
|
||||
if (group->isDead())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (LLSpatialGroup::element_iter j = group->getDataBegin(); j != group->getDataEnd(); ++j)
|
||||
{
|
||||
if((*j)->hasDrawable())
|
||||
{
|
||||
|
|
@ -3339,6 +3355,10 @@ void LLPipeline::postSort(LLCamera &camera)
|
|||
for (LLCullResult::sg_iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i)
|
||||
{
|
||||
LLSpatialGroup *group = *i;
|
||||
if (group->isDead())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED))
|
||||
{
|
||||
group->rebuildGeom();
|
||||
|
|
@ -3357,6 +3377,12 @@ void LLPipeline::postSort(LLCamera &camera)
|
|||
for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
|
||||
{
|
||||
LLSpatialGroup *group = *i;
|
||||
|
||||
if (group->isDead())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((sUseOcclusion && group->isOcclusionState(LLSpatialGroup::OCCLUDED)) ||
|
||||
(RenderAutoHideSurfaceAreaLimit > 0.f &&
|
||||
group->mSurfaceArea > RenderAutoHideSurfaceAreaLimit * llmax(group->mObjectBoxSize, 10.f)))
|
||||
|
|
|
|||
Loading…
Reference in New Issue