Commit Graph

874 Commits (e09c8681ad5f6a645ef433e86166795a5c7dd762)

Author SHA1 Message Date
Robert Adams d8642ff210 BulletSim: add VEHICLE_ more parameter value limit checking.
This only bounds passed parameters as there is no good way of refusing
the parameter setting. This mostly means that passing NaN's won't
crash the simulator.
2015-03-16 19:21:02 +00:00
Justin Clark-Casey (justincc) 5861401faa Remove long unused region parameters from SceneBase. Some of these weren't even being set. Region parameters come from Scene.RegionInfo instead. 2014-12-03 21:44:22 +00:00
Justin Clark-Casey (justincc) 2d2aa6e076 minor: Just have one message that displays successful registration of a region with its parameters rather than 2 2014-12-03 21:40:39 +00:00
Justin Clark-Casey (justincc) 86367d7219 refactor: Move methods to start a monitored thread, start work in its own thread and run work in the jobengine from Watchdog to a WorkManager class.
This is to achieve a clean separation of concerns - the watchdog is an inappropriate place for work management.
Also adds a WorkManager.RunInThreadPool() class which feeds through to Util.FireAndForget.
Also switches around the name and obj arguments to the new RunInThread() and RunJob() methods so that the callback obj comes after the callback as seen in the SDK and elsewhere
2014-11-25 23:56:32 +00:00
Justin Clark-Casey (justincc) 1d19e1bbd0 Add naive implementation of controlled incoming HG attachments to manage load.
Instead of processing all incoming attachment scene object concurrently, process them consecutively to eliminate potential overload from this source.
This is a naive implementation because it does not currently account for slow foreign asset services.
Although it may take longer, this approach may also improve attachment visibility for HG avatars
since the scene object is now always added to the scene after receiving assets from the foreign service and not before.
2014-11-25 23:23:10 +00:00
Justin Clark-Casey (justincc) a9dde81753 minor: Correct letter accidentally added to copyright notice on top of Scene.cs (almost five years ago!) 2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) b7ef6009a7 In Scene.AddNewAgent(), avoid a situation where an exception can result in a client being added to the manager without IClientAPI.SceneAgent being set.
This is done by adjusting the order of code so that SceneAgent will always be set before adding the client.
Various parts of the code (rightly) assume that a a client registered to the manager will always have a SceneAgent set no matter what.
2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) b9b483151f Eliminate a few unnecessary calculations in the maintenance loop.
Also uses wait event instead of sleep for periodicity control.
2014-11-25 23:18:38 +00:00
Justin Clark-Casey (justincc) 7d30bb13be Fix recent minor regression where the default frame time wasn't being set if there was no startup config section.
Caused some regression tests to fail.
2014-11-25 23:18:38 +00:00
Justin Clark-Casey (justincc) 7bababaab6 Improve frame time stability by taking a few unnecessary repeated calculations out of the main scene loop.
Also uses a wait event to sleep rather than a Thread.Sleep to allow the loop to be interrupted in a more controlled manner when necessary.
2014-11-25 23:18:38 +00:00
Justin Clark-Casey (justincc) 5b6fb7245a Set ThreadPriority on main scene thread to highest.
This will only have an effect on Windows systems or mono with the (not recommended) mono-3.2.8 debug patch https://gist.github.com/justincc/31e52218d098529b4696 applied
2014-11-25 23:18:38 +00:00
Justin Clark-Casey (justincc) afa85e6b3c Set appearance refresh to false by default.
This setting was originally added some time ago to deal with issues where appearance was not received properly by all users.
However, it does not scale well with large numbers of agents.
Disabling to see if the original problem has abated or whether this will have to be tackled in another way.
2014-10-02 22:30:44 +01:00
Justin Clark-Casey (justincc) 530b0cbbf1 Move expired objects cleaning trigger to the maintenance thread of a region rather than it's main scene loop.
[Startup] default setting UpdateTempCleaningEveryNFrames becomes UpdateTempCleaningEveryNSeconds.
Default becomes 180s instead of effective 182s (which would also vary with any changes in frame time or extra long frames)
2014-09-27 00:23:52 +01:00
Justin Clark-Casey (justincc) c015cb3134 Remove an unnecessary check at the bottom of Scene.CloseAgent()
At this point sp != null so no check required.
2014-09-24 00:50:24 +01:00
BlueWall 519c753e46 This fixes the Scene thread renaming issue 2014-09-17 20:25:27 -04:00
BlueWall 96a2449122 Undo "Revert "Small changes to threading to send thread names to unmanaged threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects.""
Fix for break in next commit

