Commit Graph

17978 Commits (fa5e1dde647a068db4c376427667a193d2ab97e7)

Author SHA1 Message Date
Justin Clark-Casey (justincc) fa5e1dde64 minor: remove EnableLogging() left over in CoopTerminationTests 2013-02-20 22:24:30 +00:00
Justin Clark-Casey (justincc) 0810f5f449 Try ignoring json tests if they can't be run due to being on <=.net 3.5 2013-02-20 22:24:25 +00:00
Justin Clark-Casey (justincc) 56e245e5e9 minor: Tidy up disabled logging on AssetTransactionModule for future use. Make it clear that transaction parameter to HandleUDPUploadRequest is an ID. 2013-02-20 22:24:20 +00:00
Justin Clark-Casey (justincc) 89362dbc4e minor: remove some mono compile warnings in XEngine.cs 2013-02-20 22:24:13 +00:00
Melanie 2f6ddc68b0 Prevent items being destroyed by rename operations. Renaming of a wearable also
sends an asset transaciton but it is empty. So we can't ignore name data
when a transaction is present and can't treat every transaction as valid.

Conflicts:

	OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
2013-02-20 22:23:54 +00:00
Justin Clark-Casey (justincc) 25b539e593 Fix issue where the "set terrain texture" console command did not tell the viewers that textures had updated (hence they did not display the changes).
Addresses http://opensimulator.org/mantis/view.php?id=6513
2013-02-20 22:23:46 +00:00
Talun 25a9ad1722 Mantis 6343: Turn a prim to flexy to OFF don't work llSetPrimParams
Correction so that scripts can turn Flexi off as well as on.
2013-02-20 22:23:30 +00:00
Justin Clark-Casey (justincc) d3bbfcc97b minor: Fix full scene part console report to show proper Light* names rather than all wrongly FlexiDrag 2013-02-20 22:22:32 +00:00
Justin Clark-Casey (justincc) c3cbba7778 minor: Call down to base OpenSimTestCase.SetUp() in NPCModuleTests to disable any enabled logging from previous tests 2013-02-20 22:22:26 +00:00
Justin Clark-Casey (justincc) 648932458a Disable json tests for now - I see this is failing on jenkins because mono 2.4.3 doesn't have Funcs >5 params, though mono 2.6 onwards does.
Standardize logging in JsonStoreScriptModule and some minor code formatting.
2013-02-20 22:21:50 +00:00
Justin Clark-Casey (justincc) f1b978cdf0 See if getting the registering JsonReadNotecard with MethodInfo works around an apparent issue with registering methods with more than 5 parameters on mono 2.4.3 2013-02-20 22:21:44 +00:00
Justin Clark-Casey (justincc) cb26e8a6c6 Increase logging by enabling during test setup rather than during individual tests of for JsonStore 2013-02-20 22:21:38 +00:00
Justin Clark-Casey (justincc) 7b8dc102d2 Enable logging in new json store tests to find out why they fail on jenkins but not locally. 2013-02-20 22:21:33 +00:00
Justin Clark-Casey (justincc) cf04e09521 Add JsonTestPath() regression test 2013-02-20 22:21:25 +00:00
Justin Clark-Casey (justincc) 3f50de6445 Add regression test for JsonSetValue() 2013-02-20 22:21:20 +00:00
Justin Clark-Casey (justincc) 18659dfaea minor: remove mono compiler warning in SceneCommandsModule 2013-02-20 22:21:03 +00:00
Justin Clark-Casey (justincc) ba175ee50b Add basic JsonGetValue() regression test. 2013-02-20 22:20:09 +00:00
Justin Clark-Casey (justincc) 995976c6db Add basic JsonCreateStore() regression test 2013-02-20 22:17:49 +00:00
Melanie cfc9270bae Update ScriptModuleComms name space to CoreModules 2013-02-20 22:12:59 +00:00
Melanie b2b6fd6aad Add a method to query all registered script constants to allow non-XEngine
script engines to use them.
2013-02-20 22:12:52 +00:00
Mic Bowman 96454ddee2 Moving ScriptModuleComms into the CoreModules tree. 2013-02-20 22:12:41 +00:00
Justin Clark-Casey (justincc) 4a0b9c411e Fix issue where lsl -> c# generation in co-operative termination mode did not correctly handle single statement versions of for, while and do-while loops.
Add regression tests to validate the fix.
This problem will not affect the default abort termination mode.
2013-01-30 03:59:22 +00:00
Justin Clark-Casey (justincc) e67b84613d Fix build break where implicit animation console output code crept back into AnimationsCommandModule but it doesn't exist in this branch 2013-01-24 03:09:49 +00:00
Justin Clark-Casey (justincc) d4f9982936 Remove unnecessary System.Linq reference from Compiler.cs
Hopefully will fix windows build via compile.bat
2013-01-24 03:05:11 +00:00
Justin Clark-Casey (justincc) 873ce644d3 Disable the not very useful infinite recursion co-op termination tests for now as they appear to cause failures with testing in jenkins.
These tests are not very useful anyway as they never actually get a chance to try termination before the script runs out of stack
2013-01-24 03:04:27 +00:00
Justin Clark-Casey (justincc) 1f8e43dd93 Fix mono 2.4.3 build break by using CreateInstanceAndUnwrap 9 method call deprecated in later .net versions 2013-01-24 03:04:19 +00:00
Justin Clark-Casey (justincc) 7bfd369b24 Add information on ScriptStopStrategy to [XEngine] in OpenSimDefaults.ini and OpenSim.ini.example. Default remains abort.
This setting controls whether scripts are stopped by aborting their threads externally (abort) or by co-operative checks from the compiled script (co-op)
co-op should be more stable but this option is experimental.
If moving from co-op to abort, existing script DLLs will need to be recompiled.
This currently can only be done manually, either by setting DeleteScriptsOnStartup = true for one run
or by deleting the script DLL* files in bin/ScriptEngines/<region-id>/
One can move from co-op back to abort without recompilation, but reverting back to co-op again will need script recompile
2013-01-24 03:04:09 +00:00
Justin Clark-Casey (justincc) 1da5a1ab21 Pass narrower WaitHandle rather than EventWaitHandle as co-op termination wait handle to script APIs.
APIs don't need to reference any methods on EventWaitHandle
2013-01-24 03:03:59 +00:00
Justin Clark-Casey (justincc) af30d9b07e Improve logging by making it clearer which script is failing if an assembly fails to load.
Moves the noise co-op start/stop debug log messages to only display if xengine debug level >= 1
Logs which stop strategy is being used (abort or co-op)
Adjusts some other logging to remove not very useful stuff
2013-01-24 03:03:52 +00:00
Justin Clark-Casey (justincc) b2c893a7be If ScriptStopStrategy hasn't been set to co-op in [XEngine] config, then continue to generate C# that is functionality identical to historical generation
This is to eliminate disruption until co-op termination has been well-tested.
In non co-op mode, XEngine will continue to load DLLs of the existing Script class and the new XEngineScript class.
Moving to co-op mode still requires existing script DLL deletion to force recompilation, either manually or by setting DeleteScriptsOnStartup = true for one run.
This change also means that scripts which fail to initialize do not still show up as running scripts.
2013-01-24 03:03:36 +00:00
Justin Clark-Casey (justincc) 3f80ac23b6 Add co-op termination regression test for infinite recursive manual call on event function.
Such code would normally terminate quickly with a stack overflow exception anyway.
2013-01-24 03:03:28 +00:00
Justin Clark-Casey (justincc) 701109c8c9 Set script delay factor to 0 in co-op termination tests
This is to ensure loops aren't actually terminating from a wait on an LSL function.
This was not the case with any of the existing tests.
2013-01-24 03:03:21 +00:00
Justin Clark-Casey (justincc) 5cbda393cd Add regression test for co-op termination on infinite user function call regression.
Such a script would probably run out of stack pretty quickly anyway.
2013-01-24 03:03:10 +00:00
Justin Clark-Casey (justincc) 98d0440c42 Add regression test for co-op stop of an infinite jump loop
Also fixes bug in do-while test
Improves detection of failure due to invalid script in test
Sets up xengine anew for each test rather than once for the while testsuite to improve isolation between tests.
Stop listening for chat after the first 'script is running' chat is received to reduce test run time.
2013-01-24 03:03:04 +00:00
Justin Clark-Casey (justincc) 8148d7e204 Add do-while co-op termination test
Minor changes to scripts in other tests.
2013-01-24 03:02:54 +00:00
Justin Clark-Casey (justincc) b43a6b0199 Add single and comound while loop co-op termination test 2013-01-24 03:02:47 +00:00
Justin Clark-Casey (justincc) d01943fa40 Fix bug in generating termination checks in compound statement for loop.
Add regression test for this case.
2013-01-24 03:02:39 +00:00
Justin Clark-Casey (justincc) b6daf4d4c6 factor out common code in existing co-op termination regression tests 2013-01-24 03:02:33 +00:00
Justin Clark-Casey (justincc) 4495ecd158 Increase WaitForEventCompletionOnScriptStop to 120 secs to show that the co-op setting is active in its regression tests. 2013-01-24 03:02:24 +00:00
Justin Clark-Casey (justincc) 85df66db51 minor: comment out Console.WriteLine debugging message in XEngine 2013-01-24 03:02:17 +00:00
Justin Clark-Casey (justincc) 3024d0e61c Add regression test TestStopOnLongForLoop() 2013-01-24 03:02:11 +00:00
Justin Clark-Casey (justincc) 5ac0447e0f refactor: rename XEngineTest to more descriptive XEngineBasicTests 2013-01-24 03:02:04 +00:00
Oren Hurvitz bb42862639 Assign the SmartThreadPool name in the constructor
This is required because some threads are created in the constructor, so assigning the name afterwards would be too late.
2013-01-24 03:01:26 +00:00
Justin Clark-Casey (justincc) 39b8f339ce Fix use of scene debug commands when region is set to root or a specific region where there is more than one region on the simulator. 2013-01-24 03:01:02 +00:00
Justin Clark-Casey (justincc) af99e5e74a Add "debug set set animations true|false" region console command.
Setting this logs extra information about animation add/remove, such as uuid and animation name
Unfortunately cannot be done per client yet
2013-01-24 03:00:39 +00:00
Justin Clark-Casey (justincc) f79800246a Implement non-wait co-operative termination of scripts for XEngine in addition to termination on wait.
This involves inserting opensim_reserved_CheckForCoopTermination() calls in lsl -> c# translation at any place where the script could be in a loop with no wait calls.
These places are for, while, do-while, label, user function call and manual event function call.
Call goes through to an XEngineScriptBase which extends ScriptBase.
IEngine is extended to supply necessary engine-specific parent class references and constructor parameters to Compiler.
Unfortunately, since XEngineScriptBase has to be passed WaitHandle in its constructor, older compiled scripts will fail to load with an error on the OpenSim console.
Such scripts will need to be recompiled, either by removing all *.dll files from the bin/ScriptEngines/<region-id> or by setting DeleteScriptsOnStartup = true in [XEngine] for one run.
Automatic recompilation may be implemented in a later commit.
This feature should not yet be used, default remains termination with Thread.Abort() which will work as normal once scripts are recompiled.
2013-01-24 03:00:18 +00:00
Melanie 4c1b1d89eb Complete removal of the now unused state queue 2013-01-24 02:04:41 +00:00
Diva Canto a473482413 Changed a couple of debug messages at the request of osgrid. 2013-01-24 02:04:33 +00:00
Justin Clark-Casey (justincc) 535ec23646 Implement co-operative script termination if termination comes during a script wait event (llSleep(), etc.)
This makes use of EventWaitHandles since various web references indicate that Thread.Interrupt() can also cause runtime instability.
If co-op termination is enabled, then termination sets the wait handle instead of waiting for a timeout before possibly aborting the thread.
This allows the script to cleanly terminate if it's in a llSleep/LL function delay or the next time it enters such a wait without any timeout period.
Co-op termination is not yet testable since checking for termination request within loops that never trigger a wait is not yet implemented.
This commit, unlike 1b5c41c, passes the wait handle as an extra parameter through IScript.Initialize() instead of passing IScriptInstance itself.
2013-01-24 02:03:49 +00:00
Justin Clark-Casey (justincc) 245d6435e3 Revert "Implement co-operative script termination if termination comes during a script wait event (llSleep(), etc.)"
Doing this as a favour to Melanie.  This will be back with passing the wait handles directly to the api.

This reverts commit 1b5c41c14a.
2013-01-24 02:00:13 +00:00