From d89b29581b668dfd241316de1a6e95bc04a52bb3 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 3 Sep 2014 17:14:34 -0700 Subject: [PATCH 1/2] remove assert in favor of warning --- libraries/entities/src/UpdateEntityOperator.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libraries/entities/src/UpdateEntityOperator.cpp b/libraries/entities/src/UpdateEntityOperator.cpp index 157e68aa70..37dfe73add 100644 --- a/libraries/entities/src/UpdateEntityOperator.cpp +++ b/libraries/entities/src/UpdateEntityOperator.cpp @@ -175,7 +175,15 @@ bool UpdateEntityOperator::preRecursion(OctreeElement* element) { // if we are the existing containing element, then we can just do the update of the entity properties if (entityTreeElement == _containingElement) { - assert(!_removeOld); // We shouldn't be in a remove old case and also be the new best fit + + // TODO: We shouldn't be in a remove old case and also be the new best fit. This indicates that + // we have some kind of a logic error in this operator. But, it can handle it properly by setting + // the new properties for the entity and moving on. Still going to output a warning that if we + // see consistently we will want to address this. + if (_removeOld) { + qDebug() << "UNEXPECTED - UpdateEntityOperator - " + "we thought we needed to removeOld, but the old entity is our best fit."; + } // set the entity properties and mark our element as changed. _existingEntity->setProperties(_properties); From e680260c897281ea6fab61035219ee47c8797fa1 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 3 Sep 2014 17:17:36 -0700 Subject: [PATCH 2/2] remove assert in favor of warning --- libraries/entities/src/UpdateEntityOperator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/entities/src/UpdateEntityOperator.cpp b/libraries/entities/src/UpdateEntityOperator.cpp index 37dfe73add..65a86a80ca 100644 --- a/libraries/entities/src/UpdateEntityOperator.cpp +++ b/libraries/entities/src/UpdateEntityOperator.cpp @@ -183,6 +183,7 @@ bool UpdateEntityOperator::preRecursion(OctreeElement* element) { if (_removeOld) { qDebug() << "UNEXPECTED - UpdateEntityOperator - " "we thought we needed to removeOld, but the old entity is our best fit."; + _removeOld = false; } // set the entity properties and mark our element as changed.