Justin Clark-Casey (justincc)
fb2de29f77
Make json store tests operate on a single thread to ensure we don't run into any race related test failures in the future.
2013-02-20 22:59:38 +00:00
Dan Lake
251a70338a
WebStats will now use actual logfile as specified in OpenSim.exe.config rather than hardcoded ./OpenSim.log. This allows for rotating logs and other file appender types
2013-02-20 22:59:31 +00:00
Justin Clark-Casey (justincc)
e210dc188a
Remove very long unused IScriptHost and NullScriptHost
2013-02-20 22:58:48 +00:00
Justin Clark-Casey (justincc)
e61117669e
Remove unused ScriptEngineLoader and ScriptEngineInterface in OpenSim.Region.Framework.dll
...
I believe this predates the generic system of registering interfaces and is very long unused.
2013-02-20 22:58:41 +00:00
Justin Clark-Casey (justincc)
97fcc97902
Remove wrong code in ScriptUtils.GetAssetIdFromKeyOrItemName which would return the item ID instead of the asset ID if the identifier was a uuid that matched an inventory item name.
...
This would practically never happen.
This makes this overloaded version of the function consistent with the other version.
It looks like this accidentally came over in commit c5af16a
from Tue Oct 16 12:40:21 2012
However, there's arguably a case for looking for an item name that matches a UUID before assuming that the identifier is already an asset ID.
2013-02-20 22:58:37 +00:00
Justin Clark-Casey (justincc)
eab1b1b9f8
Allow JsonReadNotecard() to accept the name of the notecard as well as the asset ID.
...
Agreed in discussion with cmickeyb.
This is to make this consistent with similar existing LSL/OSSL functions such as llTriggerSound() and osNpcLoadAppearance() that allow an item name or an asset id.
2013-02-20 22:58:31 +00:00
Justin Clark-Casey (justincc)
87d50974f8
refactor: Move functions that lookup asset ids from task inventory or pass them through to ScriptUtils class in OpenSim.Region.Framework.dll
...
Renames functions to better reflect what they do.
This is so that code registering with modInvoke() can reuse this code to provide functions that behave in a consistent manner with existing LSL/OSSL functions.
2013-02-20 22:57:33 +00:00
Justin Clark-Casey (justincc)
78814adf01
Update ScriptModuleComms and interface wholesale from 0.7.5 as of commit 99ebff94
...
The number of deltas are making this too hard to update through cherry-picking
2013-02-20 22:43:24 +00:00
SignpostMarv
341dcbede6
moving code that will be common into private static method
2013-02-20 22:36:36 +00:00
teravus
901aa4153e
* the root prim was being given an OffsetPosition in addition to setting the position when creating the root prim. The offset position caused the positioning code to re-move the root prim when you selected it and released it.
2013-02-20 22:27:17 +00:00
Melanie
f99ba6f506
Try to fix uploaded mesh rotations - code from Avination code base.
2013-02-20 22:27:00 +00:00
Justin Clark-Casey (justincc)
85f32f184c
Fix bug where viewers would not see the "Module command functions not enabled" error if these were disabled and a viewer attempted to call one.
...
This was not working because the shouter was wrongly signalled as an agent rather than a prim
2013-02-20 22:26:53 +00:00
Justin Clark-Casey (justincc)
982d3d3faa
minor: change comment about assuming script references are textures in UuidGatherer since this is no longer the behaviour.
2013-02-20 22:26:15 +00:00
Justin Clark-Casey (justincc)
744ed1b313
Log missing assets on "fcache assets" found. This ignores references found by scanning LSL/notecard files since these are the source of false positives.
...
This also changes UuidGatherer to reutn an AssetType.Unknown for embedded script/lsl references instead of Texture, since these are often not textures.
This is added to help people in determining when they have missing assets such as textures, etc.
In this case, one wants to run "fcache clear" first.
2013-02-20 22:26:04 +00:00
Mic Bowman
69ca1498ef
Move the JsonStore regular expressions to static variables to avoid
...
recompiling on every operation. Added JsonList2Path script function
to simplify array iteration.
2013-02-20 22:25:47 +00:00
Mic Bowman
9a60039d36
Add JsonTestStore to determine if a JsonStore is associated with
...
a particular UUID.
2013-02-20 22:25:34 +00:00
Justin Clark-Casey (justincc)
f030f1dbfb
Add JsonDestroyStore() basic regression test
2013-02-20 22:25:18 +00:00
Justin Clark-Casey (justincc)
16641e5bd0
refactor: Make invocations of json store functions from the regression test simpler
2013-02-20 22:25:10 +00:00
Justin Clark-Casey (justincc)
10db078aa4
Add regression test for script func JsonRemoveValue()
2013-02-20 22:25:04 +00:00
Justin Clark-Casey (justincc)
afc93d7ac4
minor: change name of json script tests to JsonStoreScriptModuleTests instead of copy/pasted LSL_ApiInventoryTests
2013-02-20 22:24:50 +00:00
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)
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
Justin Clark-Casey (justincc)
8728d4ce6a
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.
2013-01-24 02:00:04 +00:00
Justin Clark-Casey (justincc)
44901f0b31
Instead of passing separate engine, part and item components to script APIs, pass down IScriptInstance instead.
...
This is to allow the future co-operative script thread terminate feature to detect and act upon termination requests.
This splits the assembly and state loading out from the ScriptInstance() constructor to a separate Load() method
in order to facilititate continued script logic regression testing.
2013-01-24 01:59:42 +00:00
Justin Clark-Casey (justincc)
5054a07be2
Print full stacktrace from plugin loading failure to help determine what went wrong, rather than a possibly unhelpful simple exception message.
2013-01-24 01:35:08 +00:00
Justin Clark-Casey (justincc)
2f1cc6a06a
refactor: Simplify ScriptInstance by retaining reference to SceneObjectPart instead of sometimes but not always looking it up.
2013-01-24 01:34:58 +00:00
Robert Adams
ff7693a14b
Fix exception reporting in SceneObjectPart so it logs what the exception is rather than just saying it happened.
2013-01-24 01:34:35 +00:00
Justin Clark-Casey (justincc)
e89f93c78c
Implement a workaround solution for saving manual script state changes by the user before logout instead of wrongly removing the script early.
...
This workaround relies on the fact that a closing client goes inactive before the attachments derez calls happen.
This reverts the change to remove scripts too early instead of stopping them, since the the two step stop then remove is necessary to execute the detach event.
2013-01-24 01:34:05 +00:00
Justin Clark-Casey (justincc)
d51aee876d
Save attachments on detach/exit if a contained script state has been changed.
...
This involves making Attachments module listen for start/stop script changes.
It also involves removing the script from the region on detach in the same manner as every other DeleteSceneObject() call rather than simply stopping it
This is necessary tue to the bad assymetry of start and stop script triggers but it appears to be the correct behaviour anyway, as detached objects are completely gone from the sim.
Not just in a state where their scripts have been stopped.
2013-01-24 01:30:37 +00:00
Justin Clark-Casey (justincc)
3ad03d41e6
Fix a regression in the last few scene commands changes where setting these via the viewer estate dialog stopped working.
...
Forgot to register the new interface.
Also removes some code which got included by adpating an existing module.
2013-01-24 01:30:21 +00:00
Justin Clark-Casey (justincc)
69104f38f9
Add "debug scene get" console command to list current scene options
2013-01-24 01:29:49 +00:00
Justin Clark-Casey (justincc)
c6bb0d9662
Move scene debug commands into separate module. Command changes from "debug scene <key> <value>" to "debug scene set <key> <value>" to accomodate future settings
2013-01-24 01:29:40 +00:00
Justin Clark-Casey (justincc)
73717f2ce7
refactor: route the final scene backup through the same code that handles periodic backup
...
This is rather than making unnecessary duplicate checks that the SOG later performs again.
2013-01-24 01:29:29 +00:00
Justin Clark-Casey (justincc)
03bc92d112
minor: Capitalize GroupsModule command category
2013-01-24 01:29:12 +00:00
Justin Clark-Casey (justincc)
fd015c1ed7
minor: add missing newline to "debug scene" console command
2013-01-24 01:29:03 +00:00
Justin Clark-Casey (justincc)
8e548e4c8a
Remove unimplemented "debug teleport" console command
2013-01-24 01:28:55 +00:00
Justin Clark-Casey (justincc)
44adf909b0
Add "debug scene pbackup true|false" console command. This enables or disable periodic scene backup. For debug purposes.
...
If false, scene is still saved on shutdown.
2013-01-24 01:28:47 +00:00
Justin Clark-Casey (justincc)
d43863af78
On baked texture save, replace any HG ID with an ordinary asset ID so the HGAssetBroker doesn't try to save back to the avatar's originating region
2013-01-24 01:28:29 +00:00
Justin Clark-Casey (justincc)
83c70dc914
revert accidental change to MemoryWatchdog stat calculation in previous b1b4687
2013-01-24 01:28:16 +00:00
Justin Clark-Casey (justincc)
10c1b15f12
Add "show script timers" command to show script timers. For debug purposes.
...
Also, "show sensors" changes to "show script sensors".
2013-01-24 01:28:05 +00:00
Justin Clark-Casey (justincc)
be5c6658bb
Add "show sensors" command to show script sensor information for debug purposes.
2013-01-24 01:27:58 +00:00
Justin Clark-Casey (justincc)
f0a936832b
minor: Remove unnecessary commented out code from last commit c28a2f05
and fix up code comment
2013-01-24 01:27:49 +00:00
Justin Clark-Casey (justincc)
ce5c2ee506
minor: make spacing consistent in console help output
2013-01-24 01:27:32 +00:00
Justin Clark-Casey (justincc)
bd33953c60
minor: Fix command match of "debug script" command to "debug scripts" to match other scripts commands (and it's own short help text)
2013-01-24 01:27:20 +00:00
Justin Clark-Casey (justincc)
ab22de03b8
minor: Allow "script *" console commands to take multiple script item ids
2013-01-24 01:27:13 +00:00
Melanie
61af272956
Add the new UpdateAgentInformation cap to make maturity on more recent viewers
...
work.
2013-01-24 01:27:06 +00:00
Justin Clark-Casey (justincc)
4041cb54f3
refactor: simplify llGetNumberOfPrims() to return prim count + sitting avatar count rather than independently inspecting every scene presence
2013-01-24 01:26:05 +00:00
Justin Clark-Casey (justincc)
87b4f335af
minor: Add some doc to the extremely unhelpful 'fudge....' comment as to why we're deselecting the prim in code before scheduling an update on attachment
2013-01-24 01:25:28 +00:00
SignpostMarv
f9bb9191cf
Improving documentation of AttachToAvatar and GetLine methods in LSL_Api.cs based on doxygen error output
2013-01-24 01:24:26 +00:00
SignpostMarv
4ab7697f00
updating documentation in SampleMoneyModule based on doxygen error log output; changing an xml-style hint to a uri-style hint in the class summary, improving documentation of Initialise method and removing a superfluous parameter, improving documentating of ClientClosed method and documenting an omitted parameter
2013-01-24 01:24:16 +00:00
Justin Clark-Casey (justincc)
561626fe1b
minor: Change channel digger replacement message in TerrainModule to Info from Warn.
...
This is to stop this unnecessarily triggering log analysis code which reports warn and error level statements.
2013-01-24 01:23:43 +00:00
Oren Hurvitz
86519bd407
Added locking in NullRegionData.
...
This prevents errors when one thread iterates over the regions (e.g., from RegenerateMaptileAndReregister()) while another thread is adding a region.
2013-01-24 01:22:54 +00:00
Justin Clark-Casey (justincc)
35a1949fb8
Fix indenting on ConsoleDisplayTable, align indenting on "show animations" console command
2013-01-24 01:22:46 +00:00
Justin Clark-Casey (justincc)
586a331a95
minor: minor code and log formatting fixes to recent changes in LandManagementModule
2013-01-24 01:22:34 +00:00
Justin Clark-Casey (justincc)
9b0f784c63
minor: Allow objects to be added directly to a row on a ConsoleDisplayTable rather than having to ToString() them first
2013-01-24 01:22:09 +00:00
Oren Hurvitz
ac0f5e75bd
Implemented Return Objects when it's invoked from the Top Colliders or Top Scripts dialogs
2013-01-24 01:22:01 +00:00
Justin Clark-Casey (justincc)
f283ff5949
Add "show animations" console command for debug purposes.
...
This shows the current animation sequence and default anims for avatars.
2013-01-24 01:21:52 +00:00
Justin Clark-Casey (justincc)
04ee863c33
If an NPC is unowned, then always auto-grant permissions requested via llRequestPermissions()
...
This is consistent with all other OSSL NPC functions that allow unowned avatars to be manipulated.
Aims to address http://opensimulator.org/mantis/view.php?id=6483
2013-01-24 01:21:42 +00:00
Oren Hurvitz
16349c1368
Fixed bugs when getting the root folder.
...
1. The error checking for the case where there's no "My Inventory" folder was
incorrect: it checked the wrong variable.
2. If GetSystemFolderForType() is called to get AssetType.RootFolder then
it should return the root folder immediately; not look for another root
folder below it.
2013-01-24 01:21:30 +00:00
Justin Clark-Casey (justincc)
7caf21c8a8
minor: Assign names to the different SmartThreadPools for debugging purposes.
...
A different approach to the patch in http://opensimulator.org/mantis/view.php?id=6462
that doesn't involve further forking of SmartThreadPool
2013-01-24 01:21:17 +00:00
Justin Clark-Casey (justincc)
c98d215242
refactor: call Util.InitThreadPool() if we are initializing an uninitialized pool on first use rather than constructing it ourselves.
...
No functional change.
2013-01-24 01:21:09 +00:00
Justin Clark-Casey (justincc)
2e02f49fd9
minor: If the physics module tells us that an object has gone out of bounds, more helpfully log the name, id, position and region of that object.
2013-01-24 01:19:00 +00:00
Justin Clark-Casey (justincc)
548deb9153
minor: Add commented out log lines to ScenePresenceAnimator for future debug use (such as logging anim pack contents sent to clients)
2013-01-24 01:18:39 +00:00
Justin Clark-Casey (justincc)
150c4faa79
Fix issue where calling llVolumeDetect(FALSE) would not remove phantom flag, causing subsequent issues if physics was re-enabled.
...
Added regression tests
Addresses http://opensimulator.org/mantis/view.php?id=6365
2013-01-24 01:18:25 +00:00
Justin Clark-Casey (justincc)
ba93e36fce
On XEngine.ProcessEventHandler(), instead of creating a new CultureInfo on every call use the single one set by Culture.SetCurrentCulture()
...
This is slightly different in that SetCurrentCulture() does not use overridden settings if the system culture matches en-US but some settings there have been changed.
This is what we want - we do not want to use any system overriden settings.
2013-01-24 00:44:22 +00:00
Justin Clark-Casey (justincc)
9ab580d1ea
Extend default 1 second wait for event completion to other thread script reset (as called by llResetOtherScript()).
...
As with script stop (via llDie()) aborting other scripts event threads, llResetOtherScript() can also abort any current event thread on another script.
On mono 2.6, 2.10 and possibly later this may cause locking problems in certain code areas.
This commit reuses the recently introduced [XEngine] WaitForEventCompletionOnScriptStop to make this a 1 sec timeout, rather than 0 secs.
2012-12-17 22:53:40 +00:00
Justin Clark-Casey (justincc)
7deb2d9646
minor: add some more detail to the logging if an LLClientView fails to process a packet
2012-12-14 00:00:23 +00:00
Justin Clark-Casey (justincc)
c77728ebf8
Add WaitForEventCompletionOnScriptStop [XEngine] config param to OpenSimDefaults.ini to allow change of the wait time for an event to complete on script removal before aborting its thread
...
Default is 1000, as has previously been the case.
This parameter exists for further debug work concerning mono 2.10 crashes that may be related to locks not being removed on Thread.Abort
2012-12-14 00:00:16 +00:00
Justin Clark-Casey (justincc)
83487bfbec
Log situations where workitem event threads are aborted on stop request because they failed to complete event processing within the given timeout.
...
This is for bug hunting purposes where thread aborts may be causing dangling lock issues and subsequent vm crashes on mono (with ReaderWriterLockSlim, etc.)
2012-12-14 00:00:01 +00:00
Justin Clark-Casey (justincc)
e6f475735f
Add "debug script log" command to allow setting a numeric debug level on individual IScriptInstances for debugging purposes.
...
Current, state changes and event fires can be logged for individual scripts.
See command help for more details.
2012-12-13 23:59:53 +00:00
Justin Clark-Casey (justincc)
48486b137a
Add asset id to "show script" and "show scripts" command output to make it easier to extract and inspect the script's asset via "dump asset"
2012-12-13 23:59:44 +00:00
Justin Clark-Casey (justincc)
4490020197
Use a thread abort safe version of OpenMetaverse.DoubleDictionary with the aim of avoiding OpenSimulator problems due to script thread aborts.
...
When an object is removed, its scripts are stopped and then the thread running them is aborted if stop takes too long.
However, it appears that aborting a thread at just the wrong moment when it is obtaining a ReaderWriterLockSlim lock can leave this lock in an inconsistent state.
One symptom of this is that mono leaps to 100% cpu and a vm thread dump reveals lots of threads waiting for a ReaderWriterLockSlim lock without any thread actually holding it.
This is probably the same problem as encountered originally in commit 12cebb12
This commit looks to plaster this problem by putting lock obtaining methods inside finally blocks which should be uninterruptible by thread aborts.
2012-12-12 00:40:16 +00:00
Justin Clark-Casey (justincc)
770caad0ad
minor: change method doc on GetTextureHandler.TryParseRange(), mainly to trigger another build
2012-12-12 00:39:39 +00:00
Justin Clark-Casey (justincc)
13e29ae3f7
Allow GetTexture calls with no second value in the range header (e.g. just 5333-)
...
It looks like the latest Kokua is doing this.
As per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html , leaving off the second value is legal
This indicates the caller wants the rest of the entity.
2012-12-12 00:39:29 +00:00
Justin Clark-Casey (justincc)
b52ac8c5d1
Remove very probably unused PrimitiveBaseShape(bool) constructor to reduce code complexity
2012-12-12 00:22:56 +00:00
Justin Clark-Casey (justincc)
97a907ad84
Don't pointlessly set ExtraParams = byte[1] in PrimitiveBaseShape since this is ignored by the ExtraParams properly anyway
2012-12-12 00:22:47 +00:00
Justin Clark-Casey (justincc)
7ced077821
In BaseHttpServer.HandleRequest(), use Culture.SetCurrentCulture() rather than creating a new CultureInfo separately
2012-12-12 00:22:24 +00:00
Justin Clark-Casey (justincc)
fdbd448cc7
In XEngine.DoOnRezScript() use Culture.SetCurrentCulture() instead of constructing a new CultureInfo separately
2012-12-12 00:22:15 +00:00
Justin Clark-Casey (justincc)
d8c88f4894
Instead of printing script errors out to console, put to debug log so that we also get timestamps.
...
This commit also adds script name, part name, uuid, etc. for later identification.
This information has been sent to console since 2009 but may be turned down if it proves too noisy.
However, I still currently need it to investigate some region problems probably triggered by scripting.
2012-12-06 00:31:15 +00:00
Justin Clark-Casey (justincc)
d558bbfa35
minor: Fix more compiler warnings in CoreModules tests by properly overriding OpenSimTestCase.SetUp()
2012-12-06 00:30:45 +00:00
Justin Clark-Casey (justincc)
992dc1c2c7
Add engine-wide events queued and events processed numbers to output of "xengine status" console command. For debugging purposes.
2012-12-06 00:30:38 +00:00
Justin Clark-Casey (justincc)
ce1d3e9c96
Remove some mono warnings in script tests, chiefly where SetUp() wasn't properly calling to OpenSimTestCase.SetUp()
2012-12-06 00:30:30 +00:00
Justin Clark-Casey (justincc)
a8a712e1f8
Add IScriptInstance.EventsQueued to match EventsProcessed instead of asking callers to lock and directly inspect the EventQueue
2012-12-06 00:30:18 +00:00
Justin Clark-Casey (justincc)
5a71cbe530
For now, sort "show scripts" output in descending order sorted by events processed.
...
For debug purposes - should later add options to allow different sorting or show only highest 10, etc.
2012-12-06 00:30:11 +00:00
Justin Clark-Casey (justincc)
c2bdb36c11
Add IScriptInstance.EventsProcessed stat so that we can record this information and display in "show scripts" for debug purposes
2012-12-06 00:30:04 +00:00
Justin Clark-Casey (justincc)
6d03a5d01b
minor: tidy up spacing at bottom of MundaneFrameworkTests
2012-12-06 00:29:49 +00:00
Justin Clark-Casey (justincc)
ad75cb2682
minor: also comment out the debug log message which reports searching for child agents in simulator scenes for now.
2012-12-06 00:29:15 +00:00
Justin Clark-Casey (justincc)
f46478f1df
minor: Comment out "Delivering IM to..." messages for now.
2012-12-06 00:29:07 +00:00
Justin Clark-Casey (justincc)
7c811c39c8
Fix problem where restarting the currently selected region would stop various console commands (e.g. "show users") from working.
...
This was because the "currently selected" scene reference was being left as the dead scene instead of the restarted Scene object.
2012-12-06 00:26:42 +00:00
Justin Clark-Casey (justincc)
e18d6c0956
Show many more primitive properties on console command "show part name/id/pos"
2012-11-28 03:47:11 +00:00
Justin Clark-Casey (justincc)
a7af8345a5
Fix database service unit test failures by temporarily reverting BasicDataServiceTest extending OpenSimTestCase.
...
Mono 2.4.3 doesn't like this when running nunit, with nunit throwing
AssetTests`2 : System.MemberAccessException : Cannot create an instance of OpenSim.Data.Tests.AssetTests`2[TConn,TAssetData] because Type.ContainsGenericParameters is true.
and similar. Mono 2.10.8.1 does not have this issue.
So will wait until min version of mono bumps before restoring.
2012-11-28 03:46:58 +00:00
Justin Clark-Casey (justincc)
b5ecc31096
Combine TestDeleteSceneObjectAsync() with TestDeRezSceneObject() as they are functionally identical.
...
Move TestDeleteSceneObjectAsync() and TestDeleteSceneObjectAsyncToUserInventory() from SceneObjectBasicTests -> SceneObjectDeRezTests
2012-11-28 03:46:49 +00:00
Justin Clark-Casey (justincc)
3a297c7fe6
Fix regression TestDeleteSceneObjectAsyncToUserInventory by adding a BasicInventoryAccessModule() and re-enable in test suite.
2012-11-28 03:46:41 +00:00
Justin Clark-Casey (justincc)
c3243ce0ce
Consistenly make NUnit test cases inherit from OpenSimTestCase which automatically turns off any logging enabled between tests
2012-11-28 03:46:33 +00:00
Justin Clark-Casey (justincc)
ace552ecc5
Make "show threads" and "thread abort" console commands available on all servers
2012-11-28 03:46:10 +00:00
Justin Clark-Casey (justincc)
1d75570c59
Make "force gc" console command available across all servers
2012-11-28 03:46:04 +00:00
Justin Clark-Casey (justincc)
70ccc63b83
Make "show version" console command available across all servers
2012-11-28 03:45:56 +00:00
Justin Clark-Casey (justincc)
31373ee099
Delete unused BaseHttpServer.HandleAgentRequest()
2012-11-28 03:45:50 +00:00
Justin Clark-Casey (justincc)
6d0f66ae87
minor: Make note in log if scene was restarted due to an unrecoverable physics error
2012-11-28 03:45:15 +00:00
Justin Clark-Casey (justincc)
207233335e
Add AllowRegionRestartFromClient setting to [EstateManagement] section of OpenSim.ini.
...
Setting this to false will block all restart requests from the viewer even if they are otherwise legitimate.
One use is to block region restarts if necessary whilst restart functionality remains buggy or triggers bugs in modules,
though these should be fixed as soon as practicable.
Default is true, as has been the case historically.
2012-11-28 03:44:44 +00:00
Justin Clark-Casey (justincc)
e9fbfd0905
Remove the redundant BypassPermissions() checks in EstateManagmentModule.
...
This is repeated in the PermissionsModule and checking it earlier does not allow a force override of the bypass value
2012-11-28 03:40:59 +00:00
Justin Clark-Casey (justincc)
c35f974637
minor: Add some console feedback on region restart and log who requested a region restart if done from the viewer.
2012-11-28 03:40:52 +00:00
Justin Clark-Casey (justincc)
a4007cbe71
Add regression test for checking scene close when SceneManager is asked to close
2012-11-28 03:39:31 +00:00
Justin Clark-Casey (justincc)
d70e0b1189
Add "help all" console command which will list all commands alphabetically in a single list
2012-11-28 03:39:20 +00:00
Justin Clark-Casey (justincc)
a9ce40a722
Factor out command script code.
...
This also allows comments in command scripts (lines starting with ;, # or //) to be used across all servers
2012-11-28 03:39:05 +00:00
Justin Clark-Casey (justincc)
8d207fd8e6
Make "config show/set/get/save" console commands available on all servers
2012-11-28 03:38:41 +00:00
Justin Clark-Casey (justincc)
2487adf0b1
Factor out common pid file creation and removal code.
...
Log path at which pid file is created or reason for failure to create.
2012-11-28 03:28:27 +00:00
Justin Clark-Casey (justincc)
4aa725f60b
Add "get log level" command - this returns the current server session console logging level.
...
This supersedes getting information by calling "set log level" without a 4th argument, which is confusing.
2012-11-28 03:28:19 +00:00
Justin Clark-Casey (justincc)
0686a2fba9
Remove unused BaseOpenSimServer.ShowHelp()
2012-11-28 03:28:13 +00:00
Justin Clark-Casey (justincc)
b6305011db
Make "set log level" command available across all servers
2012-11-28 03:28:06 +00:00
Justin Clark-Casey (justincc)
9cdf5199df
Make "show info" command available across all servers
...
This helpfully lists version information, startup location and console log level
2012-11-28 03:27:59 +00:00
Justin Clark-Casey (justincc)
632dad337b
Factor out common registration of "show uptime" command
2012-11-28 03:27:52 +00:00
Justin Clark-Casey (justincc)
08234d0097
factor out common HandleShow code for "show uptime"
2012-11-28 03:27:43 +00:00
Justin Clark-Casey (justincc)
d68ba391fc
refactor: Factor out copy/pasted server uptime report code
2012-11-28 03:27:36 +00:00
Justin Clark-Casey (justincc)
603a140eb7
If an asset POST does not contain well-formed XML, return a 400 (Bad Request) HTTP status rather than simply dropping the request.
2012-11-28 03:27:30 +00:00
Justin Clark-Casey (justincc)
fd31f05cf0
Add regression test for a good request made to the asset service post handler.
...
Adds new OpenSim.Server.Handlers.Tests.dll to test suite
2012-11-28 03:27:15 +00:00
Justin Clark-Casey (justincc)
a8152c57b3
If GetAgents() is called with an empty userIDs array then don't bother with a useless potentially network call on the scene presence service connector.
...
This also eliminates the "[PRESENCE HANDLER]: GetAgents called without required uuids argument"
which has started to pop up in the logs when a call is made with an empty uuid array as occasionally happens.
2012-11-28 03:27:08 +00:00
Justin Clark-Casey (justincc)
4753d14a19
refactor: Move common presence connector code into BasePresenceServiceConnector
2012-11-28 03:26:50 +00:00
Justin Clark-Casey (justincc)
ee5e61d448
minor: If logging full incoming HTTP data, don't deceptively print ... at the end of the body.
2012-11-28 03:21:42 +00:00
Justin Clark-Casey (justincc)
41b76c4b9e
Remove old InventoryService, which has for a long time been replaced by XInventoryService.
2012-11-28 03:21:31 +00:00
Justin Clark-Casey (justincc)
314de0fc49
Remove unnecessary ability to directly set InventoryItemBase.CreatorIdAsUuid
...
This was necessary historically but hasn't been for many years.
Can still get CreatorIdAsUuid, which is really just a UUID cached version of the string CreatorId
2012-11-28 03:21:23 +00:00
Justin Clark-Casey (justincc)
93f7e4fb9d
Do not allow invariants to change on calls to XInventoryService.UpdateItem()
...
This is to help track down http://opensimulator.org/mantis/view.php?id=6359 where creator IDs on items and rezzed objects have been reported to sometimes change.
This should never happen - a particular item should never change creators (if an item is given then a new item (with new id) is created).
Invariants are inventory type, asset type, folder (changed only on MoveItems()), CreatorIdentification and Owner.
If caller attempts to change an invariant, warning is logged but other properties are still changed.
If you see this warning, reporting on Mantis 6359 would be very welcome with the exact operation being done at the time.
2012-11-28 03:21:15 +00:00
Justin Clark-Casey (justincc)
f8adf4de2f
Add basic XInventoryServicesTests.TestAddItem() regression test.
2012-11-28 03:21:06 +00:00
Justin Clark-Casey (justincc)
08f0274b5a
refactor: Move stat classes out of StatManager and into their own files for clarity.
2012-11-28 03:20:59 +00:00
Justin Clark-Casey (justincc)
94748aab84
Add a first draft mechanism for the IncomingPacketsProcessedStat to show the delta over time.
...
The chief motivation for this is to be able to tell whether there's any impact on incoming packet processing from enabling extra packet pooling.
2012-11-28 03:20:50 +00:00
Justin Clark-Casey (justincc)
468d1cf03e
refactor: move common inventory folder version update code to parent class in mysql, mssql and sqlite database plugins
2012-11-28 03:20:28 +00:00
Justin Clark-Casey (justincc)
e8e6bc0c6a
Improve inventory folder version updating for mssql database plugin.
...
I am not in a position to test this so the updates have been done blind.
If it needs any fixing will probably require patches.
2012-11-28 03:07:05 +00:00
Justin Clark-Casey (justincc)
e263368656
Implement folder version updating for the sqlite inventory plugin
2012-11-28 03:06:51 +00:00
Justin Clark-Casey (justincc)
4b6a9d107d
Handle Map block requests on a separate thread rather than the main packet handling thread.
...
This prevents a slow grid information network call from holding up the main packet handling thread.
There's no obvious race condition reason for not doing this asynchronously.
2012-11-28 03:06:43 +00:00
Justin Clark-Casey (justincc)
ee5454fd4a
Do HandleMapLayerRequest on its own thread rather than on the main inbound udp packet handling thread.
...
There's no obvious race condition reason for doing this on the main packet handling thread.
2012-11-28 03:06:35 +00:00
Justin Clark-Casey (justincc)
38d2d6a20c
Following on from 4f982596
, launch map name requests on an async thread from LLClientView directly.
...
This releases the inbound packet handling thread marginally quicker and is more consistent with the other async packet handling
2012-11-28 03:06:28 +00:00
Justin Clark-Casey (justincc)
7e493b9665
Make PacketPool class stats pull stats instead of push stats so they can be lifted up into LLUDPServer and be distiguished by scene name
2012-11-28 03:06:19 +00:00
Justin Clark-Casey (justincc)
b7c1a37676
Add IncomingPacketsProcessedCount stat for diagnostics.
...
Also puts some packet processing counts in a container named after the scene so that stats can be collected from more than one scene.
2012-11-28 03:06:12 +00:00
Justin Clark-Casey (justincc)
4fe042aa7f
More consistently dispose of SqliteCommand in OpenSim.Data.SQLite where possible.
...
Not doing SQLiteInventoryStore since this is no longer used and should disappear in the future.
2012-11-28 03:06:00 +00:00
Justin Clark-Casey (justincc)
a83218fd08
If no ISimulationDataStore or IEstateDataStore implementations could be loaded then halt with informative message rather than a later NRE.
...
Halt already occurs if the relevant config sections are not present.
So it also makes sense to halt if the implementations themselves cannot be loaded.
2012-11-28 03:05:49 +00:00
Justin Clark-Casey (justincc)
221af2da70
minor: Add some explanative method doc to SceneHelpers.SetupSceneModules()
2012-11-28 03:05:16 +00:00
Diva Canto
c6c6ac0a3e
Fix Unit tests -- the module contract was not being honored in the set up of scenes.
2012-11-28 03:04:02 +00:00
Justin Clark-Casey (justincc)
a5fdfd6343
Uncomment SceneObjectBasicTests.TestDeleteSceneObjectAsyncToUserInventory() and make it compile again
...
Not currently in test suite since not yet working.
Also add method doc to Scene.DeRezObjects()
2012-11-28 03:03:26 +00:00
Diva Canto
72e0c77f91
Minor improvement in the MapSearchModule. Stop blocking the client thread if the search takes too long.
2012-11-28 03:03:18 +00:00
Justin Clark-Casey (justincc)
db045e69f9
Also add the additional ScriptException constructor necessary to get [Serializable] to work.
2012-11-28 02:59:53 +00:00
Justin Clark-Casey (justincc)
6a54cb871b
Mark ScriptException as [Serializable] for when it has to cross AppDomains
2012-11-28 02:59:47 +00:00
Justin Clark-Casey (justincc)
3619a83b28
Handle UUIDGroupName and ObjectGroup viewer UDP requests asynchronously rather than synchronously.
...
This is to avoid the entire scene loop being held up when the group service is slow to respond.
There's no obvious reason for these queries to be sync rather than async.
2012-11-28 02:59:39 +00:00
Justin Clark-Casey (justincc)
e3927d2868
Make "show object part" command correctly display script status.
...
Uses new IEntityInventory.TryGetScriptInstanceRunning()
Makes it clearer that TaskInventoryItem.ScriptRunning cannot be used as it is temporary and not updated.
2012-11-28 02:59:30 +00:00
Justin Clark-Casey (justincc)
fe503de17a
Only create a new list to check if objects have reached targets if there actually are any targets.
2012-11-28 02:59:13 +00:00
SignpostMarv
5498a64a9f
fixing poorly-formatted xml doc string for Util.IsInsideBox
2012-11-28 02:58:37 +00:00
SignpostMarv
3148a231db
refactoring llGetPos() to take advantage of implicit converter
2012-11-28 02:58:22 +00:00
Justin Clark-Casey (justincc)
bffdf20721
Fix memory leak where removing an NPC did not remove its circuits.
...
This was because we were removing by circuitcode where NPCs have no code.
Now removing by agent ID instead.
This commit also fixes the "show circuits" console command to work properly where the circuit has no associated IP address.
2012-11-28 02:57:13 +00:00
Justin Clark-Casey (justincc)
a4b64d4854
Add "force gc" region console command which manually invokes garbage collection.
...
For debugging purposes.
2012-11-28 02:57:02 +00:00
Melanie
fe195e0a9c
Deep copy the collection of at_target objects so it can't be modified while
...
it's being iterated
2012-11-28 02:56:53 +00:00
Justin Clark-Casey (justincc)
9d70f48207
minor: Fix verbose IAR save message to make it a bit clearer that item data is being saved at that point, not asset data.
2012-11-28 02:56:44 +00:00
Justin Clark-Casey (justincc)
d83df8c1cf
Fix "save iar" hanging permanently if the asset request phase times out.
...
Unlike "save oar", this was happening on the same thread as the original request.
The timeout happens on another so the original thread is never aborted.
On "save oar" this leaves the thread hanging (still bad) but on "save iar" it left the console thread hanging.
Temporary fix is to make "save iar" do asset request on a separate thread, like "save oar".
Longer term fix will be to restructure asset save to use a ManualResetEvent rather than a separate timeout timer.
2012-11-28 02:56:34 +00:00
Justin Clark-Casey (justincc)
c7c6c12146
minor: Make the error thrown logged when a simulator in grid mode is trying to set estate owner to a user that doesn't exist a little more obvious.
2012-11-28 02:56:22 +00:00
SignpostMarv
e83a4c24ee
Formatting and casing correction in WorldCommModule, trailing new line in OSSL to get git diff to not complain
2012-11-28 02:56:09 +00:00