aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-08-27Properly use ScriptBaseClass.DEBUG_CHANNEL.onefang1-3/+3
I got it wrong last time.
2021-08-25Don't strip (OWNER) out of script error report.switchonefang1-1/+1
2021-08-25Actually use ChatTypeEnum.DebugChannel instead of hard coding it's value.onefang1-1/+1
2019-10-16 add OSSL option PermissionErrortoOwner (true or false). if true ossl ↵UbitUmarov1-4/+17
functions permission errors will only be sent to prim owner, defaul false: send all around
2019-08-01make sure XEngine does release script events when a script is destroyedUbitUmarov1-0/+3
2019-06-04Warnings--onefang1-1/+1
2019-05-19Dump OpenSim 0.9.0.1 into it's own branch.onefang1-79/+126
2019-02-20Xengine: exclude a few more events from mineventdelayUbitUmarov1-1/+3
2019-02-20Xengine: don't lose state change eventsUbitUmarov1-1/+1
2018-11-26a few more changesUbitUmarov1-2/+2
2018-11-26show prim ID on script errorUbitUmarov1-0/+1
2018-01-15shut up some pesty warningsUbitUmarov1-1/+0
2017-01-07Revert "Allow OSSL scripts to softfail"Melanie Thielker1-22/+19
This reverts commit e5244fe70830d6c9ece23d26039d5cbabe9ce9ff. Conflicts: OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
2017-01-07Fix a compile issue and reintroduce the "GOD" script optionMelanie Thielker1-22/+22
2017-01-07Allow OSSL scripts to softfailMelanie Thielker1-0/+3
2017-01-05Massive tab and trailing space cleanupMelanie Thielker1-25/+25
2016-11-22replace datetime.now on just timming by faster utcnowUbitUmarov1-2/+2
2016-11-08change display and log of normal script errorsUbitUmarov1-20/+47
2016-11-03Initial update to OpenSim 0.8.2.1 source code.David Walter Seikel1-318/+488
2016-08-31Xengine: try to reduce memory pressure of scripts compile. Still ugly code, ↵UbitUmarov1-2/+0
possible mistakes, but i need to share it before i loose it :) )
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
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-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)1-79/+30
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.