If there are any exceptions in XEngine.DoOnRezScriptQueue() then log the error and always set m_CurrentCompile = null

Setting m_CurrentCompile = null in the finally block reduces the risk that an exception could permanently stop any future scripts compiling until the simulator is restarted.
If an exception is seen from this then please report and further changes to fix the bug or improve compiling reliability can be made.
mb-throttle-test
Justin Clark-Casey (justincc) 2014-11-29 01:42:52 +00:00
parent 55e064baf7
commit 690fe0c5e5
1 changed files with 48 additions and 36 deletions

View File

@ -1045,6 +1045,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
}
public Object DoOnRezScriptQueue(Object dummy)
{
try
{
if (m_InitialStartup)
{
@ -1076,6 +1078,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
m_log.InfoFormat(
"[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.Name);
}
catch (Exception e)
{
m_log.Error(string.Format("[XEngine]: Failure in DoOnRezScriptQueue(). Exception ", e));
}
finally
{
// FIXME: On failure we must trigger this even if the compile queue is not actually empty so that the
// RegionReadyModule is not forever waiting. This event really needs a different name.
m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount,
m_ScriptErrorMessage);
@ -1089,6 +1100,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
//
lock (m_CompileQueue)
m_CurrentCompile = null;
}
return null;
}