Commit Graph

16928 Commits (56d894ae2428955ca0a86d5c4e1dfe024e548141)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 7692ccc0cc Make ISimulationScene.GetScene() used the more efficient region id for lookup rather than the region handle. 2012-05-31 02:17:18 +01:00
Justin Clark-Casey (justincc) 17cc7e85e2 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-31 02:16:52 +01:00
Justin Clark-Casey (justincc) 96b3e1d0fa Don't eagerly clear frame collision events when physics actors subscribe and unsubscribe from collisions, in order to avoid a race condition.
Since this is done directly from ScenePresence, it can lead to a race condition with the simulator loop.
There's no real point doing it anyway since the clear will be done very shortly afterwards by the simulate loop and either there are no events (for a new avatar) or events don't matter (for a departing avatar).
This matches existing behaviour in OdePrim
2012-05-31 02:11:45 +01:00
Justin Clark-Casey (justincc) dc3cfcbe69 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-31 02:05:59 +01:00
Justin Clark-Casey (justincc) 1ca1f80eac Remove a call stack debugging line accidentally left in from a few days ago at SceneObjectPartInventory.ApplyNextOwnerPermissions(). 2012-05-25 02:56:06 +01:00
Justin Clark-Casey (justincc) afe2b437bc minor: Change [OBJECT COMMANDS MODULE] log strings to [REGION COMMANDS MODULE] strings, though all these are currently commented out anyway 2012-05-24 01:24:24 +01:00
Justin Clark-Casey (justincc) dff71c1aa9 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-24 01:24:12 +01:00
Justin Clark-Casey (justincc) 7f9a025e30 refactor: Rename ConsoleTableRow and ConsoleTableColumn to ConsoleDisplayTableRow and ConsoleDisplayTableColumn 2012-05-24 01:24:06 +01:00
Justin Clark-Casey (justincc) a0ac284a11 Add ConsoleDisplayList for more consistent formatting of console output in list form.
Convert "show region" to use this structure rather than hand-constructing
2012-05-24 01:23:57 +01:00
Justin Clark-Casey (justincc) 5341036261 refactor: rename ConsoleTable -> ConsoleDisplayTable for clarity 2012-05-24 01:23:50 +01:00
Justin Clark-Casey (justincc) 46a6cab307 Add missing Y co-ord in "show region" console command information 2012-05-24 01:23:43 +01:00
Justin Clark-Casey (justincc) edb17d1aac Lay out "show region" information in an easier to read line by line format 2012-05-24 01:23:34 +01:00
Justin Clark-Casey (justincc) dd05e96066 Fetch the dialog module reference in AttachmentsModule in RegionLoaded() not AddRegion()
The reference is not guaranteed to be there when AddRegion() is called but will definitely be present at RegionLoaded() if it's going to be present at all.
2012-05-24 01:23:27 +01:00
Justin Clark-Casey (justincc) ed0878ca23 minor: Make log class names in InventoryAccessModule uniform 2012-05-24 01:23:20 +01:00
Justin Clark-Casey (justincc) 54c222be26 Fix bug where an avatar that had an object they owned attached through llAttachToAvatar() or osForceAttachToAvatar() would wrongly have next permissions come into play when they detached that object and rezzed it in scene.
This is because the attachments module code was setting the 'object slam' bit by using PermissionMask.All
Solution here is to route the attachment item creation call through the existing inventory code in BasicInventoryAccessModule rather than copy/pasted code in AttachmentsModule itself.
2012-05-24 01:23:09 +01:00
Justin Clark-Casey (justincc) 80d139297a Setting 'in transit' on a local teleport as well as inter-region teleports.
This is to eliminate possible race conditions if two teleport calls are made concurrently, where at least one is a local teleport.
This is pretty much impossible on a manual user teleport but can happen on script-invoked teleports.
2012-05-24 01:23:03 +01:00
Justin Clark-Casey (justincc) 8e6459f616 minor: extend commented out LinkInventoryItem log message for future use 2012-05-24 01:22:48 +01:00
Justin Clark-Casey (justincc) ba909cb692 Fix bug where outfit folders could not be renamed.
Outfit folders are a type of system folder whose details are allowed to change.
2012-05-24 01:19:53 +01:00
Justin Clark-Casey (justincc) 96b964f7fa Enable FetchInventoryDescendents2 and FetchInventory2 caps by default. This appears to be required now for LL 3.3.1 to work properly.
Without this, LL 3.3.1 continually pushes LLInventoryModelFetchDescendentsResponder::error 499 to its log.
This cap will be ignored by older viewers - UDP inventory will work normally.
2012-05-24 01:15:04 +01:00
Justin Clark-Casey (justincc) 7bbab2f1d5 Fix issue where a new outfit folder is not created when a new outfit is saved if there are no previous outfits
This was because AddFolder() was disallowing these though they are legal.
2012-05-24 01:14:44 +01:00
Justin Clark-Casey (justincc) e5f3af4abe Fix build break. Comment out EQG deregister/register logging. 2012-05-24 01:10:33 +01:00
Justin Clark-Casey (justincc) 452538c6b0 Add millisecond logging to pCampBot for debugging purposes 2012-05-24 01:10:24 +01:00
Justin Clark-Casey (justincc) 5c828724f3 Add level 2 debug eq logging which logs event queue polls.
Refactor: eq message logging into common method.
2012-05-24 01:10:15 +01:00
Justin Clark-Casey (justincc) 6538dd24bb Invoke log4net configurator in pCampBot.exe in order to get OpenSim sylte logging 2012-05-24 01:10:09 +01:00
Justin Clark-Casey (justincc) 996abe1ea5 refactor: move EventQueueGet path generation into common method. Rename some local variables in line with code conventions. Add commented out EQG log lines for future use. 2012-05-24 01:09:58 +01:00
Justin Clark-Casey (justincc) f421e0c3d1 Don't eagerly clear frame collision events when physics actors subscribe and unsubscribe from collisions, in order to avoid a race condition.
Since this is done directly from ScenePresence, it can lead to a race condition with the simulator loop.
There's no real point doing it anyway since the clear will be done very shortly afterwards by the simulate loop and either there are no events (for a new avatar) or events don't matter (for a departing avatar).
This matches existing behaviour in OdePrim
2012-05-24 01:09:46 +01:00
Justin Clark-Casey (justincc) e4eaca5f9b minor: improve method doc for TestSameSimulatorSeparatedRegionsCreateAgentFails() 2012-05-24 01:08:32 +01:00
Justin Clark-Casey (justincc) ef5925fa18 Add regression TestSameSimulatorSeparatedRegionsCreateAgentFails() 2012-05-24 01:08:30 +01:00
Justin Clark-Casey (justincc) bae48a9394 minor: Remove redundant EstateOwner != UUID.Zero check in IsAdministrator because checking EstateOwner == user
Due to an earlier check we already know that user != UUID.Zero so if EstateOwner == UUID.Zero, EstateOwner == user can never be true
2012-05-24 01:06:47 +01:00
Justin Clark-Casey (justincc) c813ed44d8 Comment out TestSameSimulatorSeparatedRegionsQueryAccessFails() regression test logging accidentally left in 2012-05-17 01:52:15 +01:00
Justin Clark-Casey (justincc) 885bec68bd Add regression TestSameSimulatorSeparatedRegionsQueryAccessFails() 2012-05-17 01:52:06 +01:00
Justin Clark-Casey (justincc) b553a05db3 Remove redundant "Teleport failed:" from reason when QueryAccess fails for the destination simulator. This part of the string is already provided by the viewer.
Also adds more reason logging for diagnostics when teleports are refused/fail.
2012-05-17 01:51:59 +01:00
Justin Clark-Casey (justincc) 5473c4f8cc Route OAR SOG loading through the common SceneObjectSerializer.FromXml2Format() rather than the functionally identical but buggy Xml2ToSOG().
Remove buggy Xml2ToSOG().
2012-05-17 01:51:48 +01:00
Justin Clark-Casey (justincc) 0d73f81fb5 Fix issue where loading OARs could sometimes result in link numbers being reordered.
This was because the parts in scene objects were sometimes not serialized in link order.
This is perfectly fine since the parts still have the right link numbers, but an extra fix to adjust for this
had not been done in the SerialiserModule methods that OAR loading used.
Add regression test for same.
Addresses http://opensimulator.org/mantis/view.php?id=5948, http://opensimulator.org/mantis/view.php?id=5749
2012-05-17 01:51:39 +01:00
Justin Clark-Casey (justincc) 66c204b983 Allow use of regular expressions in "show object name", "show part name" and "delete object name" console commands if --regex switch is used.
Deleteing objects by name, creator uuid or owner uuid now requires confirmation to avoid accidental deletion.
2012-05-17 01:51:32 +01:00
Justin Clark-Casey (justincc) afb0600621 minor: add explanative comment to 'missing baked texture' logging commonly seen on inter-simulator teleports where avatar baked textures are not available from the asset service. 2012-05-17 01:50:52 +01:00
Justin Clark-Casey (justincc) a13f2c6985 minor: comment out individual attachment transfer log messages for now 2012-05-17 01:50:45 +01:00
Justin Clark-Casey (justincc) 17c7ef06ba Set the agent in transit teleport flag at the first available opportunity (i.e. when IsInTransit() was being checked) to close down a race condition.
On EntityTransferModule.DoTeleport() there was an IsInTransit() check to prevent multiple simultaneous teleport attempts.
However, the SetInTransit() was only performed later on, which left a window in which multiple threads could pass the IsInTransit() check.
This has been seen in the field and the results aren't pretty.
This commit effectively combines the IsInTransit() and SetInTransit() checks so there is no such window.
More failure cases are made to to call ResetInTransit() to adjust to this move.
2012-05-17 01:50:35 +01:00
Justin Clark-Casey (justincc) 4933ce49b6 Add more region information to some teleport related logging 2012-05-17 01:50:27 +01:00
Justin Clark-Casey (justincc) 5cec1fa50a Fix mono compiler warning.
Last jenkins failure looked like a glitch.
2012-05-17 01:50:14 +01:00
Justin Clark-Casey (justincc) debd83b06a Print out more information on connecting bots 2012-05-17 01:50:02 +01:00
Justin Clark-Casey (justincc) f01618ad1a Stagger multiple bot logins by 5 seconds to make this part of the test more 'realistic'
TODO: Need to make this value configurable by a command line parameter to pCampbot
2012-05-17 01:49:48 +01:00
Justin Clark-Casey (justincc) cfc1dba99b Do bot startup on another thread so console is responsive during this process 2012-05-17 01:49:39 +01:00
Justin Clark-Casey (justincc) 529a3f2400 Do each bot shutdown on its own threads to prevent one slow shutdown holding up all the rest.
This does increase the aggressiveness of shutdown
Also prevents the bot list being locked for a long period, which was preventing commands such as "show bots" from working during shutdown
2012-05-17 01:49:31 +01:00
Justin Clark-Casey (justincc) 7c1abc5225 Increase minimum period between bot actions to 3 seconds, so that teleport doesn't fall under the minimum 2 second limits that clients take to process it 2012-05-17 01:49:15 +01:00
Justin Clark-Casey (justincc) ca22b5e2f0 Change bot.IsConnected to be ConnectionState with Disconnected, Connecting, Connnected and Disconnecting states 2012-05-17 01:48:47 +01:00
Justin Clark-Casey (justincc) 9ec74f2098 Provide feedback on bot login states in pCampbot 2012-05-17 01:48:45 +01:00
Justin Clark-Casey (justincc) cb4ae39cb9 If a bot is not connected, show region name "(none)" instead of throwing an exception in the "show bots" command of pCampbot 2012-05-17 01:46:55 +01:00
Justin Clark-Casey (justincc) 802488814f Add ConsoleTable framework class for future uniform formatting of console output tables.
Still subject to change - if you use this be prepared to change your output code if/when the methods change.
Make new "attachments show" command use this.
2012-05-17 01:46:46 +01:00
Justin Clark-Casey (justincc) 53aa48b42c Add "attachments" show console command that will show the server's record of which attachments an in-scene avatar has.
For debugging purposes.
2012-05-17 01:46:36 +01:00