aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-08-05 20:47:36 +0000
committerJustin Clarke Casey2008-08-05 20:47:36 +0000
commit200c77ad15d830983bc70efc14a511530824b7d1 (patch)
tree55f0316d9b5e7c44c106f66e35ca02cdf95629f6 /OpenSim/Region/ScriptEngine/Common
parent* Fix probable cause of one of the bugs seen in the osgrid office hours today (diff)
downloadopensim-SC-200c77ad15d830983bc70efc14a511530824b7d1.zip
opensim-SC-200c77ad15d830983bc70efc14a511530824b7d1.tar.gz
opensim-SC-200c77ad15d830983bc70efc14a511530824b7d1.tar.bz2
opensim-SC-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')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs18
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
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Reflection;
30using System.Threading; 31using System.Threading;
31using System.Globalization; 32using System.Globalization;
32using libsecondlife; 33using libsecondlife;
34using log4net;
33using OpenSim.Framework; 35using OpenSim.Framework;
34using OpenSim.Region.Environment.Scenes.Scripting; 36using 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 }