aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-05-27minor cleanupUbitUmarov1-3/+4
2017-05-25move assetsconnector threads to whatchdog; Abort all alive threads known to ↵UbitUmarov1-0/+1
watchdog before exit
2017-05-23 please DIE! PLEASE??UbitUmarov1-0/+3
2017-01-07coment out a flodding debug messageUbitUmarov1-2/+2
2017-01-07Queue all events for a script that is waiting to compileMelanie Thielker1-13/+56
This fixes CHANGED_OWNER the right way. It also vastly improves link message handling during object rez, which was iffy before. Now no messages are lost anymore.
2017-01-06Fix a slew of event like CHANGED_OWNER, attach() etc not working.Melanie Thielker1-1/+8
Optimization can ba taken too far. Compile scripts synchronously for interactive rezzing because otherwise all events relating to rezzing/ wearing are lost.
2017-01-05Massive tab and trailing space cleanupMelanie Thielker1-41/+41
2016-11-13prevent self call to llSetScriptState(ownname,FALSE) from blocking entire engineUbitUmarov1-3/+11
2016-11-03XEngine: make calls to gc.collect on region startup scripts loading a ↵UbitUmarov1-6/+6
configurable option, since it is very slow operation
2016-09-01Xengine only do GC.Collect if logins disabledUbitUmarov1-1/+3
2016-08-31Xengine: if option AppDomainLoading = true, create script domains for each ↵UbitUmarov1-3/+4
SOG (like already done for attachments) and not per script. This should reduce number of domains without excessive problem of deleted scripts still loaded.
2016-08-31Xengine: try to reduce memory pressure of scripts compile. Still ugly code, ↵UbitUmarov1-2/+7
possible mistakes, but i need to share it before i loose it :) )
2016-08-30Xengine: remove a no thread safe locking, don't allocate a few objects only ↵UbitUmarov1-21/+16
needed if creating a new domain
2015-09-02seems to compile ( tests comented out)UbitUmarov1-281/+100
2015-08-17Change the IScriptApi back to it's original form, removing XEngineMelanie Thielker1-0/+25
specific additions that should not have been there in the first place. Sleeping and time measurement are now completely internal to XEngine
2015-08-11When the user stops a script, have it remain stoppedOren Hurvitz1-0/+5
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-11Report "Script Execution Time" as the time spent executing the script in the ↵Oren Hurvitz1-27/+4
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-1/+1
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 calling "debug xengine log" without the 'level' parameter: this should ↵Oren Hurvitz1-1/+1
show the current log level; not crash
2015-04-21Moved over metrics from previous OpenSim 0.8.0.3 repository (this new ↵Glenn Martin1-0/+36
repository is now the master branch from OpenSim).
2015-01-29minor: correct log message when script with non-config stop strategy is ↵Justin Clark-Casey (justincc)1-1/+1
detected to log actual strategy rather than true/false
2015-01-27Correct typo in raw default script stop strategyJustin Clark-Casey (justincc)1-1/+1
2015-01-27If [XEngine] ScriptStopStrategy is different from a compiled script ↵Justin Clark-Casey (justincc)1-28/+26
strategy, ask user to manually set DeleteScriptsOnStartup = true for at least one simuator session rather than auto-recompiling. This does not work on Windows since the VM retains a handle to the DLL even if class instantiation was unsuccessful. Which causes deletion of the old DLL to fail with access sharing violations. Instead, log a warning in this situation asking the user to manually set DeleteScriptsOnStartup = true for a session (or one could separately delete the DLLs in the relevant bin/scriptengines/<region-uuid> dir For the current session, the script engine will continue using the script compiled stop strategy as before. Relates to http://opensimulator.org/mantis/view.php?id=7278
2015-01-26If an exception comes out of DoOnRezScript in DoOnRezScriptQueue(), then ↵Justin Clark-Casey (justincc)1-6/+17
only fail a single script rather than halting the exntire script startup process.
2015-01-26On a multi-region simulator when AppDomain = true, make sure the DLL from ↵Justin Clark-Casey (justincc)1-10/+108
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-17Make XEngine.SaveAllState() actually do this instead of script maintenanceJustin Clark-Casey (justincc)1-8/+8
2015-01-16minor: remove old commented out objectRemoved bool in XEngine.OnRemoveScript()Justin Clark-Casey (justincc)1-5/+0
2015-01-16Add clearqueue code adjustment that should have been in previous commit faaf47aJustin Clark-Casey (justincc)1-4/+1
2015-01-16Prevent a race condition between the script engine backup thread and script ↵Justin Clark-Casey (justincc)1-4/+2
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-3/+15
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
2014-12-30This cleans up versioning. Specifically:Diva Canto1-0/+2
- It establishes 4 digits for opensim versions - It uses the same number between opensim releases and mono addins versions It also eliminates the last addin.xml files that were still there, for consistency.
2014-12-15Remove XEngine.m_uniqueScriptsJustin Clark-Casey (justincc)1-8/+0
This provides no obvious benefit as far as I can tell but has a definite cost in keep script strings in memory for the entire simulator session.
2014-12-10Fix a regression where objects crossing regions in the same simulator (on ↵Justin Clark-Casey (justincc)1-28/+23
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-10Avoid a possible race condition where the XEngine script compile thread ↵Justin Clark-Casey (justincc)1-0/+8
could complete but see OnRezScript() insert a new job and complete before it set m_CurrentCompile = null If the above happened, it would mean the new script would not compile until some script was added for compilation.
2014-12-09In XEngine, enqueue a script rez to the compile queue after setting ↵Justin Clark-Casey (justincc)1-3/+4
m_CompileDict to avoid a rare but not impossible race condition.
2014-12-03minor: If we are recompiling scripts in response to a ScriptStopStrategy ↵Justin Clark-Casey (justincc)1-0/+8
config change (a rare situation), then explicitly log this for debug purposes.
2014-12-03Reintroduce general xengine extra debugging log level. This can be ↵Justin Clark-Casey (justincc)1-31/+32
controlled at runtime with the command "debug xengine log <level>", as with similar commands. If log level is 1 then every script load is logged. This means the <logger name="OpenSim.Region.ScriptEngine.XEngine"> section in OpenSim.exe.config is no longer needed to avoid log spam on regions with many scripts and can be removed.
2014-12-03minor: improve logged error in XEngine.SetXmlState if there was a problem ↵Justin Clark-Casey (justincc)1-1/+2
writing the linemap. The previous error report of already exists is inaccurate since existing files do get overwritten.
2014-11-29Correct 690fe0c to actually log the exception reported in ↵Justin Clark-Casey (justincc)1-1/+2
DoOnRezScriptQueue()(and now the scene name).
2014-11-29If there are any exceptions in XEngine.DoOnRezScriptQueue() then log the ↵Justin Clark-Casey (justincc)1-31/+43
error and always set m_CurrentCompile = null Setting m_CurrentCompile = null in the finally block reduces the risk that an exception could permanently stop any future scripts compiling until the simulator is restarted. If an exception is seen from this then please report and further changes to fix the bug or improve compiling reliability can be made.
2014-11-29Remove minor race condition where two threads could race on fields such as ↵Justin Clark-Casey (justincc)1-6/+6
m_ScriptFailCount as set in XEngine.DoOnRezScriptQueue()
2014-10-22remove some Xengine errors on scripted object deleteUbitUmarov1-14/+8
2014-07-18fix Xengine script instance loadUbitUmarov1-7/+6
2014-07-16Change default script stop method to co-op instead of abort.Justin Clark-Casey (justincc)1-1/+5
co-op should be more stable as it doesn't abort threads, which can trigger virtual machine instability This change will be invisible to users as script DLLs are recompiled automatically where necessary, though the change won't take affect until the next simulator restart. This change has no effect on existing script state. If you want to continue using abort, set ScriptStopStrategy = abort in the [XEngine] section of OpenSim.ini
2014-07-11minor: Move debug xengine script console command to Debug help section where ↵Justin Clark-Casey (justincc)1-1/+1
other debug commands live.
2014-07-11minor: further cleanup of old vb and yield prolog script engine references ↵Justin Clark-Casey (justincc)1-2/+0
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-9/+36
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.
2013-12-14Convert if-blocks to return statements in small functions such as ↵Eva Comaroski1-15/+5
GetStartParameter().
2013-09-16* Fix a null ref that causes a stack unwind when crossing borders. Less ↵teravus1-11/+45
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-11/+45
stack unwinding.. the faster it goes. * Tweak XEngine so that it's partially functional again. It's still not great, but basic things work.