aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorTedd Hansen2008-02-18 14:21:51 +0000
committerTedd Hansen2008-02-18 14:21:51 +0000
commitc62328950a3e4ad30dbe972db11d05ca7519d6de (patch)
tree4610c7af86f2831f085334aed67f50dab615736b /OpenSim/Region
parentbring back some script engine debugging, hoping this will help track down the... (diff)
downloadopensim-SC_OLD-c62328950a3e4ad30dbe972db11d05ca7519d6de.zip
opensim-SC_OLD-c62328950a3e4ad30dbe972db11d05ca7519d6de.tar.gz
opensim-SC_OLD-c62328950a3e4ad30dbe972db11d05ca7519d6de.tar.bz2
opensim-SC_OLD-c62328950a3e4ad30dbe972db11d05ca7519d6de.tar.xz
More exception checks and crash hints
If no scriptengine is specified then don't try to load any.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs32
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs8
2 files changed, 28 insertions, 12 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 1e5fcfb..8c6ea26 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -181,7 +181,7 @@ namespace OpenSim
181 config.Set("storage_prim_inventories", true); 181 config.Set("storage_prim_inventories", true);
182 config.Set("startup_console_commands_file", String.Empty); 182 config.Set("startup_console_commands_file", String.Empty);
183 config.Set("shutdown_console_commands_file", String.Empty); 183 config.Set("shutdown_console_commands_file", String.Empty);
184 config.Set("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); 184 config.Set("script_engine", "");
185 config.Set("asset_database", "sqlite"); 185 config.Set("asset_database", "sqlite");
186 } 186 }
187 187
@@ -264,7 +264,7 @@ namespace OpenSim
264 m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", String.Empty); 264 m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", String.Empty);
265 m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", String.Empty); 265 m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", String.Empty);
266 266
267 m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); 267 m_scriptEngine = startupConfig.GetString("script_engine", "");
268 268
269 m_assetStorage = startupConfig.GetString("asset_database", "sqlite"); 269 m_assetStorage = startupConfig.GetString("asset_database", "sqlite");
270 270
@@ -449,18 +449,26 @@ namespace OpenSim
449 m_moduleLoader.PickupModules(scene, "."); 449 m_moduleLoader.PickupModules(scene, ".");
450 //m_moduleLoader.PickupModules(scene, "ScriptEngines"); 450 //m_moduleLoader.PickupModules(scene, "ScriptEngines");
451 //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene); 451 //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene);
452 m_log.Info("[MODULES]: Loading scripting engine modules"); 452
453 foreach (string module in m_scriptEngine.Split(',')) 453 if (string.IsNullOrEmpty(m_scriptEngine))
454 { 454 {
455 string mod = module.Trim(" \t".ToCharArray()); // Clean up name 455 m_log.Info("[MODULES]: No script engien module specified");
456 m_log.Info("[MODULES]: Loading scripting engine: " + mod); 456 }
457 try 457 else
458 { 458 {
459 m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene); 459 m_log.Info("[MODULES]: Loading scripting engine modules");
460 } 460 foreach (string module in m_scriptEngine.Split(','))
461 catch (Exception ex)
462 { 461 {
463 m_log.Error("[MODULES]: Failed to load script engine: " + ex.ToString()); 462 string mod = module.Trim(" \t".ToCharArray()); // Clean up name
463 m_log.Info("[MODULES]: Loading scripting engine: " + mod);
464 try
465 {
466 m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene);
467 }
468 catch (Exception ex)
469 {
470 m_log.Error("[MODULES]: Failed to load script engine: " + ex.ToString());
471 }
464 } 472 }
465 } 473 }
466 474
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
index 76ea503..ac05576 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
@@ -106,6 +106,14 @@ namespace OpenSim.Region.Physics.Manager
106 106
107 private void AddPlugin(string FileName) 107 private void AddPlugin(string FileName)
108 { 108 {
109 // TODO / NOTE
110 // The assembly named 'OpenSim.Region.Physics.BasicPhysicsPlugin' was loaded from
111 // 'file:///C:/OpenSim/trunk2/bin/Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll'
112 // using the LoadFrom context. The use of this context can result in unexpected behavior
113 // for serialization, casting and dependency resolution. In almost all cases, it is recommended
114 // that the LoadFrom context be avoided. This can be done by installing assemblies in the
115 // Global Assembly Cache or in the ApplicationBase directory and using Assembly.
116 // Load when explicitly loading assemblies.
109 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 117 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
110 118
111 foreach (Type pluginType in pluginAssembly.GetTypes()) 119 foreach (Type pluginType in pluginAssembly.GetTypes())