Commit Graph

644 Commits (d5cc9596838a9335e5e9ed0877d26b802ee6c8e3)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 655625ab87 Start sending spare frame time MS viewer stat. Make frame time correctly display total frame time, not just non-spare time.
This makes it easier to see when components of frame time exceed normal permitted frame time.
Currently reflect scene frame times.
2012-06-05 00:17:55 +01:00
Justin Clark-Casey (justincc) 72219eae7d Instead of updating sim stats root agent, child, objects and scripts accounts every single scene frame, update in the once every 3 seconds SimStatsReporter run 2012-06-01 04:47:11 +01:00
Justin Clark-Casey (justincc) 43a6f28620 If restating a region, clean up the physics scene after the main scene has been closed not before.
If this is done before then on ODE agent update calls still incoming can fail as they try to use a raycastmanager that has been disposed.
Bullet plugin does nothing on Dispose()
However, I wouldn't be at all surprised if individual region restarting was buggy in lots of other areas.
2012-05-26 01:55:35 +01:00
Justin Clark-Casey (justincc) 40c78b0624 Stop it being possible for an agent to teleport back to its source region before the source region has finished cleaning up old agent data and structures.
If this is allowed, then the client usually gets forcibly logged out and data structures might be put into bad states.
To prevent this, the binary state machine of EMT.m_agentsInTransit is replaced with a 4 state machine (Preparing, Transferring, ReceivedAtDestination, CleaningUp).
This is necessary because the source region needs to know when the destination region has received the user but a teleport back cannot happen until the source region has cleaned up.
Tested on standalone, grid and with v1 and v3 clients.
2012-05-25 02:02:53 +01:00
Justin Clark-Casey (justincc) 459c7635af If an agent is still registered as 'in transit' by the source region, don't allow an immediate teleport back.
This is to help relieve a race condition when an agent teleports then immediately attempts to teleport back before the source region has properly cleaned up/demoted the old ScenePresence.
This is rare in viewers but much more possible via scripting or region module.
However, more needs to be done since virtually all clean up happens after the transit flag is cleared .
Possibly need to add a 'cleaning up' state to in transit.
This change required making the EntityTransferModule and HGEntityTransferModule per-region rather than shared, in order to allow separate transit lists.
Changes were also required in LocalSimulationConnector.
Tested in standalone, grid and with local and remote region crossings with attachments.
2012-05-24 00:31:14 +01:00
Justin Clark-Casey (justincc) ee98b9c394 Add "show scene" command which lists stats for the currently selected console scene(s)
This includes prim count, script count, avatar count, etc.
Information is currently the same as "show stats", though show stats can only show one scene at a time because it listens for the latest outgoing stats packet (a bad approach that needs to change).
Might be better to tie this module into the other stats module to display arbitrary stats rather than fetching directly from scene.SimStatsReporter.
Console command is "show scene" because "show region" already exists for the grid service, which is unfortunate.
Might need to make a distinction between "scene" relating to a live scene and "region" relating to more static region data (url, coords, etc.)
2012-05-23 04:10:45 +01:00
BlueWall 247a56593f Further refinement on properties 2012-05-18 20:02:32 -04:00
BlueWall 895dadbdbd Cleanup + change properties to set fields with private set : Thanks Justin for the tip. 2012-05-18 19:34:12 -04:00
BlueWall c05f87b50c Provide Telehub setting to allow use of landmarks
Setting to allow use of landmarks to override telehub routing. Default is off.
2012-05-18 17:51:38 -04:00
Justin Clark-Casey (justincc) 4d34763f8c Check agent limit against root agent count rather than both root and child agents
From sl docs such as http://community.secondlife.com/t5/English-Knowledge-Base/Managing-Private-Regions/ta-p/700115
agent should apply to avatars only.
This makes sense from a user perspective, and also from a code perspective since child agents with no physics or actions take up a fraction of root agent resources.
As such, the check is now only performed in Scene.QueryAccess() - cross and teleport check this before allowing an agent to translocate.
This also removes an off-by-one error that could occur in certain circumstances on teleport when a new child agent was double counted when a pre-teleport agent update was performed.
This does not affect an existing bug where limits or other QueryAccess() checks are not applied to avatars logging directly into a region.
2012-05-17 23:33:26 +01:00
Justin Clark-Casey (justincc) deeac69312 minor: comment out individual attachment transfer log messages for now 2012-05-14 18:48:40 +01:00
BlueWall 7c229c8b81 Add configurable SpawnPointRouting
Will use one of three selected methods to route avatar landing
	points when using Telehubs. The setting is in [Startup] using
        SpawnPointRouting = closest/random/sequence

	closest: The default setting. Routes avatar to the nearest SpawnPoint
	to the location.

	random: Picks random SpawnPoints to land the avatar.

	sequence: Follows a sequence to place the avatar on the next available
	SpawnPoint location

Conflicts:

	OpenSim/Region/Framework/Scenes/Scene.cs
