mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
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.
This commit is contained in:
@@ -1045,6 +1045,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Object DoOnRezScriptQueue(Object dummy)
|
public Object DoOnRezScriptQueue(Object dummy)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (m_InitialStartup)
|
if (m_InitialStartup)
|
||||||
{
|
{
|
||||||
@@ -1076,6 +1078,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||||||
m_log.InfoFormat(
|
m_log.InfoFormat(
|
||||||
"[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.Name);
|
"[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_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount,
|
||||||
m_ScriptErrorMessage);
|
m_ScriptErrorMessage);
|
||||||
|
|
||||||
@@ -1089,6 +1100,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||||||
//
|
//
|
||||||
lock (m_CompileQueue)
|
lock (m_CompileQueue)
|
||||||
m_CurrentCompile = null;
|
m_CurrentCompile = null;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user