More locks, try's and disable some things in SEC - maybe it won't crash now. :)
parent
9c8aeff27c
commit
ec494275a2
|
@ -72,17 +72,23 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine
|
||||||
{
|
{
|
||||||
// We have found an type which is derived from ProdiverBase, add it to provider list
|
// We have found an type which is derived from ProdiverBase, add it to provider list
|
||||||
m_log.InfoFormat("[ScriptEngine]: Adding component: {0}", componentType.Name);
|
m_log.InfoFormat("[ScriptEngine]: Adding component: {0}", componentType.Name);
|
||||||
|
lock (ComponentRegistry.providers)
|
||||||
|
{
|
||||||
ComponentRegistry.providers.Add(componentType.Name, componentType);
|
ComponentRegistry.providers.Add(componentType.Name, componentType);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (componentType.IsSubclassOf(typeof(RegionScriptEngineBase)))
|
if (componentType.IsSubclassOf(typeof(RegionScriptEngineBase)))
|
||||||
{
|
{
|
||||||
// We have found an type which is derived from RegionScriptEngineBase, add it to engine list
|
// We have found an type which is derived from RegionScriptEngineBase, add it to engine list
|
||||||
m_log.InfoFormat("[ScriptEngine]: Adding script engine: {0}", componentType.Name);
|
m_log.InfoFormat("[ScriptEngine]: Adding script engine: {0}", componentType.Name);
|
||||||
|
lock (ComponentRegistry.scriptEngines)
|
||||||
|
{
|
||||||
ComponentRegistry.scriptEngines.Add(componentType.Name, componentType);
|
ComponentRegistry.scriptEngines.Add(componentType.Name, componentType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch
|
catch
|
||||||
(ReflectionTypeLoadException)
|
(ReflectionTypeLoadException)
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,6 +73,8 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine
|
||||||
{
|
{
|
||||||
m_log.Info("[" + Name + "]: Loading: " + c);
|
m_log.Info("[" + Name + "]: Loading: " + c);
|
||||||
lock (Components)
|
lock (Components)
|
||||||
|
{
|
||||||
|
lock (ComponentRegistry.providers)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -87,6 +89,7 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Run Initialize on all our providers, hand over a reference of ourself.
|
// Run Initialize on all our providers, hand over a reference of ourself.
|
||||||
|
|
|
@ -43,13 +43,17 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine
|
||||||
public RegionScriptEngineBase scriptEngine;
|
public RegionScriptEngineBase scriptEngine;
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(Scene scene, IConfigSource source)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
// New region is being created
|
// New region is being created
|
||||||
// Create a new script engine
|
// Create a new script engine
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
lock (ComponentRegistry.scriptEngines)
|
||||||
{
|
{
|
||||||
scriptEngine =
|
scriptEngine =
|
||||||
Activator.CreateInstance(ComponentRegistry.scriptEngines[tempScriptEngineName]) as
|
Activator.CreateInstance(ComponentRegistry.scriptEngines[tempScriptEngineName]) as
|
||||||
RegionScriptEngineBase;
|
RegionScriptEngineBase;
|
||||||
|
}
|
||||||
scriptEngine.Initialize(scene, source);
|
scriptEngine.Initialize(scene, source);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
Loading…
Reference in New Issue