diff options
author | Justin Clarke Casey | 2008-08-05 20:47:36 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-08-05 20:47:36 +0000 |
commit | 200c77ad15d830983bc70efc14a511530824b7d1 (patch) | |
tree | 55f0316d9b5e7c44c106f66e35ca02cdf95629f6 /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase | |
parent | * Fix probable cause of one of the bugs seen in the osgrid office hours today (diff) | |
download | opensim-SC_OLD-200c77ad15d830983bc70efc14a511530824b7d1.zip opensim-SC_OLD-200c77ad15d830983bc70efc14a511530824b7d1.tar.gz opensim-SC_OLD-200c77ad15d830983bc70efc14a511530824b7d1.tar.bz2 opensim-SC_OLD-200c77ad15d830983bc70efc14a511530824b7d1.tar.xz |
* possible fix for event queue problems (exceptions and event count max exceeded issues) seen in osgrid meeting today
* From the logs, I'm guessing probable cause is that an exception generated by a bad index given to substring error line number conversion stopped the script being killed, leading to continuous events that filled up the log (maybe)
* Someone will need to go back and fix this properly
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index 321dd5e..3a5cc23 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | |||
@@ -27,9 +27,11 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Reflection; | ||
30 | using System.Threading; | 31 | using System.Threading; |
31 | using System.Globalization; | 32 | using System.Globalization; |
32 | using libsecondlife; | 33 | using libsecondlife; |
34 | using log4net; | ||
33 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
34 | using OpenSim.Region.Environment.Scenes.Scripting; | 36 | using OpenSim.Region.Environment.Scenes.Scripting; |
35 | 37 | ||
@@ -40,6 +42,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
40 | /// </summary> | 42 | /// </summary> |
41 | public class EventQueueThreadClass : iScriptEngineFunctionModule | 43 | public class EventQueueThreadClass : iScriptEngineFunctionModule |
42 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
43 | /// <summary> | 47 | /// <summary> |
44 | /// How many ms to sleep if queue is empty | 48 | /// How many ms to sleep if queue is empty |
45 | /// </summary> | 49 | /// </summary> |
@@ -313,7 +317,19 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
313 | { | 317 | { |
314 | // Not sure why this is converted to an int then back to a string, either | 318 | // Not sure why this is converted to an int then back to a string, either |
315 | // way, need to skip the word "line " in the substring | 319 | // way, need to skip the word "line " in the substring |
316 | line = " at line " + Convert.ToInt32(t.Substring(colon + 6)).ToString(); | 320 | try |
321 | { | ||
322 | line = " at line " + Convert.ToInt32(t.Substring(colon + 6)).ToString(); | ||
323 | } | ||
324 | catch (ArgumentOutOfRangeException e) | ||
325 | { | ||
326 | // FIXME: Big fat temporary patch to stop the Substring above throwing an exception | ||
327 | // and stopping a proper kill of the script. We're making an unwarranted assumption | ||
328 | // about the size of t. This needs to be fixed properly. | ||
329 | m_log.ErrorFormat("[SCRIPT ENGINE]: Line number conversion exception {0}", e); | ||
330 | line = " at line (unavailable)"; | ||
331 | } | ||
332 | |||
317 | break; | 333 | break; |
318 | } | 334 | } |
319 | } | 335 | } |