From 488fe0ae9c8cadd1abe4a643f61a6a9c7e18e34d Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Tue, 24 Jan 2012 13:41:26 -0800 Subject: Removed unused events in SceneGraph: OnObjectCreate, OnObjectRemove, OnObjectDuplicate --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 1e2901b..1af8346 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -60,10 +60,6 @@ namespace OpenSim.Region.Framework.Scenes protected internal event PhysicsCrash UnRecoverableError; private PhysicsCrash handlerPhysicsCrash = null; - public event ObjectDuplicateDelegate OnObjectDuplicate; - public event ObjectCreateDelegate OnObjectCreate; - public event ObjectDeleteDelegate OnObjectRemove; - #endregion #region Fields @@ -404,9 +400,6 @@ namespace OpenSim.Region.Framework.Scenes if (attachToBackup) sceneObject.AttachToBackup(); - if (OnObjectCreate != null) - OnObjectCreate(sceneObject); - lock (SceneObjectGroupsByFullID) SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; @@ -455,9 +448,6 @@ namespace OpenSim.Region.Framework.Scenes if ((grp.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics) RemovePhysicalPrim(grp.PrimCount); } - - if (OnObjectRemove != null) - OnObjectRemove(Entities[uuid]); lock (SceneObjectGroupsByFullID) SceneObjectGroupsByFullID.Remove(grp.UUID); @@ -1979,9 +1969,6 @@ namespace OpenSim.Region.Framework.Scenes // required for physics to update it's position copy.AbsolutePosition = copy.AbsolutePosition; - if (OnObjectDuplicate != null) - OnObjectDuplicate(original, copy); - return copy; } } -- cgit v1.1 From 3d1f43046dd4d33c54e31ab103cd0866c8f417ac Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Tue, 24 Jan 2012 17:05:53 -0800 Subject: Removed unused delegates in SceneGraph: ObjectDuplicateDelegate, ObjectCreateDelegate, ObjectDeleteDelegate --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 1af8346..7f18140 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -41,12 +41,6 @@ namespace OpenSim.Region.Framework.Scenes { public delegate void PhysicsCrash(); - public delegate void ObjectDuplicateDelegate(EntityBase original, EntityBase clone); - - public delegate void ObjectCreateDelegate(EntityBase obj); - - public delegate void ObjectDeleteDelegate(EntityBase obj); - /// /// This class used to be called InnerScene and may not yet truly be a SceneGraph. The non scene graph components /// should be migrated out over time. -- cgit v1.1 From 9d93c4808e0a0171bcb43fc551f3fb37b684c499 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 30 Jan 2012 19:21:58 +0000 Subject: lock SceneObjectGroupsByFullID in SceneGraph.ForEachSOG() to stop failure if SceneObjectGroupsByFullID is updated elsewhere at the same time. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 7f18140..36a454e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1137,8 +1137,10 @@ namespace OpenSim.Region.Framework.Scenes /// protected internal void ForEachSOG(Action action) { - // FIXME: Need to lock here, really. - List objlist = new List(SceneObjectGroupsByFullID.Values); + List objlist; + lock (SceneObjectGroupsByFullID) + objlist = new List(SceneObjectGroupsByFullID.Values); + foreach (SceneObjectGroup obj in objlist) { try @@ -1147,7 +1149,7 @@ namespace OpenSim.Region.Framework.Scenes } catch (Exception e) { - // Catch it and move on. This includes situations where splist has inconsistent info + // Catch it and move on. This includes situations where objlist has inconsistent info m_log.WarnFormat( "[SCENEGRAPH]: Problem processing action in ForEachSOG: {0} {1}", e.Message, e.StackTrace); } @@ -1382,10 +1384,10 @@ namespace OpenSim.Region.Framework.Scenes /// /// Update the texture entry of the given prim. /// - /// + /// /// A texture entry is an object that contains details of all the textures of the prim's face. In this case, /// the texture is given in its byte serialized form. - /// + /// /// /// /// -- cgit v1.1 From f3780b9eaeae8834c49f6e2f6045ef922916924d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 31 Jan 2012 19:56:37 +0000 Subject: Add torture tests to test adding 10,000, 100,000 and 200,000 single prim scene objects. These can be run using the "nant torture" target. They are not part of "nant test" due to their long-run future nature. Such tests are designed to do some testing of extreme situations and give some feedback on memory usage, etc. However, data can be inconsistent due to different machine circumstances and virtual machine actions. This area is under development. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 36a454e..006f9c6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -357,7 +357,13 @@ namespace OpenSim.Region.Framework.Scenes return false; if (Entities.ContainsKey(sceneObject.UUID)) + { +// m_log.DebugFormat( +// "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()", +// m_parentScene.RegionInfo.RegionName, sceneObject.UUID); + return false; + } // m_log.DebugFormat( // "[SCENEGRAPH]: Adding scene object {0} {1}, with {2} parts on {3}", -- cgit v1.1 From 10b9348071094122d5e2dd636f7cce9c0b25f0a9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 31 Jan 2012 20:30:30 +0000 Subject: Remove scene object null check on SceneGraph.AddSceneObject(). Complain explicitly if there's an attempt to add any object with a zero UUID. Callers themselves need to check that they're not attempting to add a null scene object. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 006f9c6..06de72f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -353,8 +353,14 @@ namespace OpenSim.Region.Framework.Scenes /// protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) { - if (sceneObject == null || sceneObject.RootPart.UUID == UUID.Zero) + if (sceneObject.UUID == UUID.Zero) + { + m_log.ErrorFormat( + "[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}", + sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero); + return false; + } if (Entities.ContainsKey(sceneObject.UUID)) { -- cgit v1.1