From 0e7c4046d3fde862c56b7b5255b48928fa2652e6 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 7 Apr 2008 17:28:02 +0000
Subject: * Nasty hack to reduce the incidence of spurious exceptions where a
user deletes a newly rezzed object before the persistence thread gets to it
from its queue. * This should greatly reduce but not eliminate the problem -
elimination probably requires a redesign of the prim persistence processes
---
OpenSim/Region/Environment/Scenes/Scene.cs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 101bac3..8f4c332 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2676,7 +2676,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
public void DeleteSceneObjectGroup(SceneObjectGroup group)
- {
+ {
SceneObjectPart rootPart = (group).GetChildPart(group.UUID);
if (rootPart.PhysActor != null)
{
@@ -2693,6 +2693,14 @@ namespace OpenSim.Region.Environment.Scenes
m_innerScene.RemoveAPrimCount();
}
group.DeleteParts();
+
+ // In case anybody else retains a reference to this group, signal deletion by changing the name
+ // to null. We can't zero out the UUID because this is taken from the root part, which has already
+ // been removed.
+ // FIXME: This is a really poor temporary solution, since it still leaves plenty of scope for race
+ // conditions where a user deletes an entity while it is being stored. Really, the update
+ // code needs a redesign.
+ group.Name = null;
}
///
--
cgit v1.1