diff options
author | Tedd Hansen | 2008-02-18 14:21:51 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-02-18 14:21:51 +0000 |
commit | c62328950a3e4ad30dbe972db11d05ca7519d6de (patch) | |
tree | 4610c7af86f2831f085334aed67f50dab615736b | |
parent | bring back some script engine debugging, hoping this will help track down the... (diff) | |
download | opensim-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 '')
6 files changed, 38 insertions, 17 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index a6d5089..005bfd7 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
56 | { | 56 | { |
57 | try | 57 | try |
58 | { | 58 | { |
59 | if (openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) | 59 | if (openSim.ConfigSource.Configs["RemoteAdmin"] != null && openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) |
60 | { | 60 | { |
61 | m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); | 61 | m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); |
62 | requiredPassword = openSim.ConfigSource.Configs["RemoteAdmin"].GetString("access_password", String.Empty); | 62 | requiredPassword = openSim.ConfigSource.Configs["RemoteAdmin"].GetString("access_password", String.Empty); |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs index 9518724..1edaa52 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | |||
@@ -421,8 +421,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
421 | public void StoreLandObject(Land parcel, LLUUID regionUUID) | 421 | public void StoreLandObject(Land parcel, LLUUID regionUUID) |
422 | { | 422 | { |
423 | // Does the new locking fix it? | 423 | // Does the new locking fix it? |
424 | m_log.Info("[DATASTORE]: Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); | 424 | m_log.Info("[DATASTORE]: Tedds temp fix: Waiting 3 seconds to avoid others writing to table while we hold a dataset of it. (Someone please fix! :))"); |
425 | System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900)); | 425 | System.Threading.Thread.Sleep(2500 + rnd.Next(0, 1000)); |
426 | 426 | ||
427 | lock (m_dataSet) | 427 | lock (m_dataSet) |
428 | { | 428 | { |
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index cc0c0d0..6b576e6 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -559,6 +559,7 @@ namespace OpenSim.Framework.Servers | |||
559 | catch (Exception e) | 559 | catch (Exception e) |
560 | { | 560 | { |
561 | m_log.Warn("[HTTPD]: Error - " + e.Message); | 561 | m_log.Warn("[HTTPD]: Error - " + e.Message); |
562 | m_log.Warn("Tip: Do you have permission to listen on port " + m_port + "?"); | ||
562 | } | 563 | } |
563 | } | 564 | } |
564 | 565 | ||
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs b/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs index 73f36f9..c8b8223 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs | |||
@@ -50,8 +50,12 @@ namespace OpenSim.Framework.Statistics | |||
50 | 50 | ||
51 | public void AddTexture(AssetBase image) | 51 | public void AddTexture(AssetBase image) |
52 | { | 52 | { |
53 | texturesInCache++; | 53 | // Tedd: I added null check to avoid exception. Don't know if texturesInCache should ++ anyway? |
54 | textureCacheMemoryUsage += image.Data.Length; | 54 | if (image.Data != null) |
55 | { | ||
56 | texturesInCache++; | ||
57 | textureCacheMemoryUsage += image.Data.Length; | ||
58 | } | ||
55 | } | 59 | } |
56 | 60 | ||
57 | /// <summary> | 61 | /// <summary> |
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()) |