This reverts commit 376fab1402.
2014-09-17 20:03:54 -04:00
BlueWall 376fab1402 Revert "Small changes to threading to send thread names to unmanaged threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects."
This reverts commit af286d5fcb.
Issue with Jenkins builds
2014-09-17 18:11:41 -04:00
BlueWall af286d5fcb Small changes to threading to send thread names to unmanaged threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects. 2014-09-17 17:56:10 -04:00
Justin Clark-Casey (justincc) 41f2f3132b For monitoring purposes, start non-timeout tasks (which do not currently use a threadpool) via Watchdog.RunInThread() rather than Util.RunThreadNoTimeout()
The functionality is the same but this allow us to monitor such tasks via "show threads" and abort them for test purposes, etc.
Also extends thread names to provide more info (e.g. SendInitialDataToClient says what client the task is for).
2014-09-05 23:20:59 +01:00
Justin Clark-Casey (justincc) ac866a1c46 Add [EntityTransfer] AllowAvatarCrossing setting to determine whether avatars are allowed to cross regions at all.
Defaults to true.  For test purposes.
2014-09-03 00:25:56 +01:00
Justin Clark-Casey (justincc) 1a3ffda852 minor: Eliminate more unnecessary code copying individual parameters for Vector3 copying in Scene - this is not necessary as Vector3 is a value type 2014-08-28 18:37:34 +01:00
Justin Clark-Casey (justincc) b1ff78f4d8 Don't allow update timer to invoke another scene update if the previous is still active. 2014-08-26 18:52:09 +01:00
Justin Clark-Casey (justincc) 42bb122232 Fix frame times when updating scene on timer. 2014-08-26 18:13:38 +01:00
Justin Clark-Casey (justincc) 64f640f901 Implement experimental non-default mechanism to update scene via a timer rather than a persistent thread with sleep.
This is to see if an inaccuracy in sleep times under load is responsible for increase in frame times even when there is spare time still available.
Can currently only be activated by setting "debug scene set update-on-timer true".
Can be switched between timer and thread with sleep updates whilst the scene is running.
2014-08-26 18:13:38 +01:00
Justin Clark-Casey (justincc) 4c781db572 Make RootTerseUpdatePeriod and ChildTerseUpdatePeriod configurable in [InterestManagement] in OpenSim.ini for experimental purposes.
If n > 1 for RootTerseUpdatePeriod only every n terse update is actually sent to observers on same region, unless velocity is effectively zero (to stop av drift).
If n > 1 for ChildTerseUpdatePeriod only every n terse update is sent to observers in other regions, unless velocity is effectively zero.
Defaults are same as before (all packets are sent).
Tradeoff is reduction of UDP traffic vs fidelity of observed av mvmt.
Increasing n > 1 leads to jerky observed mvmt immediateley for root, though not on child, where experimentally have gone to n = 4 before jerkiness is noticeable.
2014-08-14 01:39:26 +01:00
Justin Clark-Casey (justincc) 6ea82ad48a Make some existing reprioritization values changeable outside the scene for test purposes, and use more consise property syntax.
No functional change.
2014-08-14 01:16:58 +01:00
Justin Clark-Casey (justincc) 30f1b424bb Change RootRotationUpdateTolerance from 0.01 to 0.1 in code as well. 2014-08-08 23:47:53 +01:00
Oren Hurvitz e36e416637 Fixed crash when using Allowed/Denied Viewers, and the viewer's name is shorter than one of the test strings
This fixes http://opensimulator.org/mantis/view.php?id=7294
2014-08-06 19:02:15 +03:00
Justin Clark-Casey (justincc) 78ccadb27e Add RootPositionUpdateTolerance, RootRotationUpdateTolerance, and RootVelocityUpdateTolerance parameters to [InterestManagement] in OpenSimDefaults.ini
These govern when AgentUpdates are sent to observers on position, rotation and velocity changes to an avatar (including the avatar themselves).
Higher values reduce AgentUpdate traffic but at a certain level will degrade smoothness of avatar and perceived avatar movement.
2014-08-06 00:53:14 +01:00
Justin Clark-Casey (justincc) 961cb9cc77 refactor: Rename recent new Client*UpdateTolerance to Root*UpdateTolerance for better accuracy and consistency with other similar parameters 2014-08-06 00:35:26 +01:00
Justin Clark-Casey (justincc) fcf5fb5dfd Implement "scene debug set root-upd-per" for dropping 1 in N root agent updates except to originator
For experimental purposes.
Also corrects a previous bug where each terse update sent was counted rather than each set of terse updates to agents.
2014-07-29 18:54:16 +01:00
Justin Clark-Casey (justincc) 0f87a99e54 Add debug mechanism for only sending 1 in N AgentUpdate packets to child agents.
Allows experiments in manually reducing updates under heavy load.
Activated by "debug scene set client-upd-per" console command.
In a simple test, can send as few as every 4th update before observed movement starts becoming disturbingly rubber-banded.
2014-07-29 18:09:11 +01:00
Justin Clark-Casey (justincc) f54fccba1e Make it possible to change avatar position update, rotation and velocity tolerances on the fly.
This is done via "debug scene set client-pos-upd, client-rot-upd, client-vel-upd".
For testing purposes.
2014-07-29 03:13:10 +01:00
Justin Clark-Casey (justincc) 3654ae8d8c Allow the "debug scene set physics false|true" command to work when bulletsim physics is running in a separate thread.
This will also allow the "disable physics" setting in the region debug viewer dialog to work in this circumstance.
2014-07-29 01:21:15 +01:00
Justin Clark-Casey (justincc) f6f7585ec5 Add a "debug scene set child-repri <double>" command that allows child reprioritization distance to be changed on the fly.
This governs when child agent position changes are sent to neighbouring regions.
Corresponding config parameter is ChildReprioritizationDistance in [InterestManagement] in OpenSim.ini
For test purposes.
2014-07-29 00:13:29 +01:00
Justin Clark-Casey (justincc) 3a87cce2e0 Fix recent regression in 3c6becd5 where login or hg login to variable sized regions failed with outdated simulator message.
I forgot that a null 'their version' would not be passed over the wire and ends up as an empty string instead (like older simulators).
So instead pass through the correct simulator protcol version instead (SIMULATOR/0.3) when querying from login or hg login.
Also removes a debug console write for agent limit accidentally left in for the same commit.
Relates to mantis 7276
2014-07-22 18:04:28 +01:00
Justin Clark-Casey (justincc) 3c6becd524 On login and first HG entrance to a foreign grid, perform query access checks before proceeding. 2014-07-21 23:53:33 +01:00
Diva Canto 82b875317b On logout, delay the removal of AgentCircuitData until the very end, because that data structure contains important information about the agent that may be needed by modules. 2014-07-04 14:36:11 -07:00
Diva Canto 60ad72357e This fixes the bug related to rebooting neighboring varregions while avatars are logged in; the avies would not see the region anymore until they relogged. Same problem as before: inconsistent calculation of scope. 2014-07-04 11:45:30 -07:00
Justin Clark-Casey (justincc) 889194db63 Actually call Close() for shared region modules when the simulator is being shutdown.
Adds regression test for this case.
2014-07-02 23:49:25 +01:00
Justin Clark-Casey (justincc) fe6dab7f13 minor: Change default max phys prim size in code to match OpenSimDefaults.ini 2014-06-28 00:20:09 +01:00
Justin Clark-Casey (justincc) cd031d129a minor: change allow script crossings default in code to true in order to match OpenSimDefaults.ini 2014-06-28 00:18:00 +01:00
Oren Hurvitz 5aeaa7fcdd Prevent login to a region if the Telehub or Landing Point are in a banned parcel 2014-05-25 15:37:28 +01:00
Justin Clark-Casey (justincc) 1b156b7fe8 Add regression test for in-range chat between neighbouring regions from east to west. 2014-05-22 19:18:24 +01:00
Oren Hurvitz 47b84875fd Tell QueryAccess explicitly whether the user is coming in via Teleport or Cross, because the permission checks are different.
Previously we used a heuristic of checking if the entry position is 0 to differentiate between Teleport and Cross, but that doesn't work anymore since we've started providing the precise entry position for cross, too. That's required in order to ensure that the user is allowed to enter the parcel that he's walking into.
2014-05-19 11:19:11 +01:00
Oren Hurvitz dd30a29ba0 Return more specific error messages if an attempt to enter a region fails due to permissions (in QueryAccess and IsAuthorizedForRegion) 2014-05-19 11:11:30 +01:00
Oren Hurvitz a780e01a54 Fixed: the parcel flag "Allow Scripts from Group" should only check if the parcel has a Group set; it doesn't have to be *deeded* to the group
Also some cleanup of the use of Group ID's (with no change to functionality).
2014-04-20 06:23:35 +01:00
Oren Hurvitz 06e0528d0b In teleports, pass the source region to the destination (similar to an HTTP referrer) 2014-04-09 09:22:20 +01:00
Oren Hurvitz 85d51e57a9 When sending QueryAccess to a region, also send the user's Home URI 2014-04-07 07:32:36 +01:00
Oren Hurvitz 55cc8044cb Refactored: use Scene.GetAgentHomeURI() to get the Home URI of a user 2014-04-07 07:26:44 +01:00