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/Scene.cs | 2 ++
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 ++++++
2 files changed, 8 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 984058c..975d769 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1943,6 +1943,7 @@ namespace OpenSim.Region.Framework.Scenes
/// If true, the object is made persistent into the scene.
/// If false, the object will not persist over server restarts
///
+ /// true if the object was added. false if not
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
{
return AddNewSceneObject(sceneObject, attachToBackup, true);
@@ -1960,6 +1961,7 @@ namespace OpenSim.Region.Framework.Scenes
/// If true, updates for the new scene object are sent to all viewers in range.
/// If false, it is left to the caller to schedule the update
///
+ /// true if the object was added. false if not
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
{
if (m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates))
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')
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