2012-05-13 17:20:54 -04:00
Dan Lake f374b63ac8 Add even for terrain tainting and synchronize terrain module with physics scene before physics simulation step rather than after 2012-05-10 14:42:46 -07:00
Justin Clark-Casey (justincc) 07e62df558 Add regression test for teleporting an agent between separated regions on the same simulator.
This involves a large amount of change in test scene setup code to allow test scenes to share shared modules
SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static
May split these out into separate classes in the future.
2012-04-27 00:58:54 +01:00
Justin Clark-Casey (justincc) ca228c4770 Comment out old Scene.HandleLogOffUserFromGrid() to reduce client closing analysis complexity 2012-04-26 16:20:53 +01:00
Justin Clark-Casey (justincc) e52fe03fff minor: Add avatar name to removing agent log message 2012-04-26 00:42:37 +01:00
Mic Bowman a2d544c938 Add a configuration switch to turn on/off the use of the trash
folder when deleting objects from a scene. The use of the trash
folder causes assets to be created and stored everytime you delete
an object from the scene (slows down the delete and adds mostly useless
assets to your database).

Default is on (use the trash folder) which is the standard behavior.
2012-04-25 11:54:57 -07:00
Justin Clark-Casey (justincc) 8205fe79ce Fix bug where setting phantom on a prim would result in a server log message rather than setting phantom.
This was an oversight when removing some race conditions from PhysicsActor setting recently.
Regression tests extended to probe this code path.
Extending regression tests required implementation of a BasicPhysicsPrim (there was none before).  However, BasicPhysics plugin is still of no current practical use other than to fill in as a component for other parts of regression testing.
2012-04-22 19:51:51 +01:00
Justin Clark-Casey (justincc) 7d8bb33c5b Store FromItemID for attachments once on SOG instead of on every SOP and only ever using the root part entry.
This eliminates some pointless memory use.
2012-04-07 00:33:02 +01:00
Justin Clark-Casey (justincc) 633f4bb3d8 remove possible PhysActor unexpectedly null race conditions when changing prim collision status
factor out common SOP physics scene adding code into a common SOP.AddToPhysics() that is the counterpart to the existing RemoveFromPhysics()
2012-04-03 09:28:17 +01:00
Justin Clark-Casey (justincc) 7468299673 Eliminate race condition where many callers would check SOP.PhysicsActor != null then assume it was still not null in later code.
Another thread could come and turn off physics for a part (null PhysicsActor) at any point.
Had to turn off localCopy on warp3D CoreModules section in prebuild.xml since on current nant this copies all DLLs in bin/ which can be a very large number with compiled DLLs
No obvious reason for doing that copy - nothing else does it.
2012-04-03 05:51:38 +01:00
Justin Clark-Casey (justincc) 32a953fed7 refactor: Rename SOG.GetChildPart() to GetPart() since it can also return the 'root' part. 2012-03-31 01:52:06 +01:00
Justin Clark-Casey (justincc) 69fc8c4985 minor: small message adjustment and unnecessary code elimination when notifying client of no build permission 2012-03-31 01:07:14 +01:00
PixelTomsen 874140f950 fix Infinite loading on No Rez http://opensimulator.org/mantis/view.php?id=5932 2012-03-31 01:01:59 +01:00
Justin Clark-Casey (justincc) 22a85b947a Add back parts of reverted changes that were not concerned with child agent caching.
This adds ScenePresence to IClientAPI.SceneAgent earlier on in the add client process so that its information is available to EventManager.OnNewClient() and OnClientLogin()
Also add a code comment as to why we're caching friend information for child agents.
2012-03-29 01:26:30 +01:00
Justin Clark-Casey (justincc) 93ac47f0d3 Revert "Simplify friends caching by only doing this for root agents - no functions require caching for child agents."
We need to cache child agents so that friends object edit/delete permissions will work across boarders on regions hosted by different simulators.

