From 9e4d9e2c3f9332c7c6f73b08bb4374862352d86e Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 15 Mar 2009 19:39:43 +0000 Subject: [PATCH] Fixes Mantis #3289. Thank you kindly, Ewe Loon, for a patch that: fixes Sporadic Errors in "Dictionary0) // ;^) Ewe Loon,fix + detparms[id] = qParams; + ExeStage = 3; // ;^) Ewe Loon, for debuging + if (id.Running) + id.Script.ExecuteEvent(id.State, FunctionName, args); + ExeStage = 4; // ;^) Ewe Loon, for debuging + if (qParams.Length>0) // ;^) Ewe Loon,fix + detparms.Remove(id); + ExeStage = 5; // ;^) Ewe Loon, for debuging + } + catch (Exception e) // ;^) Ewe Loon, From here down tis fix + { + if ((ExeStage == 3)&&(qParams.Length>0)) + detparms.Remove(id); + SceneObjectPart ob = m_scriptEngine.World.GetSceneObjectPart(localID); + m_log.InfoFormat("[Script Error] ,{0},{1},@{2},{3},{4},{5}", ob.Name , FunctionName, ExeStage, e.Message, qParams.Length, detparms.Count); + if (ExeStage != 2) throw e; + } } public uint GetLocalID(UUID itemID) @@ -569,6 +586,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine Dictionary Obj; Scripts.TryGetValue(localID, out Obj); + if (Obj==null) return null; if (Obj.ContainsKey(itemID) == false) return null;