aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-07 17:28:02 +0000
committerJustin Clarke Casey2008-04-07 17:28:02 +0000
commit0e7c4046d3fde862c56b7b5255b48928fa2652e6 (patch)
tree5f41ba1ddaf33ebf9d7aea50cc94aa13c0db7d3b /OpenSim
parent* Minor: log message correction (diff)
downloadopensim-SC_OLD-0e7c4046d3fde862c56b7b5255b48928fa2652e6.zip
opensim-SC_OLD-0e7c4046d3fde862c56b7b5255b48928fa2652e6.tar.gz
opensim-SC_OLD-0e7c4046d3fde862c56b7b5255b48928fa2652e6.tar.bz2
opensim-SC_OLD-0e7c4046d3fde862c56b7b5255b48928fa2652e6.tar.xz
* 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
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs7
3 files changed, 22 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 9a720d9..ef98599 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -236,7 +236,15 @@ namespace OpenSim.Region.Environment.Scenes
236 // Don't abort the whole update if one entity happens to give us an exception. 236 // Don't abort the whole update if one entity happens to give us an exception.
237 try 237 try
238 { 238 {
239 m_updateList[i].Update(); 239 // A null name signals that this group was deleted before the scheduled update
240 // FIXME: This is merely a temporary measure to reduce the incidence of failure, when
241 // an object has been deleted from a scene before update was processed.
242 // A more fundamental overhaul of the update mechanism is required to eliminate all
243 // the race conditions.
244 if (entity.Name != null)
245 {
246 m_updateList[i].Update();
247 }
240 } 248 }
241 catch (Exception e) 249 catch (Exception e)
242 { 250 {
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
2676 /// </summary> 2676 /// </summary>
2677 /// <param name="group"></param> 2677 /// <param name="group"></param>
2678 public void DeleteSceneObjectGroup(SceneObjectGroup group) 2678 public void DeleteSceneObjectGroup(SceneObjectGroup group)
2679 { 2679 {
2680 SceneObjectPart rootPart = (group).GetChildPart(group.UUID); 2680 SceneObjectPart rootPart = (group).GetChildPart(group.UUID);
2681 if (rootPart.PhysActor != null) 2681 if (rootPart.PhysActor != null)
2682 { 2682 {
@@ -2693,6 +2693,14 @@ namespace OpenSim.Region.Environment.Scenes
2693 m_innerScene.RemoveAPrimCount(); 2693 m_innerScene.RemoveAPrimCount();
2694 } 2694 }
2695 group.DeleteParts(); 2695 group.DeleteParts();
2696
2697 // In case anybody else retains a reference to this group, signal deletion by changing the name
2698 // to null. We can't zero out the UUID because this is taken from the root part, which has already
2699 // been removed.
2700 // FIXME: This is a really poor temporary solution, since it still leaves plenty of scope for race
2701 // conditions where a user deletes an entity while it is being stored. Really, the update
2702 // code needs a redesign.
2703 group.Name = null;
2696 } 2704 }
2697 2705
2698 /// <summary> 2706 /// <summary>
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 38c7e45..90f0708 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -128,7 +128,8 @@ namespace OpenSim.Region.Environment.Scenes
128 { 128 {
129 if( m_rootPart == null ) 129 if( m_rootPart == null )
130 { 130 {
131 throw new NullReferenceException(string.Format("Object {0} has no root part.", m_uuid)); 131 throw new NullReferenceException(
132 string.Format("[SCENE OBJECT GROUP]: Object {0} has no root part.", m_uuid));
132 } 133 }
133 134
134 return m_rootPart.GroupPosition; 135 return m_rootPart.GroupPosition;
@@ -164,7 +165,7 @@ namespace OpenSim.Region.Environment.Scenes
164 get { 165 get {
165 if (m_rootPart == null) 166 if (m_rootPart == null)
166 { 167 {
167 m_log.Error("[PRIMGROUP]: Unable to find the rootpart for a LocalId Request!"); 168 m_log.Error("[SCENE OBJECT GROUP]: Unable to find the rootpart for a LocalId Request!");
168 return 0; 169 return 0;
169 } 170 }
170 171
@@ -1948,7 +1949,7 @@ namespace OpenSim.Region.Environment.Scenes
1948 /// Completely delete this group and tell all the scene presences about that deletion. 1949 /// Completely delete this group and tell all the scene presences about that deletion.
1949 /// </summary> 1950 /// </summary>
1950 public void DeleteGroup() 1951 public void DeleteGroup()
1951 { 1952 {
1952 DetachFromBackup(this); 1953 DetachFromBackup(this);
1953 1954
1954 lock (m_parts) 1955 lock (m_parts)