This reverts commit d9f7b8549b.
2012-03-29 01:08:47 +01:00
Justin Clark-Casey (justincc) a1de9bc33f Revert "Add comment about setting client.SceneAgent in AddNewClient()"
This reverts commit 964cae4f37.
2012-03-29 01:08:37 +01:00
Justin Clark-Casey (justincc) 964cae4f37 Add comment about setting client.SceneAgent in AddNewClient() 2012-03-29 00:21:14 +01:00
Justin Clark-Casey (justincc) d9f7b8549b Simplify friends caching by only doing this for root agents - no functions require caching for child agents.
This allows us to avoid unnecessary multiple calls to the friends service.
All friends functions originate from the root agent and only go to other root agents in existing code.
This also allows us to eliminate complex ref counting.
2012-03-28 23:40:25 +01:00
Diva Canto af96b99356 More on switching the root folder from under the viewer. More experiments. 2012-03-27 20:36:54 -07:00
Diva Canto 300968e933 HG: Switch root folders from under the viewer. Towards HG 2.0. This is guarded by an obscure config that no one but me should be using at this point. 2012-03-27 19:08:29 -07:00
Dan Lake 971d32fda3 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-03-27 12:51:58 -07:00
Dan Lake 0247d738e2 When loading objects from DB, first add to scene, then call TriggerOnSceneObjectLoaded. 2012-03-27 12:50:58 -07:00
Diva Canto de242a29ca HG: beginning of a more restrictive inventory access procedure (optional). Experimental: we'll try switching the root folder from under the viewer. 2012-03-27 11:54:13 -07:00
Justin Clark-Casey (justincc) d4beb2f5bc Comment out log message about sending periodic appearance updates. 2012-03-23 03:39:39 +00:00
Justin Clark-Casey (justincc) 54887bf386 Add experimental SendPeriodicAppearanceUpdates = true/false setting to [Startup] in OpenSim.ini
On osgrid and other places, I have observed that manually sending appearance updates from the console often relieves grey avatar syndrome.
Despite hunting high and low, I haven't been able to find where this packet is sometimes being lost - it might be a persistent viewer bug for all I know.
Therefore, this experimental setting resends appearance data for everybody in the scene every 60 seconds.  These packets are small and the viewer only fetches texture
data if it doesn't already have it.
Default is false.
2012-03-23 03:33:07 +00:00
Justin Clark-Casey (justincc) 4ed833bc9d Add a scene maintenance thread in parallel to the heartbeat thread. The maintenance thread will end up running regular jobs that don't need to be in the main scene loop.
The idea is to make the critical main scene loop as skinny as possible - it doesn't need to run things that aren't time critical and don't depend on update ordering.
This will be done gradually over time to try and uncover any issues.  Many non-criticial scene loop activities are being launched on separate threadpool threads anyway.
This may also allow modules to register their own maintenance jobs without having to maintain their own timers and threads.
Currently the maintenance loop runs once a second, as opposed to the 89ms scene loop.
2012-03-23 02:49:29 +00:00
Justin Clark-Casey (justincc) 349454ca27 Remove unnecessary shutting down check in Scene.Heartbeat(). Add some method doc. Rename HeartbeatThread, shuttingdown to conform to code standards. 2012-03-23 01:46:11 +00:00
Justin Clark-Casey (justincc) 18b3f1132e Rename Scene.StartTimer() to Start() - this method no longer uses a timer. Comment out more effectively unused old heartbeat code. 2012-03-23 01:21:43 +00:00
Justin Clark-Casey (justincc) 4ee8b3e23e Fix build break 2012-03-23 01:11:43 +00:00
Justin Clark-Casey (justincc) a9995ede65 Fix bug in ScenePresenceAnimator.RemoveAnimation() introduced in commit 1a8769e
Forgot to uppercase the animation name for default animations, since for some reason we store and use them in upper rather than lowercase.
2012-03-23 01:08:13 +00:00
Justin Clark-Casey (justincc) bc2963d42a Comment out unused scene loop restart code.
This has actually been unused since at least 0.7.2 due to earlier changes.
2012-03-23 01:03:10 +00:00
Justin Clark-Casey (justincc) 08b8ebcc7e Use m_lastFrameTick instead of m_lastUpdate in Scene.GetHealth(). m_lastUpdate is no longer properly updated and is redundant anyway. 2012-03-23 00:55:11 +00:00
Justin Clark-Casey (justincc) 40b9b519b8 Add commented out section on collisions switch in Scene.SetSceneCoreDebug().
This was not implemented before the recent changes but should be at some point.
2012-03-23 00:12:14 +00:00
Justin Clark-Casey (justincc) 54a8a5baba If "debug scene updates true" then print out to log when a garbage collection occurs. 2012-03-21 02:02:14 +00:00
Justin Clark-Casey (justincc) de53aa32e0 Add Scene.DebugUpdates switch which, if turned on, will print out a warning when a frame updates takes longer than twice the desired time
This is controlled via "debug scene updates true|false" on the region console.
Also fix an oversight with "debug scene teleport true|false"
2012-03-21 01:27:09 +00:00
Justin Clark-Casey (justincc) ab243f4a57 Incorporate scene teleporting debugging into "debug scene teleport true|false" command 2012-03-21 01:13:44 +00:00
Justin Clark-Casey (justincc) 9671e43497 Replace "scene debug true false true" console command with "scene debug scripting true" or other parameters as appropriate.
This is to allow individual switching of scene debug settings and to provide flexibiltiy for additional settings.
2012-03-21 01:02:58 +00:00
Justin Clark-Casey (justincc) 7bf628ab31 Add ability to log warn if a frame takes longer than twice the expected time. Currently commented out. 2012-03-21 00:02:08 +00:00
Justin Clark-Casey (justincc) 3701f893d3 remove unnecessary tmpFrameMS, use maintc instead for frame time calculation 2012-03-20 23:31:57 +00:00