From 59cd0a2419266f190375074e2bede0d9a10de370 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 11 Jul 2012 23:32:12 +0200 Subject: Change order of operations on backup to ensure keyframe motions are backed up properly --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 96eeec4..1734ab7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2039,8 +2039,6 @@ namespace OpenSim.Region.Framework.Scenes HasGroupChangedDueToDelink = false; m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this); - datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); - backup_group.ForEachPart(delegate(SceneObjectPart part) { if (part.KeyframeMotion != null) @@ -2048,6 +2046,12 @@ namespace OpenSim.Region.Framework.Scenes part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); part.KeyframeMotion.UpdateSceneObject(this); } + }); + + datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); + + backup_group.ForEachPart(delegate(SceneObjectPart part) + { part.Inventory.ProcessInventoryBackup(datastore); }); -- cgit v1.1 From ea91a36483f3eba90e16b664715d152f9eca2980 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 11 Jul 2012 23:33:13 +0200 Subject: Add instrumentation to log finalizer being called. Suppressed for backup interim copies to avoid spammage. Not for release to the grid, must be reverted first! --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 1 + OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1734ab7..1730723 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2045,6 +2045,7 @@ namespace OpenSim.Region.Framework.Scenes { part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); part.KeyframeMotion.UpdateSceneObject(this); + part.SuppressFinalizerLogging = true; } }); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 16a8588..4d43943 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -149,6 +149,8 @@ namespace OpenSim.Region.Framework.Scenes #region Fields + public bool SuppressFinalizerLogging = false; + public bool AllowedDrop; public bool DIE_AT_EDGE; @@ -350,15 +352,18 @@ namespace OpenSim.Region.Framework.Scenes #endregion Fields -// ~SceneObjectPart() -// { + ~SceneObjectPart() + { + if (SuppressFinalizerLogging) + return; + // Console.WriteLine( // "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", // Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); -// m_log.DebugFormat( -// "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", -// Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); -// } + m_log.DebugFormat( + "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", + Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); + } #region Constructors -- cgit v1.1 From d9b0b03aa3f92bcd860e4edb656cf6b1221776a6 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 11 Jul 2012 23:54:45 +0200 Subject: Place instrumentation in the proper place. This needs reverting, too! --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1730723..efeb551 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2045,8 +2045,8 @@ namespace OpenSim.Region.Framework.Scenes { part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); part.KeyframeMotion.UpdateSceneObject(this); - part.SuppressFinalizerLogging = true; } + part.SuppressFinalizerLogging = true; }); datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); -- cgit v1.1 From c66367e6194f22da86a3bf972ec107212e732d80 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 12 Jul 2012 00:16:19 +0200 Subject: Add "gc collect" console command for debugging memleaks --- OpenSim/Region/Framework/Scenes/Scene.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6a120c1..48aca98 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -831,6 +831,8 @@ namespace OpenSim.Region.Framework.Scenes StatsReporter = new SimStatsReporter(this); StatsReporter.OnSendStatsResult += SendSimStatsPackets; StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; + + MainConsole.Instance.Commands.AddCommand("scene", false, "gc collect", "gc collect", "gc collect", "Cause the garbage collector to make a single pass", HandleGcCollect); } /// @@ -5637,5 +5639,10 @@ Environment.Exit(1); } } } + + private void HandleGcCollect(string module, string[] args) + { + GC.Collect(); + } } } -- cgit v1.1 From bae35ad97e10df4cfd3ecb73fab84081d85ede20 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 12 Jul 2012 01:01:29 +0200 Subject: Revert "Place instrumentation in the proper place. This needs reverting, too!" This reverts commit d9b0b03aa3f92bcd860e4edb656cf6b1221776a6. --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index efeb551..1730723 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2045,8 +2045,8 @@ namespace OpenSim.Region.Framework.Scenes { part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); part.KeyframeMotion.UpdateSceneObject(this); + part.SuppressFinalizerLogging = true; } - part.SuppressFinalizerLogging = true; }); datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); -- cgit v1.1 From 906ac4adc4adc8eef84a584b73323fda25127806 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 12 Jul 2012 01:01:43 +0200 Subject: Revert "Add instrumentation to log finalizer being called. Suppressed for backup" This reverts commit ea91a36483f3eba90e16b664715d152f9eca2980. --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 1 - OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 17 ++++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1730723..1734ab7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2045,7 +2045,6 @@ namespace OpenSim.Region.Framework.Scenes { part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); part.KeyframeMotion.UpdateSceneObject(this); - part.SuppressFinalizerLogging = true; } }); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4d43943..16a8588 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -149,8 +149,6 @@ namespace OpenSim.Region.Framework.Scenes #region Fields - public bool SuppressFinalizerLogging = false; - public bool AllowedDrop; public bool DIE_AT_EDGE; @@ -352,18 +350,15 @@ namespace OpenSim.Region.Framework.Scenes #endregion Fields - ~SceneObjectPart() - { - if (SuppressFinalizerLogging) - return; - +// ~SceneObjectPart() +// { // Console.WriteLine( // "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", // Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); - m_log.DebugFormat( - "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", - Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); - } +// m_log.DebugFormat( +// "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", +// Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); +// } #region Constructors -- cgit v1.1 From 39262f6232978f63ce997288052b4bfab433a2f6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 13 Jul 2012 20:25:47 +0100 Subject: missed fix on vehicle reference frame --- OpenSim/Region/Framework/Scenes/SOPVehicle.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs index 41e8944..9cb901a 100644 --- a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs +++ b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs @@ -36,7 +36,6 @@ using System.Xml; using OpenSim.Framework.Serialization; using OpenSim.Framework.Serialization.External; using OpenSim.Region.Framework.Scenes.Serialization; -using OpenSim.Region.Framework.Scenes.Serialization; namespace OpenSim.Region.Framework.Scenes { @@ -215,7 +214,7 @@ namespace OpenSim.Region.Framework.Scenes switch (pParam) { case Vehicle.REFERENCE_FRAME: - vd.m_referenceFrame = Quaternion.Inverse(pValue); + vd.m_referenceFrame = pValue; break; } }//end ProcessRotationVehicleParam -- cgit v1.1