From 1c3b0da74a6e662ceebad53c82d38ba8a42795b3 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 16 Jul 2012 23:31:55 +0100
Subject: Revert "Fix script "Running" behavior"
A better solution using the already present flags must be found.
This reverts commit 6d3ee8bb39d47ed7b32e8905fa0b2fc31c5a9f80.
---
OpenSim/Region/Framework/Interfaces/IScriptModule.cs | 2 --
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 14 --------------
2 files changed, 16 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs
index 42dbedc..143af48 100644
--- a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs
@@ -77,8 +77,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// The item ID of the script.
bool GetScriptState(UUID itemID);
- void SetRunEnable(UUID instanceID, bool enable);
-
void SaveAllState();
///
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 9ff8467..e413281 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2143,24 +2143,10 @@ namespace OpenSim.Region.Framework.Scenes
if (part == null)
return;
- IScriptModule[] engines = RequestModuleInterfaces();
-
if (running)
- {
- foreach (IScriptModule engine in engines)
- {
- engine.SetRunEnable(itemID, true);
- }
EventManager.TriggerStartScript(part.LocalId, itemID);
- }
else
- {
- foreach (IScriptModule engine in engines)
- {
- engine.SetRunEnable(itemID, false);
- }
EventManager.TriggerStopScript(part.LocalId, itemID);
- }
}
public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
--
cgit v1.1
From eb590becf03d94d9afeef471c000c46b044d0c5b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 18 Jul 2012 00:14:02 +0100
Subject: Close() the ScenePresence after we've removed it from the scene
graph, to cut down race conditions when another thread manages the grab the
presence after some SP structures have been reset.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3e9583c..de2b192 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3317,24 +3317,30 @@ namespace OpenSim.Region.Framework.Scenes
if (AgentTransactionsModule != null)
AgentTransactionsModule.RemoveAgentAssetTransactions(agentID);
- avatar.Close();
-
m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode);
}
catch (Exception e)
{
m_log.Error(
- string.Format("[SCENE]: Exception removing {0} from {1}, ", avatar.Name, RegionInfo.RegionName), e);
+ string.Format("[SCENE]: Exception removing {0} from {1}. Cleaning up. Exception ", avatar.Name, Name), e);
}
finally
{
- // Always clean these structures up so that any failure above doesn't cause them to remain in the
- // scene with possibly bad effects (e.g. continually timing out on unacked packets and triggering
- // the same cleanup exception continually.
- // TODO: This should probably extend to the whole method, but we don't want to also catch the NRE
- // since this would hide the underlying failure and other associated problems.
- m_sceneGraph.RemoveScenePresence(agentID);
- m_clientManager.Remove(agentID);
+ try
+ {
+ // Always clean these structures up so that any failure above doesn't cause them to remain in the
+ // scene with possibly bad effects (e.g. continually timing out on unacked packets and triggering
+ // the same cleanup exception continually.
+ m_sceneGraph.RemoveScenePresence(agentID);
+ m_clientManager.Remove(agentID);
+
+ avatar.Close();
+ }
+ catch (Exception e)
+ {
+ m_log.Error(
+ string.Format("[SCENE]: Exception in final clean up of {0} in {1}. Exception ", avatar.Name, Name), e);
+ }
}
//m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false));
--
cgit v1.1