mirror of
https://github.com/opensim/opensim.git
synced 2026-07-13 19:14:51 +08:00
Untangles llDie handling in XEngine, which resulted in a thread being aborted while executing inside of Scene.
This commit is contained in:
@@ -874,6 +874,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
private string m_Assembly;
|
||||
private int m_StartParam = 0;
|
||||
private string m_CurrentEvent = String.Empty;
|
||||
private bool m_InSelfDelete = false;
|
||||
|
||||
private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>();
|
||||
|
||||
@@ -1190,7 +1191,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
if (result == null)
|
||||
return true;
|
||||
|
||||
result.Abort();
|
||||
if(!m_InSelfDelete)
|
||||
result.Abort();
|
||||
|
||||
lock (m_EventQueue)
|
||||
{
|
||||
@@ -1298,7 +1300,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
m_InEvent = false;
|
||||
m_CurrentEvent = String.Empty;
|
||||
|
||||
if (!(e is TargetInvocationException) || !(e.InnerException is EventAbortException))
|
||||
if (!(e is TargetInvocationException) || (!(e.InnerException is EventAbortException) && (!(e.InnerException is SelfDeleteException))))
|
||||
{
|
||||
if (e is System.Threading.ThreadAbortException)
|
||||
{
|
||||
@@ -1340,6 +1342,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
e.ToString());
|
||||
}
|
||||
}
|
||||
else if((e is TargetInvocationException) && (e.InnerException is SelfDeleteException))
|
||||
{
|
||||
m_InSelfDelete = true;
|
||||
if(part != null && part.ParentGroup != null)
|
||||
m_Engine.World.DeleteSceneObject(part.ParentGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user