Commit Graph

2963 Commits (62b12783dfa6ed5f6b4921da302f356b4eac18f8)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 62b12783df Fix bug where users teleporting to non-neighbour regions could continue to hear chat from their source region for some time after teleport completion.
This occurs on v2 teleport since the source region now waits 15 secs before closing the old child agent, which could still receive chat.
This commit introduces a ScenePresenceState.PreClose which is set before the wait, so that ChatModule can check for ScenePresenceState.Running.
This was theoretically also an issue on v1 teleport but since the pause before close was only 2 secs there, it was not noticed.
2013-09-02 19:21:53 +01:00
Justin Clark-Casey (justincc) 85a9cb260a Remove mono compiler warnings from UserProfilesModule 2013-08-17 01:10:58 +01:00
Justin Clark-Casey (justincc) d75f00cc2d minor: remove mono compiler warning from AttachmentsModule 2013-08-17 01:09:31 +01:00
Justin Clark-Casey (justincc) f5d3145bea Add ScenePresenceTeleportTests.TestSameSimulatorIsolatedRegionsV2() regression test for v2 transfers.
Also adjusts names of teleport setup helpers in EntityTransferHelpers
2013-08-17 00:24:56 +01:00
Justin Clark-Casey (justincc) 1624522761 refactor: Make AttachmentModulesTests.TestSameSimulatorNeighbouringRegionsTeleportV2 use already available TestClient handle rather than retrieving it via the ScenePresence 2013-08-16 23:45:04 +01:00
Justin Clark-Casey (justincc) 7c916ab91c Try to make "slow down" message that one could receive on rapid teleporting more informative to the user.
This message is seen on V2 if one attempts to quickly re-teleport from a source region where one had previously teleported to a non-neighbour and back within 15 secs.
The solution here is for the user to wait a short while.
This message can also be seen on any teleport protocol if one recieves multiple teleport attempts simultaneously.  Probably still useful here to help identify misbehaving scripts.
2013-08-15 14:51:54 +01:00
Justin Clark-Casey (justincc) 3ddb7438d7 Move DoNotCloseAfterTeleport flag reset before UpdateAgent in V2 to avoid a low probability where the destination re-establishing the child connection before the flag was reset 2013-08-15 14:41:00 +01:00
Justin Clark-Casey (justincc) 3f8d79024b Rely on the Scene.IncomingCloseAgent() check as to whether the connection should be kept open after teleport-end rather than doing this in the ET Module
This is safer since the close check in IncomingCloseAgent() is done under lock conditions, which prevents a race between ETM and Scene.AddClient()
2013-08-15 14:07:57 +01:00
Justin Clark-Casey (justincc) 2231fcf5b4 Do not use the SP.DoNotCloseAfterTeleport flag for child agent connections.
This approach has problems if a client quits without sending a proper logout but then reconnects before the connection is closed due to inactivity.
In this case, the DoNotCloseAfterTeleport was wrongly set.
The simplest approach is to close child agents on teleport as quickly as possible so that races are very unlikely to occur
Hence, this code now closes child agents as the first action after a sucessful teleport.
2013-08-15 13:46:46 +01:00
Justin Clark-Casey (justincc) 60cc9e9a3c minor: remove unused entity transfer config in teleport v2 attachments test 2013-08-14 23:21:18 +01:00
Justin Clark-Casey (justincc) b64d3ecaed Create TestSameSimulatorNeighbouringRegionsTeleportV2() regression test for V2 transfer protocol. 2013-08-12 18:15:12 +01:00
Justin Clark-Casey (justincc) 97bcb59bee Merge branch 'TeleportWork' 2013-08-09 17:52:29 +01:00
Justin Clark-Casey (justincc) 6fcbf219da Comment back out seed dump code enabled in b1c26a56. Also adds a few teleport comments. 2013-08-09 17:48:35 +01:00
Justin Clark-Casey (justincc) b1c26a56b3 Fix an issue where under teleport v2 protocol, teleporting from regions in an line from A->B->C would not close region A when reaching C
The root cause was that v2 was only closing neighbour agents if the root connection also needed a close.
However, fixing this requires the neighbour regions also detect when they should not close due to re-teleports re-establishing the child connection.
This involves restructuring the code to introduce a scene presence state machine that can serialize the different add and remove client calls that are now possible with the late close of the
This commit appears to fix these issues and improve teleport, but still has holes on at least quick reteleporting (and possibly occasionally on ordinary teleports).
Also, has not been completely tested yet in scenarios where regions are running on different simulators
2013-08-08 23:29:30 +01:00
Robert Adams c67c55e0fc Better error reporting when registering LSL function extensions (comms module).
For unknown reasons, a dynamic function signature cannot have more than 5
parameters. Error message now tells you this fact so you can curse MS and
then go change your function definitions.
2013-08-08 09:45:16 -07:00
teravus 4e86674a3a * Added set water height <height> [<x>] [<y>] console command following the set terrain heights console command as an example. 2013-08-07 23:33:23 -05:00
Justin Clark-Casey (justincc) b10710d4a5 minor: add some method doc to ScenePresence fields used for entity transfer, add minor details to some log messages, rename a misleading local variable name.
No functional changes.
2013-08-07 23:17:31 +01:00
Justin Clark-Casey (justincc) a33a1ac958 Add post-CreateAgent teleport cancellation/abortion functionality from v1 transfer protocol into v2.
This stops OpenSimulator still trying to teleport the user if they hit cancel on the teleport screen or closed the viewer whilst the protocol was trying to create an agent on the remote region.
Ideally, the code may also attempt to tell the destination simulator that the agent should be removed (accounting for issues where the destination was not responding in the first place, etc.)
2013-08-07 18:52:30 +01:00
Justin Clark-Casey (justincc) 24dcf3cf6a Comment out debug log lines about script modules comms for now.
If this is an issue, could change log4net config instead to allow re-enablement
2013-08-05 20:51:40 +01:00
Diva Canto 09cb2a37dd More on HG inventory and OutboundPermission: disallowing giving inventory to foreigners if OutboundPermission is false 2013-08-03 20:36:30 -07:00
Diva Canto dcfeb95e98 HG: If OutboundPermission is set to false, let's enforce stricter permissions by not allowing objects to be taken to inventory. 2013-08-03 20:13:44 -07:00
Diva Canto b857353fc9 Making the J2KDecoderModule decoder function async. Could this be the cause of sim freeze? -- HandleRequestImage in LLClientView is now sync, which means that it cannot take too long to complete. However, its execution path may end up in J2KDecoderModule.Decode, which is heavy and could stop the packet processing thread while it's at it. 2013-08-03 15:42:25 -07:00
Diva Canto 847c01f406 Amend Justin's last commit regarding the new config var ServiceVersion. The section may not exist at all. 2013-08-02 17:38:08 -07:00
Justin Clark-Casey (justincc) 54b1071556 Allow older teleport ConnectorProtocolVersion of "SIMULATION/0.1" to be manually forced in a new [SimulationService] config setting.
This is for testing and debugging purposes to help determine whether a particular issue may be teleport related or not
"SIMULATION/0.2" (the newer teleport protocol) remains the default.  If the source simulator only implements "SIMULATION/0.1" this will correctly allow fallback to the older protocol.
Specifying "SIMULATION/0.1" will force the older, less efficient protocol to always be used.
2013-08-02 23:12:54 +01:00
Justin Clark-Casey (justincc) d4c506e453 minor: replace veclist.Add(new Vector3(0,0,0)) with Vector3.Zero in InventoryAccessModules.RezObject() - structs are passed by value 2013-08-02 00:08:14 +01:00
Justin Clark-Casey (justincc) c9695a0a59 Move experimental attachments throttling further down the chain so that multiple attachments changes (e.g. change outfit) are also throttled 2013-08-02 00:00:00 +01:00
Justin Clark-Casey (justincc) 216e785ca9 Add experimental "debug attachments throttle <ms>" setting (command line) and ThrottlePer100PrimsRezzed in [Attachments] in config
This is an experimental setting to control cpu spikes when an attachment heavy avatar logs in or avatars with medium attachments lgoin simultaneously.
It inserts a ms sleep specified in terms of attachments prims after each rez when an avatar logs in.
Default is 0 (no throttling).
"debug attachments <level>" changes to "debug attachments log <level>" which controls logging.  A logging level of 1 will show the throttling performed if applicable.
Also adds "debug attachments status" command to show current throttle and debug logging levels.
2013-08-01 21:16:53 +01:00
Diva Canto ac2ad9690d HGWorldMapModule: unregister event on RemoveRegion 2013-07-31 11:20:27 -07:00
Diva Canto 87fcff9fc3 HGWorldMapModule: check whether it's enabled or not. 2013-07-31 11:13:55 -07:00
Diva Canto 3c540f0d33 Avoid another null ref opportunity. 2013-07-30 22:07:33 -07:00
Diva Canto e4ecbc2b10 Fix null ref. 2013-07-30 21:38:41 -07:00
Diva Canto fd050fca7c Doing the HG Map / SimulatorFeatures "the right way": moved it to HGMapModule, hooking on to SimulatorFeatures.OnSimulatorFeaturesRequest event (similar to what the DynamicMenuModule does).
Only HG Visitors get this var, to avoid spamming local users.
The config var  is now called MapTileURL, to be consistent with the login one, and its being picked up from either [LoginService], [HGWorldMap] or [SimulatorFeatures], just because I have a bad memory.
2013-07-30 21:10:00 -07:00
Diva Canto 63f6c8f27c Removed commented lines and useless debug message 2013-07-28 13:53:47 -07:00
Diva Canto 7b0b5c9d97 Added BasicSearchModule.cs which handles OnDirFindQuery events. Removed that handler from both Groups modules in core, and replaced them with an operation on IGroupsModule. 2013-07-28 13:49:58 -07:00
Diva Canto 6be614ba84 This makes people search work. 2013-07-28 09:54:34 -07:00
Diva Canto 69975763d2 Several major improvements to group (V2) chat. Specifically: handle join/drop appropriately, invitechatboxes.
The major departure from flotsam is to send only one message per destination region, as opposed to one message per group member. This reduces messaging considerably in large groups that have clusters of members in certain regions.
2013-07-27 15:38:56 -07:00
Justin Clark-Casey (justincc) ba9daf849e Fix regression from 056a6ee7 because the RemoteSimulationConnector uses a copy of the LocalSimulationConnector but never initializes it (hence ServiceVersion was never set) 2013-07-26 22:52:08 +01:00
Justin Clark-Casey (justincc) 056a6ee765 Fix regression tests relating to agent transfer by making simulator use last week's SIMULATOR/0.1 protocol for now. 2013-07-26 19:22:30 +01:00
Diva Canto 878ce1e6b2 This should fix all issues with teleports. One should be able to TP as fast as needed. (Although sometimes Justin's state machine kicks in and doesn't let you) The EventQueues are a hairy mess, and it's very easy to mess things up. But it looks like this commit makes them work right. Here's what's going on:
- Child and root agents are only closed after 15 sec, maybe
- If the user comes back, they aren't closed, and everything is reused
- On the receiving side, clients and scene presences are reused if they already exist
- Caps are always recreated (this is where I spent most of my time!). It turns out that, because the agents carry the seeds around, the seed gets the same URL, except for the root agent coming back to a far away region, which gets a new seed (because we don't know what was its seed in the departing region, and we can't send it back to the client when the agent returns there).
2013-07-25 23:44:58 -07:00
Justin Clark-Casey (justincc) 4cd03d8c31 Return Simulator/0.1 (V1) entity transfer behaviour to waiting only 2 seconds before closing root agent after 15.
This is because a returning viewer by teleport before 15 seconds are up will be disrupted by the close.
The 2 second delay is within the scope where a normal viewer would not allow a teleport back anyway.
Simulator/0.2 (V2) protocol will continue with the longer delay since this is actually the behaviour viewers get from the ll grid
and an early close causes other issues (avatar being sent to infinite locations temporarily, etc.)
2013-07-26 01:40:56 +01:00
Justin Clark-Casey (justincc) 72ed49af5f Reset DoNotClose scene presence teleport flag before pausing. Rename DoNotClose to DoNotCloseAfterTeleport 2013-07-26 01:38:04 +01:00
Justin Clark-Casey (justincc) 1fabdcc43c If a returning teleport starts to reuse a downgraded child connection that was a previous root agent, do not close that child agent at the end of the 15 sec teleport timer.
This prevents an issue if the user teleports back to the neighbour simulator of a source before 15 seconds have elapsed.
This more closely emulates observed linden behaviour, though the timeout there is 50 secs and applies to all the pre-teleport agents.
Currently sticks a DoNotClose flag on ScenePresence though this may be temporary as possibly it could be incorporated into the ETM state machine
2013-07-26 01:04:16 +01:00
Diva Canto 20b989e048 Increased the wait time to 15 secs. In a 0.7.5 standalone where the effect was always present, this seems to have fixed it. 2013-07-24 17:10:26 -07:00
Diva Canto cac37e298c Deleted all [ZZZ] debug messages. 2013-07-24 14:31:30 -07:00
Diva Canto f0320f5652 The previous commit did fix the infinity problem! I'm putting the same time on TP_V1 and adding a big red warning on top of those lines. 2013-07-24 14:31:18 -07:00
Diva Canto 46d017b197 Today's wild shot at the infinity problem. Wait on the child agent left behind. 2013-07-24 14:31:03 -07:00
Diva Canto d7984ef775 More on putting TP V1 as it was 2013-07-24 14:28:27 -07:00
Diva Canto aaee63af82 Minor improvements on TP V1 trying to make it exactly as it was before. 2013-07-24 14:28:14 -07:00
Diva Canto 3891a8946b New Teleport protocol (V2), still compatible with V1 and older. (version of the destination is being checked)
In this new protocol, and as committed before, the viewer is not sent EnableSimulator/EstablishChildCommunication for the destination. Instead, it is sent TeleportFinish directly. TeleportFinish, in turn, makes the viewer send a UserCircuitCode packet followed by CompleteMovementIntoRegion packet. These 2 packets tend to occur one after the other almost immediately to the point that when CMIR arrives the client is not even connected yet and that packet is ignored (there might have been some race conditions here before); then the viewer sends CMIR again within 5-8 secs. But the delay between them may be higher in busier regions, which may lead to race conditions.
This commit improves the process so there are are no race conditions at the destination. CompleteMovement (triggered by the viewer) waits until Update has been sent from the origin. Update, in turn, waits until there is a *root* scene presence -- so making sure CompleteMovement has run MakeRoot. In other words, there are two threadlets at the destination, one from the viewer and one from the origin region, waiting for each other to do the right thing. That makes it safe to close the agent at the origin upon return of the Update call without having to wait for callback, because we are absolutely sure that the viewer knows it is in th new region.
Note also that in the V1 protocol, the destination was getting UseCircuitCode from the viewer twice -- once on EstablishAgentCommunication and then again on TeleportFinish. The second UCC was being ignored, but it shows how we were not following the expected steps...
2013-07-24 14:27:58 -07:00
Diva Canto aae29c0ee2 Further tweaks on TPs: not sending the callback URL and instead waiting 15sec before closing the agent. This seems to be working fairly well. The viewer seems to have an 8 sec delay between UseCircuitCode and CompleteMovement.
Also added back the position on UpdateAgent, because it's needed for TPing between neighboring regions.
2013-07-24 14:27:37 -07:00