From dc35ce26d0e74e9a92bf7bdbea052e01651cf6b4 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 10 Apr 2018 21:15:55 +0100 Subject: YEngine: apply a few fixes by Mike Rieker --- OpenSim/Region/ScriptEngine/YEngine/XMRInstRun.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRInstRun.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRInstRun.cs index a52c4c8..25f7209 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/XMRInstRun.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/XMRInstRun.cs @@ -383,10 +383,10 @@ namespace OpenSim.Region.ScriptEngine.Yengine if(((ec == ScriptEventCode.None) && active) || ((ec != ScriptEventCode.None) && !active)) { - Console.WriteLine("CheckRunLockInvariants: script=" + m_DescName); - Console.WriteLine("CheckRunLockInvariants: eventcode=" + ec.ToString() + ", active=" + active.ToString()); - Console.WriteLine("CheckRunLockInvariants: m_RunOnePhase=" + m_RunOnePhase); - Console.WriteLine("CheckRunLockInvariants: lastec=" + lastEventCode + ", lastAct=" + lastActive + ", lastPhase=" + lastRunPhase); + m_log.Error("CheckRunLockInvariants: script=" + m_DescName); + m_log.Error("CheckRunLockInvariants: eventcode=" + ec.ToString() + ", active=" + active.ToString()); + m_log.Error("CheckRunLockInvariants: m_RunOnePhase=" + m_RunOnePhase); + m_log.Error("CheckRunLockInvariants: lastec=" + lastEventCode + ", lastAct=" + lastActive + ", lastPhase=" + lastRunPhase); if(throwIt) throw new Exception("CheckRunLockInvariants: eventcode=" + ec.ToString() + ", active=" + active.ToString()); } @@ -767,6 +767,11 @@ namespace OpenSim.Region.ScriptEngine.Yengine // vars to their initial values. doGblInit = true; + // Throw away all its stack frames. + // If the script is resetting itself, there shouldn't be any stack frames. + // If the script is being reset by something else, we throw them away cuz we want to start from the beginning of an event handler. + stackFrames = null; + // Set script to 'default' state and queue call to its // 'state_entry()' event handler. m_RunOnePhase = "ResetLocked: posting default:state_entry() event"; -- cgit v1.1