Fixed bug that occurs sometimes on script unload where queued script event was attempted executed after AppDomain was unloaded.
parent
0cd6d26adb
commit
25e200c46a
|
@ -130,6 +130,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
|||
{
|
||||
QueueItemStruct BlankQIS = new QueueItemStruct();
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
QueueItemStruct QIS = BlankQIS;
|
||||
bool GotItem = false;
|
||||
|
@ -182,6 +184,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
|||
}
|
||||
|
||||
} // Something in queue
|
||||
} catch {ThreadAbortException tae) {
|
||||
throw tae;
|
||||
} catch (Exception e) {
|
||||
Console.WriteLine("Exception in EventQueueThreadLoop: " + e.ToString());
|
||||
}
|
||||
} // while
|
||||
} // try
|
||||
catch (ThreadAbortException tae)
|
||||
|
|
|
@ -362,9 +362,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
|||
// Execute a function in the script
|
||||
//m_scriptEngine.Log.Verbose("ScriptEngine", "Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName);
|
||||
LSL_BaseClass Script = m_scriptEngine.myScriptManager.GetScript(localID, itemID);
|
||||
if (Script == null)
|
||||
return;
|
||||
|
||||
// Must be done in correct AppDomain, so leaving it up to the script itself
|
||||
try
|
||||
{
|
||||
Script.Exec.ExecuteEvent(FunctionName, args);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Exception executing script funcion: " + e.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue