Commit Graph

15498 Commits (fa4ea2db1710ff8656716ea922054484cdee2be5)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 66749eafdd refactor: use cleaner LSL_Rotation quaternion constructor in LSL_Api.GetPartRot() 2013-04-02 21:41:15 +01:00
Justin Clark-Casey (justincc) 2fd9456f4f minor: save some commented out log lines which will be useful again in future debugging of VectorRenderModule 2013-04-02 21:39:33 +01:00
Justin Clark-Casey (justincc) 7af13bcca3 Make C# scripts return correct error line and column numbers instead of failing because they have no linemap.
Adapted fix from http://opensimulator.org/mantis/view.php?id=6571
Thanks Nickel Briand
2013-04-02 21:39:21 +01:00
Justin Clark-Casey (justincc) 85a327dc59 Add DisableInterRegionTeleportCancellation option in [EntityTransfer] section of OpenSim.ini. False by default.
This option allows the simulator to specify that the cancel button on inter-region teleports should never appear.
This exists because sometimes cancellation will result in a stuck avatar requiring relog.
It may be hard to prevent this due to the protocol design (the LL grid has the same issue)
In small controlled grids where teleport failure is practically impossible it can be better to disable teleport cancellation entirely.
2013-04-02 21:39:15 +01:00
Justin Clark-Casey (justincc) adfc8ade9a Improve teleport cancellation in some circumstances, though cancelling teleports is still not recommended.
Previously, hitting the cancel button on a teleport would cancel on the client side but the request was ignored on the server side.
Cancel would still work if the teleport failed in the early stages (e.g. because the destination never replied to early CreateAgent and UpdateAgent messages).
But if the teleport still completed after a delay here or later on, the viewer would become confused (usual symptom appears to be avatar being unable to move/reteleport).
This commit makes OpenSimulator obey cancellations which are received before it sends the TeleportFinish event queue message and does proper cleanup.
But cancellations received after this (which can happen even though the cancel button is removed as this messages comes on a different thread) can still result in a frozen avatar.
This looks extremely difficult and impossible to fix.
I can replicate the same problem on the Linden Lab grid by hitting cancel immediately after a teleport starts (a teleport which would otherwise quickly succeed).
2013-04-02 21:39:09 +01:00
Justin Clark-Casey (justincc) 03983edc3b minor: remove mono compiler warning in SceneObjectUndoRedoTests 2013-04-02 21:39:03 +01:00
Justin Clark-Casey (justincc) 49bb9b383f minor: Remove mono compiler warnings from LSL_ApiHttpTests 2013-04-02 21:38:58 +01:00
Justin Clark-Casey (justincc) 248cb10b24 minor: Remove mono compiler warnings in EventQueueTests 2013-04-02 21:38:54 +01:00
teravus 5201433d8b * Apparently, sometimes texture entries come in from the wire with no default texture defined.. so apply better fallback protection against that. The net result is clients will have their selected textures set when they would have previously had an ignored exception. 2013-04-02 21:38:43 +01:00
teravus 0793e6df25 * Just another one of those new packet blocks causing a null ref. Defaulting to zero length array..... 2013-04-02 21:38:30 +01:00
Justin Clark-Casey (justincc) a74aef6a81 Add code for testing event queue messages recevied on region cross.
This is currently disabled pending an improvement in the test code to properly add avatars when an event queue module is present.
2013-04-02 21:37:12 +01:00
Justin Clark-Casey (justincc) 6fb29865f5 Add regression test for presence crossing between regions on the same simulator.
Unlike a much earlier commented out version of this test, this is done in synchronous mode.
2013-04-02 21:36:49 +01:00
Mic Bowman c5a6b61218 Per discussions with justincc... split the JsonStore type
functions into one for node type and one for value type.
Define and export constants for both nodes and values.
2013-04-02 21:32:18 +01:00
Mic Bowman e6a97e9864 Convert doubles passed back through the MOD interface into LSL_Floats 2013-04-02 21:31:40 +01:00
teravus ca7959c82f * Update LibOMV to f8f8e616b37a7ea22b7922b2331999bc06725bf9
* Add zero length blocks to the new packet blocks to remain compatible with older viewers and avoid a NullRef when _packets_.cs calls the Length parameter..    which adds up the Length property all of the blocks.
2013-04-02 21:20:29 +01:00
Robert Adams 5d187b9b28 Streamline stat registration code in ServerStats. Remove most of the
usage of ProcessCounters which tend to fail oddly and are not supported
everywhere.
2013-04-02 21:14:55 +01:00
Robert Adams 663809479d Make StatsManager default output a little more readable 2013-04-02 21:14:49 +01:00
Robert Adams 452f6894ef Add EventHistogram.GetHistogramAsOSDMap that returns that parameters
about the histogram as well as the values.
2013-04-02 21:14:43 +01:00
Robert Adams caceca87e4 Modify StatsManager so console command "show stats category container"
only outputs the statistics in the specified container in the category.
2013-04-02 21:14:34 +01:00
Robert Adams f3943a3677 Addition of ServerStats shared region module which collects and registers
server wide statistics (CPU%, network bytes sent, ...) with StatsManager.
2013-04-02 21:14:24 +01:00
Robert Adams 7d63676cfc Add a virtual ToOSDMap() function to Monitoring.Stat for future
overloading by aggregation statistics and browser based stat viewers.
2013-04-02 21:13:15 +01:00
Robert Adams d99441de25 Add CounterStat which is a wrapper for a counter stat but, because
the 'count' event is internal, historical data can be built it.
Also includes EventHistogram class for building time based,
bucketed history of event occurances.
Make Stat implement IDisposable for subclasses that might need it.
2013-04-02 21:13:07 +01:00
Robert Adams dee74834be Add a method to IStatsCollector for returning stats as an OSDMap.
Extend implementors of IStatsCollector to return an OSDMap of stats.
Update UserStatsCollector and AssetStatsCollector to return both
string and OSDMap data (as well as console format).
2013-04-02 21:12:48 +01:00
Justin Clark-Casey (justincc) a46b02a3ae Fix issue in the mesh upload flag module where the ID of the last agent to request the capability was always used instead of the original requesting agent for each cap.
Should address http://opensimulator.org/mantis/view.php?id=6556
2013-03-06 23:36:26 +00:00
Justin Clark-Casey (justincc) b265eefd01 minor: Log location in which simulator/robust was started.
Useful information for system debugging, especially if logging and ini files locations have been changed from defaults.
2013-03-06 23:35:33 +00:00
Justin Clark-Casey (justincc) f8a57edb2c Fix potential concurrency issue since the LSL notecard cache was not being checked for expiry under lock 2013-03-06 23:35:18 +00:00
Justin Clark-Casey (justincc) ff199668fe Fix bug where simultaneous calls by different scripts to llGetNotecardLine() or llGetNumberOfNotecardLines() would sometimes not trigger a dataserver event.
This was because the notecard asset ID was being used as the request identifier.
Now using a random ID, in common with other code using the DataServer
2013-03-06 23:35:12 +00:00
Justin Clark-Casey (justincc) f95c5dd58e Add regression tests for llGetNotecardLine() 2013-03-06 23:35:07 +00:00
Diva Canto 75790c2393 Removed duplicate 'using' statement. 2013-03-06 23:35:01 +00:00
Justin Clark-Casey (justincc) 1de04b94e0 minor: Change summary in "show appearance" console command to "incomplete" rather than "corrupt"
Corrupt is misleading - it implies textures were uploaded but are not j2k valid.
The actual situation is that at least one required baked texture is not present.
2013-03-06 23:26:44 +00:00
Melanie 74c8cf0406 Fix shape parameters sent for meshes tosupport the full number of faces 2013-03-06 23:22:28 +00:00
Justin Clark-Casey (justincc) f80ce30f4b Get "show modules" console command to obey selected command line region/s 2013-02-28 00:10:12 +00:00
Justin Clark-Casey (justincc) 4d9307753a Get "show modules" console command to show modules in alphabetical order, and group shared and non-shared modules together
This is to make it easier to tell if a region has a certain module active or not
2013-02-28 00:08:27 +00:00
Justin Clark-Casey (justincc) 889efb6bef Add asset name and description truncation warnings to SQLite database plugin for consistency. 2013-02-28 00:04:26 +00:00
Justin Clark-Casey (justincc) fd501ae45f Add more information to warnings logged when asset names and descriptions have to be truncated for database storage
On balance, I still think this is useful because asset names and descriptions can sometimes be helpful in determining what things are.
Even though they are never subsequently (inventory names/descriptions are always used instead).
2013-02-28 00:04:19 +00:00
Justin Clark-Casey (justincc) 93d16b90a4 minor: remove some mono compiler warnings in script regression tests 2013-02-28 00:04:12 +00:00
Justin Clark-Casey (justincc) b53362cdb0 Show http poll handlers in separate http (poll) section of "show http-handlers" console command instead of never showing them (due to a previous bug).
The code was assuming that poll handlers were also included in general http handlers but this was not the case.
2013-02-28 00:03:49 +00:00
Justin Clark-Casey (justincc) bbfde60ad5 Add regression test for llReleaseUrl() (and for llRequestUrl)
Forgot to add file for llRequestUrl() test in commit b8a7c8b
2013-02-28 00:02:47 +00:00
Justin Clark-Casey (justincc) ce2bf496a4 Make sure we dispose of WebResponse, StreamReader and Stream in various places where we were not already. 2013-02-28 00:02:15 +00:00
Justin Clark-Casey (justincc) cfd0a5d34c minor: remove warning in ConfigurationLoaderTest 2013-02-28 00:01:59 +00:00
Justin Clark-Casey (justincc) 28219d622f Add regression test for llRequestUrl() 2013-02-28 00:01:40 +00:00
Justin Clark-Casey (justincc) e13f71048d minor: Add doc to ScenePresence.IsInTransit to make it clear that this is set only for region crossing and not teleport, etc. 2013-02-28 00:01:17 +00:00
Justin Clark-Casey (justincc) 772a0d785d Make reset of EntityTransferStateMachine for an avatar transfer always happen despite unexpected exceptions.
This means that if such an exception does occur, the region does not need to be reset before that user can teleport from it again.
This is all Oren's code from his patch in http://opensimulator.org/mantis/view.php?id=6374 but I've chosen to split it in two.
2013-02-28 00:01:09 +00:00
Justin Clark-Casey (justincc) 2bde9e4f89 Correct mistake in parsing 'show object pos' and similar pos commands where the 'to' text would be treat as the end vector rather than discarded.
Before this, the commands still work but the help text is wrong - one has to leave out the 'to' in stating the vectors
2013-02-20 23:42:38 +00:00
Mic Bowman ee26b56cc6 Fix the JsonStore path set problem justincc found earlier today and
remove the deprecated TestPath functions.
2013-02-20 23:42:12 +00:00
Justin Clark-Casey (justincc) baf1af2abf Give the user some feedback about the success or failure of console login property commands 2013-02-20 23:38:51 +00:00
Justin Clark-Casey (justincc) 420b94d358 Convert JsonTestPath() use in json regression tests to JsonGetPathType() instead 2013-02-20 23:38:28 +00:00
Justin Clark-Casey (justincc) dd5f9b0103 minor: Rename regression test method TestGetArrayLength() -> JsonTestGetArrayLength() to match others 2013-02-20 23:38:07 +00:00
Justin Clark-Casey (justincc) 7d5613bc16 Separate IAR tests into separate files for load/save/loadpath tests 2013-02-20 23:37:30 +00:00
Justin Clark-Casey (justincc) f7de17c9d9 Make it so that "load iar / ..." does not save the 'root' "My Inventory" folder.
Really "My Inventory" is just the name of the root, it isn't a folder in its own right.
This also makes it more intuitive for users to save whole inventory iars for backup/later restoration, as they don't need to remember to use /*
/* will still work and this is a special case just for the root
If you want to save only the contents of other folders (rather than the folder itself), you still need to specify something like a/b/*
Added a regression test for this case.
2013-02-20 23:37:26 +00:00
Justin Clark-Casey (justincc) f1b49aaa99 Add regression test TestSaveNonRootFolderToIar 2013-02-20 23:37:18 +00:00
Dan Lake b779ab041b Use SortedDictionary in StatsManager instead of regular Dictionary so stats will interate and print in a defined order 2013-02-20 23:37:11 +00:00
Justin Clark-Casey (justincc) a402571a60 Enable one sub-test in TestJsonSetValue() which now works (using identifier with embedded .).
Need to look further at other still commented tests.
Still need to check coverage against some of Mic's scripts.
2013-02-20 23:37:07 +00:00
Justin Clark-Casey (justincc) 7e75fd7dcb Rename JsonSetValueJson() -> JsonSetJson() and JsonGetValueJson() -> JsonGetJson()
This is because JsonGetJson() is getting json from anywhere in the structure, not just values.
Equally, JsonSetJson() is setting any type of json, not just json which represents a value.
Agreed with cmickeyb
2013-02-20 23:37:00 +00:00
Justin Clark-Casey (justincc) 282123cb00 Comment out regression TestJsonTestPath and TestJsonTestPathJson as these will go away soon 2013-02-20 23:36:54 +00:00
Justin Clark-Casey (justincc) 476ad0550f Add regression TestJsonList2Path() 2013-02-20 23:36:48 +00:00
Justin Clark-Casey (justincc) 6e612937c7 Add regression TestGetArrayLength() 2013-02-20 23:36:41 +00:00
Justin Clark-Casey (justincc) c992037d50 Add regression TestJsonGetPathType() 2013-02-20 23:36:36 +00:00
Justin Clark-Casey (justincc) fe06b49dd6 Rename new JsonScript functions JsonPathType() -> JsonGetPathType() and JsonArrayLength() -> JsonGetArrayLength()
This is for consistentency with the verb:noun naming approach existing json script functions and other script functions.
Corresponding c# methods also changed since verb:noun is also the .net c# method naming guideline (as used by OpenSimulator) and for consistency with script functions.
As agreed with cmickeyb
2013-02-20 23:36:20 +00:00
Justin Clark-Casey (justincc) 1df97c2385 Make new JsonStore script constants separated with underscores, to be consistent with existing LSL/OSSL, etc script constants.
Agreed with cmickeyb
2013-02-20 23:36:15 +00:00
Justin Clark-Casey (justincc) 37ab587f27 Fix a very unlikely-to-occur NullReferenceException race condition in llPushObject() where the code assumed that the physics actor it null-checked would still be null when it invoked a method on it 2013-02-20 23:36:05 +00:00
Mic Bowman 12201bf7f4 Adds a couple requested functions to the JsonStore script
interface. JsonPathType returns the type of node pointed to by the
path and deprecates the functionality of both JsonTestPath
functions. JsonArrayLength returns the length of an array node.
2013-02-20 23:36:00 +00:00
Mic Bowman c7179ff454 Make path parsing more robust in the JsonStore. 2013-02-20 23:35:53 +00:00
Justin Clark-Casey (justincc) 841ca0fe38 Add more sub-tests to TestJsonSetValue for paths containing []{} without {} delineation.
As expected, values are not set and the set call returns FALSE (0).
As a reminder, these tests are not currently running on jenkins continuous integration as the functionality is only available on .net 4 (mono 2.8 and later).
2013-02-20 23:35:32 +00:00
Justin Clark-Casey (justincc) 1ee6822e39 Extend JsonTestSetValue() with tests for escaping brackets, periods and unbalanced braces from paths
The sub-tests that are commented out are currently those which fail unexpectedly based on my understanding of the path syntax
2013-02-20 23:35:27 +00:00
Justin Clark-Casey (justincc) 3fdeb559f0 Add test for array as root element in TestJsonCreateStore() 2013-02-20 23:35:20 +00:00
Justin Clark-Casey (justincc) 50811b02ab Extend TestJsonRemoveValue() with tests for non-penultimate nodes and arrays 2013-02-20 23:35:15 +00:00
Justin Clark-Casey (justincc) 009178d7dd Extend TestJsonCreateStore() with a one key input and an input with raw number values 2013-02-20 23:35:07 +00:00
Justin Clark-Casey (justincc) 7cacf5f8a0 Use an integer when specifying the XWorkItem wait rather than a TimeSpan to avoid a Windows casting issue in SmartThreadPool for large TimeSpans.
TimeSpan.Milliseconds is an int64.  However, STP casts this to an int (32-bit).
If TimeSpan.MaxValue is given then the casting results in an invalid value for the SDK WaitHandle.WaitAll() call.
This was causing the co-op script termination regression tests to fail on Windows but not Mono 2.10.8 (which is perhaps not strict in the negative values that it accepts).
Solution here is to use the int millisecondsTimeout STP call rather than the TimeSpan one.
This also allows us to more clearly specify Timeout.Infinite rather than TimeSpan.MaxValue
Thanks to Teravus for this spot.
2013-02-20 23:34:59 +00:00
Justin Clark-Casey (justincc) b1740e11de Re-enable subtest for single quoted token in TestJsonSetValueJson()
This is in response to the resolution of http://opensimulator.org/mantis/view.php?id=6540
2013-02-20 23:34:52 +00:00
Mic Bowman b6cbda61b3 Adds the parameter for OSD serialization to encode default values. This
makes the JsonStore get/set operations symmetric.
2013-02-20 23:34:21 +00:00
Mic Bowman 914ebd7476 Fix handling of string values in JsonSetValueJson(). There are
some oddities with empty strings: the Json serializer treats them
as default values and does not return them in serialized hashes.
2013-02-20 23:30:24 +00:00
Justin Clark-Casey (justincc) 7d68559e15 Add regression TestJsonSetValueJson()
The part to test setting of single leaf-node string tokens is currently commented out.
See http://opensimulator.org/mantis/view.php?id=6540
2013-02-20 23:30:19 +00:00
Justin Clark-Casey (justincc) 5c75e43a70 Add regression TestJsonGetValueJson() 2013-02-20 23:30:12 +00:00
Justin Clark-Casey (justincc) 79dd5f2692 Add regression TestJsonTestPathJson() 2013-02-20 23:30:07 +00:00
Justin Clark-Casey (justincc) 216ef7522a Add section to TestJsonGetValue() to test call on a sub-tree 2013-02-20 23:30:03 +00:00
Justin Clark-Casey (justincc) ccd1bac994 Extend TestJsonTestPath() for non-terminating section of path (i.e. one that does not point to a value/leaf) 2013-02-20 23:29:57 +00:00
Justin Clark-Casey (justincc) 182c66cea1 Add section to TestJsonSetValue() to test attempted set of value where the penultimate section of path does not exist 2013-02-20 23:29:52 +00:00
Justin Clark-Casey (justincc) 7fe768a98d Add test to try reading notecard into an invalid path in TestJsonReadNotecard() regression test 2013-02-20 23:29:47 +00:00
Melanie 4fd176f479 Fix code to check for no spawn points. Possibly a merge artefact? 2013-02-20 23:29:42 +00:00
BlueWall 2be88cd46c Fix teleport/telehub issue:
Fix bug that allowed only login access to regions with mis-configured telehubs. Administrators now have teleport access when there exists a mis-configured telehub in the region. Estate owners are now placed at region center in the absence of spawnpoints instead of being denied access. Grid Gods are unrestricted. All others are denied access to the region until spawnpoints are assigned to the telehub object.
2013-02-20 23:29:30 +00:00
Mic Bowman 5a2895977a Make JsonStore path parsing more robust. Should fix the
invalid path problem.
2013-02-20 23:28:46 +00:00
Oren Hurvitz 7fc820b3fd Fixed ReadSculptData(): the check whether there are enough bytes to read was incorrect 2013-02-20 23:22:29 +00:00
Oren Hurvitz 72838a04d6 Fixed check for 0 results in GetUserAccounts() 2013-02-20 23:22:22 +00:00
Mic Bowman 9ee6c06ec8 Broaden the internal OSD type checks to parse JSON that has
non string values.
2013-02-20 23:20:33 +00:00
Justin Clark-Casey (justincc) 5393ecfa75 Don't allow exceptions to propogate from FlotsamAssetCache which may occur when deleting expired files or stamping the region status file.
Changes various error level log lines to warn since these are not fatal to the operation of OpenSimulator
2013-02-20 23:10:49 +00:00
Mic Bowman f6ddd20413 Fix the return values for JsonDestroyStore, JsonRemoveValue, and JsonSetValue.
Fix the link message status when reading a notecard.
2013-02-20 23:10:42 +00:00
Justin Clark-Casey (justincc) b46a9cf57f If a component of a coalesced object fails to deserialization, do not add a null where the object should be.
This prevents a later load IAR failure.
This code is currently only used by IAR loading.
2013-02-20 23:10:34 +00:00
Justin Clark-Casey (justincc) aab719dc18 On IAR loading, if loading of a coaleseced item entirely fails, then continue with the IAR load rather than failing completely. 2013-02-20 23:10:28 +00:00
Justin Clark-Casey (justincc) 90d71d423c Refine TestJsonReadNotecard() and use / instead of . to separate paths.
An attack of the stupid meant that I was using / as a path separator.
Fixing this makes the tests behave better, though still with some questions.
Also, I imagine / shouldn't really put data in the root as that's not a valid identifier.
This commit also fix the / mistake in other tests those this does not affect their outcomes.
2013-02-20 23:10:22 +00:00
Justin Clark-Casey (justincc) 3f6feec914 Extend TestJsonReadNotecard() for reads to non-root locations and fake stores.
Assertions for loading to non-root paths are currently commented out because this doesn't seem to be working.  Will be raising mantis to resolve.
2013-02-20 23:10:15 +00:00
Justin Clark-Casey (justincc) 6874d56452 Stop wrongly create a receiving store already populated with "Hello":"World" in TestJsonReadNotecard() 2013-02-20 23:10:08 +00:00
Justin Clark-Casey (justincc) 23df5768c3 Extend TestJsonWriteNotecard() regression test for cases with fake paths and fake stores.
Also separates out TestJsonWriteReadNotecard() into separate write and read tests
2013-02-20 23:10:03 +00:00
Justin Clark-Casey (justincc) f52cee9732 Extend TestJsonSetValue() regressio ntes tto test against a fake store 2013-02-20 23:09:58 +00:00
Justin Clark-Casey (justincc) 37e4186ad8 Extend TestJsonTestPath() regression test with checks against fake values and fake stores 2013-02-20 23:09:54 +00:00
Justin Clark-Casey (justincc) 5be2483e93 Add tests for removing fake values/from fake store in TestJsonRemoveValue()
Again, need to check if returning true for removing a value that doesn't exist is most appropriate.
2013-02-20 23:09:49 +00:00
Justin Clark-Casey (justincc) 6418b89fd6 Add testing for getting non-existing values and values from a non-existing datastore to TestJsonGetValue() 2013-02-20 23:09:44 +00:00
Justin Clark-Casey (justincc) c67f791097 Add TestJsonDestoreStoreNotExists()
This still returns true even if we ask to destroy a store that does not exist.
Need to check that this is more appropriate behaviour.
2013-02-20 23:09:36 +00:00
Justin Clark-Casey (justincc) 001bbb0b16 Fix a recent regression in e17392a where JsonSetValue() stopped working (probably other functions as well).
Fix is to call through to the no-arg constructor from the string constructor in JsonStore, which I suspect was just forgotten.
This was actually picked up by the TestJsonSetValue() regression test failing
But this isn't being run on jenkins due to the .net version issue.
This commit also puts the full stack trace in logged messages and makes these error level messages instead of info
2013-02-20 23:08:46 +00:00
Justin Clark-Casey (justincc) 365292e38f Add TestJsonWriteReadNotecard() regression test 2013-02-20 23:00:08 +00:00