aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-08-21 add a missing lock()UbitUmarov1-1/+2
2016-08-19 avoid telling a work job to cancel itselfUbitUmarov1-2/+9
2016-08-19do not enqueue next event processing if script is in SelfDelete stateUbitUmarov1-3/+4
2016-02-21Pushed AssemblyVersion up to VersionInfo, so that we don't need to do global ↵Diva Canto1-1/+1
replace anymore.
2015-10-18On to 0.8.3!Diva Canto1-1/+1
Conflicts: OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
2015-10-18On to 0.8.3!Diva Canto1-1/+1
2015-10-01 fix missing clear of queued timer even and state transition flags on ↵UbitUmarov1-0/+7
scripts reset
2015-09-08 fix missing proprieties get, etcUbitUmarov1-8/+10
2015-09-02seems to compile ( tests comented out)UbitUmarov1-147/+3
2015-08-17Change the IScriptApi back to it's original form, removing XEngineMelanie Thielker1-6/+14
specific additions that should not have been there in the first place. Sleeping and time measurement are now completely internal to XEngine
2015-08-17Revert "When scripts are sleeping, don't count that as execution time"Melanie Thielker1-7/+6
The approach is good but the way it is written breaks the architecture. Rewrite follows. This reverts commit a568f06b7faea807149205d0e47454e4883e4836.
2015-08-17Prevent the spammy "many event" message from appearing in normal use.Melanie Thielker1-2/+4
Console command debug xengine now turns that on. Also, per orenh, remove the triggers at 1000 and 10000 as they are not useful now that top scripts works.
2015-08-11When the user stops a script, have it remain stoppedOren Hurvitz1-3/+18
Previously the script state was never saved for a !Running script, so upon region restart the script would be Running again. The use of the 'StayStopped' flag is needed because all scripts are automatically stopped when the region shuts down, but in that case we shouldn't save in their state that they're !Running.
2015-08-11When scripts are sleeping, don't count that as execution timeOren Hurvitz1-6/+7
Sleeping doesn't use the CPU.
2015-08-11Show Script Time in the statistics panelOren Hurvitz1-0/+1
The value shown is the number of milliseconds per frame that were spent executing scripts in this region.
2015-08-11Changed "Script Execution Time" to be the gross time, i.e. including ↵Oren Hurvitz1-164/+176
handling it in XEngine Previously the "Net Time" was reported: only the time actually spent in the script's code. This is not a correct indication of how much load the script places on the simulator, because scripts that change state often or have many events use up a lot of time just in the event handlers, and previously this time wasn't counted.
2015-08-11Report "Script Execution Time" as the time spent executing the script in the ↵Oren Hurvitz1-17/+12
last 30 seconds. Use a sliding window to calculate this. Notes: - This metric provides a better indication of which scripts are taking up a lot of CPU (and therefore should be optimized). - Previously the execution time was reset to 0 in every new measurement period, causing the reported time to fluctuate for no reason. This has been fixed by using a sliding window.
2015-08-11Improved calculation of Script Execution TimeStartedOren Hurvitz1-6/+12
1. Use a Stopwatch (a high-resolution timer) 2. Whenever we start a new measurement period, zero out the total execution time (previously it just kept accumulating) 3. Changed the measurement period from 30 minutes to 30 seconds. This is much more useful in the "Top Scripts" dialog, as it shows currently active scripts
2015-08-11Fixed mistakes related to confusion between Environment.TickCount ↵Oren Hurvitz1-1/+1
(milliseconds) and TimeSpan.TicksPerXXX (10000 x milliseconds)
2015-08-11Log scripts that have processed many events: this is probably an indication ↵Oren Hurvitz1-0/+8
of a problem
2015-04-29Updated all occurrences of AssemblyVersion("0.8.1.*") to ↵Diva Canto1-1/+1
AssemblyVersion("0.8.2.*")
2015-03-12Move state change in progress in ScriptInstance.PostEvent() to the top of ↵Justin Clark-Casey (justincc)1-3/+4
the EventQueue lock to avoid some flags possibly being wrongly set (m_LastControlLevel, etc.)
2015-03-12Lock around EventQueue manipulation in ScriptInstance.SetState() as queues ↵Justin Clark-Casey (justincc)1-17/+24
are not thread-safe structures. This should also make it less likely that an event will be erroneously posted during a state change by precluding a race condition with a thread calling ScriptInstance.PostEvent()
2015-03-12A workaround for the state change problem described best here ↵Bob Shaffer II1-1/+22
http://opensimulator.org/mantis/view.php?id=6960 which should make state changes behave more like is described here http://wiki.secondlife.com/wiki/State
2015-03-03corrected llGetStartParameter according to ↵Freaky Tech1-0/+2
http://wiki.secondlife.com/wiki/LlGetStartParameter Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2015-03-03corrected llResetScript according to description within LSL wikiFreaky Tech1-1/+2
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2015-01-29Avoid a possible race condition by serializing plugin data outside the ↵Justin Clark-Casey (justincc)1-2/+9
EventQueue lock in ScriptInstance.SaveState() This takes the AsyncCommandHandler.staticLock. However, AsyncCommandHandler.DoOneCmdHandlerPass() already holds staticLock and may attempt to take the EventQueue lock via ScriptInstance.PostEvent() in XEngine.CheckListeners() This is a regression from faaf47a (Fri Jan 16 2015) but not simply reverting that commit since it will reintroduce a race between script removal, backup and event queue manipulating code.
2015-01-26On a multi-region simulator when AppDomain = true, make sure the DLL from ↵Justin Clark-Casey (justincc)2-80/+32
the appropriate script engines subdir is loaded rather than always that of the first engine to load the DLL. This resolves a DLL load failure on my Linux box when an attachment script was present on another region before the avatar arrived.
2015-01-23Fix regression where the stored state of every second script in an object ↵Justin Clark-Casey (justincc)1-0/+3
rezzed from inventory (e.g. attachments) was no longer loaded. Likely a regression since f132f642 (2014-08-28) Relates to http://opensimulator.org/mantis/view.php?id=7278
2015-01-16Prevent a race condition between the script engine backup thread and script ↵Justin Clark-Casey (justincc)1-30/+40
removal by locking on the script's EventQueue and only proceeding if it's flagged as still running. Relates to http://opensimulator.org/mantis/view.php?id=7407
2015-01-16For scripts in attachments, don't save .state files apart from the initial ↵Justin Clark-Casey (justincc)1-5/+22
one as these are ignored since .state is saved in the attachment's asset. This eliminates pointless work and exceptions when an appdomain is unloaded whilst an attachment script state is persisted. Adds test for this case. Relates to http://opensimulator.org/mantis/view.php?id=7407
2015-01-08minor: Add event name to existing debug output when a script event fails ↵Justin Clark-Casey (justincc)1-1/+2
with an exception. To aid debugging.
2014-12-10Fix a regression where objects crossing regions in the same simulator (on ↵Justin Clark-Casey (justincc)1-30/+36
their own or as attachments) with AppDomainLoading = false would create the new state in the source region area rather than the dest. This was beause the code was finding the script DLL compiled for the source region as everything is in the same appdomain and using this as the location for the destination script state, etc. This resolves the regression by passing the proper destination separately from the DLL retrieved. Probably a regression since commit d7b92604 (11 July 2014). Added regression test for this case. At least partly addresses http://opensimulator.org/mantis/view.php?id=7278
2014-12-03Always close script linemap file after reading and always dispose of other ↵Justin Clark-Casey (justincc)1-4/+5
streams in the script engine even if exceptions are thrown.
2014-11-25refactor: consistently put all test classes in the OpenSim.Tests.Common ↵Justin Clark-Casey (justincc)1-1/+0
package rather than some in OpenSim.Tests.Common.Mock the separate mock package was not useful and was just another using line to always add
2014-07-11minor: further cleanup of old vb and yield prolog script engine references ↵Justin Clark-Casey (justincc)1-1/+1
that were removed some time ago
2014-07-11If [XEngine] ScriptStopStrategy is changed between abort and co-op, for the ↵Justin Clark-Casey (justincc)1-36/+21
existing session use the previous strategy for that script rather than not starting the script at all. We have to do this since we can't unload existing DLLs if they're all in the same AppDomain. But we can still update the underlying DLL which will be used in the next simulator session.
2014-06-17Change assembly versions to 0.8.1Justin Clark-Casey (justincc)1-1/+1
2014-04-30Change XEngine to call StateChange rather than RemoveScript on state changesMelanie1-1/+1
2014-03-24Better error messagesOren Hurvitz1-6/+5
This resolves http://opensimulator.org/mantis/view.php?id=6936
2013-10-04Bump OPenSimulator version and assembly versions up to 0.8.0 DevJustin Clark-Casey (justincc)1-1/+1
2013-09-16* Fix a null ref that causes a stack unwind when crossing borders. Less ↵teravus1-1/+2
stack unwinding.. the faster it goes. * Tweak XEngine so that it's partially functional again. It's still not great, but basic things work. (cherry picked from commit 01c3be27460fd3f28efd17b8d6606b883350f653)
2013-08-24* Fix a null ref that causes a stack unwind when crossing borders. Less ↵teravus1-0/+1
stack unwinding.. the faster it goes. * Tweak XEngine so that it's partially functional again. It's still not great, but basic things work.
2013-08-13Remove exception when printing error for failure removing script state.Robert Adams1-1/+1
2013-07-13In co-op termination, extend EventWaitHandle to give this an indefinite ↵Justin Clark-Casey (justincc)1-2/+21
lifetime in order to avoid a later RemotingException if scripts are being loaded into their own domains. This is necessary because XEngineScriptBase now retains a reference to an EventWaitHandle when co-op termination is active. Aims to address http://opensimulator.org/mantis/view.php?id=6634
2013-05-01Add in-code exaplanation for the change in cancellation signalling in STP ↵Justin Clark-Casey (justincc)1-2/+0
2.2.3. Remove left in Console.WriteLine accidentally inserted in recent 206fb306
2013-05-01Update SmartThreadPool to latest version 2.2.3 with a major and minor change.Justin Clark-Casey (justincc)1-3/+6
SmartThreadPool code comes from http://www.codeproject.com/Articles/7933/Smart-Thread-Pool This version implements thread abort (via WorkItem.Cancel(true)), threadpool naming, max thread stack, etc. so we no longer need to manually patch those. However, two changes have been made to stock 2.2.3. Major change: WorkItem.Cancel(bool abortExecution) in our version does not succeed if the work item was in progress and thread abort was not specified. This is to match previous behaviour where we handle co-operative termination via another mechanism rather than checking WorkItem.IsCanceled. Minor change: Did not add STP's StopWatch implementation as this is only used WinCE and Silverlight and causes a build clash with System.Diagnostics.StopWatch The reason for updating is to see if this improves http://opensimulator.org/mantis/view.php?id=6557 and http://opensimulator.org/mantis/view.php?id=6586
2013-04-09minor: Log an exception if we aren't able to delete a script state file ↵Justin Clark-Casey (justincc)1-1/+6
rather than simply ignoring it. This should never normally happen but if it does then it can be valuable diagonstic information.
2013-02-27minor: remove some mono compiler warnings in script regression testsJustin Clark-Casey (justincc)1-1/+0
2013-02-19Deleted all AssemblyFileVersion directivesDiva Canto1-1/+1