From 5309fb6a43dbf9183f55087a1a5393dfe8e2f9fc Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Sun, 11 Jan 2015 10:44:36 -0800 Subject: [PATCH 1/4] remove lock at EntityTreeRenderer::loadEntityScript --- libraries/entities-renderer/src/EntityTreeRenderer.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/libraries/entities-renderer/src/EntityTreeRenderer.cpp b/libraries/entities-renderer/src/EntityTreeRenderer.cpp index 3518e7b75c..47e9237ddc 100644 --- a/libraries/entities-renderer/src/EntityTreeRenderer.cpp +++ b/libraries/entities-renderer/src/EntityTreeRenderer.cpp @@ -98,9 +98,7 @@ void EntityTreeRenderer::init() { } QScriptValue EntityTreeRenderer::loadEntityScript(const EntityItemID& entityItemID) { - _tree->lockForRead(); EntityItem* entity = static_cast(_tree)->findEntityByEntityItemID(entityItemID); - _tree->unlock(); return loadEntityScript(entity); } From 60f55c7f3fd3f4dcaa1a30a3e5ffd6dd33753423 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Sun, 11 Jan 2015 12:07:16 -0800 Subject: [PATCH 2/4] remove important code from assert so it still runs in release build --- libraries/entities/src/DeleteEntityOperator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/entities/src/DeleteEntityOperator.cpp b/libraries/entities/src/DeleteEntityOperator.cpp index 890c301682..698ef18936 100644 --- a/libraries/entities/src/DeleteEntityOperator.cpp +++ b/libraries/entities/src/DeleteEntityOperator.cpp @@ -92,7 +92,8 @@ bool DeleteEntityOperator::preRecursion(OctreeElement* element) { // and we can stop searching. if (entityTreeElement == details.containingElement) { EntityItem* theEntity = details.entity; - assert(entityTreeElement->removeEntityItem(theEntity)); // remove it from the element + bool entityDeleted = entityTreeElement->removeEntityItem(theEntity); // remove it from the element + assert(entityDeleted); _tree->setContainingElement(details.entity->getEntityItemID(), NULL); // update or id to element lookup _foundCount++; } From 89a782c55a70701d58101c1b6131e8787bc6b7f6 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Sun, 11 Jan 2015 13:31:37 -0800 Subject: [PATCH 3/4] remove functional code from inside assert --- libraries/entities/src/UpdateEntityOperator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/entities/src/UpdateEntityOperator.cpp b/libraries/entities/src/UpdateEntityOperator.cpp index c85c4235de..29ed430f7a 100644 --- a/libraries/entities/src/UpdateEntityOperator.cpp +++ b/libraries/entities/src/UpdateEntityOperator.cpp @@ -239,7 +239,7 @@ bool UpdateEntityOperator::preRecursion(OctreeElement* element) { if (oldElement != _containingElement) { qDebug() << "WARNING entity moved during UpdateEntityOperator recursion"; - assert(! _containingElement->removeEntityItem(_existingEntity)); + _containingElement->removeEntityItem(_existingEntity); } if (_wantDebug) { From 69f5c769b8c4f930e3b02c19e644223adee9203b Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 12 Jan 2015 10:07:20 -0800 Subject: [PATCH 4/4] don't play muzak from lobby to avoid error --- examples/lobby.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/lobby.js b/examples/lobby.js index b03be7c29b..e34d119502 100644 --- a/examples/lobby.js +++ b/examples/lobby.js @@ -139,10 +139,10 @@ function drawLobby() { MyAvatar.attach(HELMET_ATTACHMENT_URL, "Neck", {x: 0, y: 0, z: 0}, Quat.fromPitchYawRollDegrees(0, 0, 0), 1.15); // start the drone sound - currentDrone = Audio.playSound(droneSound, { stereo: true, loop: true, localOnly: true, volume: DRONE_VOLUME }); + // currentDrone = Audio.playSound(droneSound, { stereo: true, loop: true, localOnly: true, volume: DRONE_VOLUME }); // start one of our muzak sounds - playRandomMuzak(); + // playRandomMuzak(); } } @@ -353,9 +353,9 @@ function update(deltaTime) { Overlays.editOverlay(descriptionText, { position: textOverlayPosition() }); // if the reticle is up then we may need to play the next muzak - if (!Audio.isInjectorPlaying(currentMuzakInjector)) { - playNextMuzak(); - } + // if (!Audio.isInjectorPlaying(currentMuzakInjector)) { +// playNextMuzak(); +// } } }