Commit Graph

16973 Commits (aac4d9d6826705a96b98867cedb1d7cb73ded189)

Author SHA1 Message Date
Justin Clark-Casey (justincc) aac4d9d682 Fix issue where RegionCombinerModule was not removing regions from its dictionary on RemoveRegion(), causing a later issue if regions were restarted (removed then readded). 2012-08-02 01:27:17 +01:00
Justin Clark-Casey (justincc) 25d39a19e1 When copying items, copy the item description field instead of the asset description field.
If we copy the asset description then we will only ever replicate the very first description, if there was one, not any subsequent changes.
Thanks to Oren Hurvitz of Kitely for this patch from http://opensimulator.org/mantis/view.php?id=6107
I have adapted it slightly to change the order of arguments (name before description rather than vice-versa) and slightly improve some method doc.
2012-08-02 01:27:03 +01:00
Justin Clark-Casey (justincc) 55d383e4be Add MemoryWatchdog class missing from git master a1e9964 2012-08-02 01:19:01 +01:00
Justin Clark-Casey (justincc) b180fdd0fd Correct churn stat from MB/s from KB/s 2012-08-02 01:18:48 +01:00
Justin Clark-Casey (justincc) cc6b2fdb9f Add experimental "OpenSim object memory churn" statistics to output of region console "show stats" command
This aims to capture the amount of memory that OpenSim turns over whilst operating a region.
This memory is not lost - apart from leaks it is reclaimed by the garbage collector.
However, the more memory that gets turned over the more work the GC has to do to reclaim it.
2012-08-02 01:13:58 +01:00
Justin Clark-Casey (justincc) 9d6ea27df0 Make SceneManager.OnRegionsReadyStatusChange event available.
This is fired when all regions are ready or when at least one region becomes not ready.
Recently added EventManager.OnRegionReady becomes OnRegionReadyStatusChange to match OnLoginsEnabledStatusChange
2012-08-02 00:50:02 +01:00
Melanie 2d66fcd4cd Committing Avination's memleak fix-a-thon, installment #2
Ensure items coming off the lockless queue are released. Also ensure this
is done when the queue is cleared.
2012-08-02 00:24:23 +01:00
Melanie 91ae1908fe Committing Avination's memleak fix-a-thon, installment #3
When linking, detach the no longer used SOG's from backup so they can be
collected. Since their Children collection is never emptied, they prevent
their former SOPs from being collected as well.
2012-08-02 00:23:47 +01:00
Melanie ed962bb3d3 Commiting Avination's memleak fix-a-thon, installment #1
As the MinHeap shrinks, free object references that have been sent. Also,
free the last item when it empties.
2012-08-02 00:23:38 +01:00
Justin Clark-Casey (justincc) 9ea09d785c Add basic TestCreateRootScenePresence() regression test 2012-08-02 00:18:45 +01:00
Justin Clark-Casey (justincc) e3db5fb603 Add EventManager.OnRegionLoginsStatusChange fired whenever logins are enabled or disabled at any point, not just during initial startup.
This replaces EventManager.OnLoginsEnabled which only fired when logins were first enabled
and was affected by a bug where it would never fire if the region started with logins disabled.
2012-08-02 00:11:11 +01:00
Justin Clark-Casey (justincc) 58aa51218e Add back notification to neighbouring regions when RegionReadyModule is not active accidentally just removed in 528004d 2012-08-02 00:11:00 +01:00
Justin Clark-Casey (justincc) 0fff0e1fad Perform other region ready actions even if simulator is configured to leave logins disabled on startup. 2012-08-02 00:10:46 +01:00
Justin Clark-Casey (justincc) 4457ec667a Stop the 15 second initial script compile wait if a script is being rezzed on a previously empty region. 2012-08-02 00:07:41 +01:00
Justin Clark-Casey (justincc) 7f2e6a55c4 Fix bug where region ready would be triggered a second time if a script was rezzed on a previously script-free region.
There is no need to listen for OnRezScript in RegionReadyModule since OnEmptyScriptCompileQueue will only fire if scripts were compiled.
2012-08-02 00:07:27 +01:00
Justin Clark-Casey (justincc) 92a01a7e70 Fix bug where region ready was being triggered twice in quick succession if a region contained no scripts. 2012-08-02 00:04:37 +01:00
Justin Clark-Casey (justincc) 4debc67b48 Establish EventManager.OnRegionReady event. This will only be triggerred once when the region is ready.
Switch MapImageServiceModule to use this.
2012-08-02 00:04:17 +01:00
Justin Clark-Casey (justincc) c8f60acc30 Pass entire scene object in OnLoginsEnabled event rather than just the region name.
This saves listeners from having to re-retrieve the scene from their own lists, which won't work anyway if multiple regions with the same name have been allowed
2012-08-01 23:59:47 +01:00
Justin Clark-Casey (justincc) 272c3c1069 Only listen to LoginsEnabled event in RegionReadyModule if it has been asked to disable logins until all scripts have been compiled 2012-08-01 23:50:59 +01:00
Justin Clark-Casey (justincc) 5aa9c21e7d minor: switch around mixed up circuit code and endpoint data in "show connections" region console command 2012-07-25 23:37:21 +01:00
Justin Clark-Casey (justincc) 454c3fc913 Make LLClientView instant message handling asynchronous rather than synchronous to prevent long operations from holding up all inbound packet processing.
Giving a large folder from one avatar to another was causing a long delay when handled synchronously, since it took some time to retrieve the necessary data from the inventory service.
Handling this asynchronously instead stops this delay from disrupting all avatars in the scene.  This has been shown in OSGrid.
I see no reason for not handling all IM messages asynchronously, just as incoming chat is handled asynchronously, so this has been switched for all instant messages.
Thanks to Nebadon for testing this change out.
2012-07-25 23:37:20 +01:00
Justin Clark-Casey (justincc) 3cd7c59696 Comment out OnIncomingInstantMessage and OnInstantMessage handlers in GroupsModule, since these led to a private blank method 2012-07-25 23:37:18 +01:00
Justin Clark-Casey (justincc) 1f8ac33ecb Stop explicitly closing and nulling out Animator in order to prevent NREs in various places due to race conditions.
Even where checks are being made they aren't enough since they all assume that the Animator they just checked is still there in the next line, which is not necessarily the case without locking.
The memory used is small and these should be GC'd anyway when the SP is released.  If this is not happening then the wider problem of old SPs being retained needs to be resolved.
2012-07-25 23:37:15 +01:00
Justin Clark-Casey (justincc) 47e2922a40 Prevent race conditions between two threads that call LLClientView.Close() simultaneously (e.g. ack timeout and an attempt to reconnect) 2012-07-25 23:32:27 +01:00
Justin Clark-Casey (justincc) 4deb25da87 Add TestCreateDuplicateRootScenePresence() regression test. 2012-07-25 23:32:21 +01:00
Justin Clark-Casey (justincc) 587c8017ab Add basic TestCreateRootScenePresence() regression test 2012-07-25 23:32:06 +01:00
Justin Clark-Casey (justincc) d5d801f218 Close() the ScenePresence after we've removed it from the scene graph, to cut down race conditions when another thread manages the grab the presence after some SP structures have been reset. 2012-07-25 23:30:59 +01:00
Justin Clark-Casey (justincc) 2f865da5c7 refactor: factor out common code in WebStatsModule.OnMakeRootAgent() 2012-07-19 01:00:50 +01:00
Justin Clark-Casey (justincc) cf2f6843c6 In WebStatsModule.OnMakeRootAgent(), get region ID directly from SP.Scene.RegionInfo.RegionID instead of manually looking it up from the stored scene list. 2012-07-19 01:00:40 +01:00
Justin Clark-Casey (justincc) 97d084c9f5 Stop warning about no session from ViewerStats if user teleports to another region in the same simulator that was not next to the source region.
This was because teleporting to the new region invoked the new session setup code before the agent was removed from the old region, which then invoked the session teardown code.
Now, we only invoke the teardown code if the region ID occupied by the agent being removed is the same as the one registered for the current session.
2012-07-19 01:00:33 +01:00
Justin Clark-Casey (justincc) 14f72a9a43 Remove a callstack print out I accidentally left in 2 commits ago in 9ccb578 2012-07-19 00:57:50 +01:00
Justin Clark-Casey (justincc) 89efccaa71 Rather than instantiating a UTF8 encoding everywhere when we want to supress the BOM, use a single Util.UTF8NoBomEncoding.
This class is thread-safe (as evidenced by the provision of the system-wide Encoding.UTF8 which does not suppress BOM on output).
2012-07-19 00:57:36 +01:00
Justin Clark-Casey (justincc) 8f61da0759 Don't cache regions data on the other unused LocalGridServiceConnector that the module code still sets up even if we're using one directly instantiated from the RemoteGridServiceConnector.
Also improves log messages to indicate which regions are sending/receiving various neighbour protocol messages.
2012-07-19 00:50:17 +01:00
Justin Clark-Casey (justincc) e88e87ff63 Stop redundantly passing in the endpoint to the LLClientView constructor.
This can always be retrieved via the LLUDPClient and is so done in various places already.
2012-07-19 00:45:19 +01:00
Justin Clark-Casey (justincc) 4f10d1aa0c Remove IClientIPEndpoint client interface for now.
This may well come back in the future when this subinterface is actually used but it currently isn't and I feel the name was poor.
Everything uses IClientAPI.RemoveEndPoint which also returned the full endpoint rather than just the ip address.
2012-07-19 00:45:08 +01:00
Justin Clark-Casey (justincc) 1912215c40 Remove IClientAPI.GetClientEP() in favour of existing identical IClientAPI.RemoteEndpoint. 2012-07-19 00:45:02 +01:00
Justin Clark-Casey (justincc) ffbca99b57 Extend "show circuits" to show circuit code, ip and viewer name.
Also change to use standard table formatting
"show circuits" and "show connections" console commands are very similar but access different data structures.
2012-07-19 00:44:48 +01:00
Justin Clark-Casey (justincc) f660a25fa7 Add active status to "show connections" 2012-07-19 00:40:35 +01:00
Justin Clark-Casey (justincc) 523d03fb76 Put output for "show connections" command into standard table format.
Also moves into own method.
2012-07-19 00:40:18 +01:00
Justin Clark-Casey (justincc) 85985a8c3e Where possible, use the system Encoding.ASCII and Encoding.UTF8 rather than constructing fresh copies.
The encodings are thread-safe and already used in such a manner in other places.
This isn't done where Byte Order Mark output is suppressed, since Encoding.UTF8 is constructed to output the BOM.
2012-07-19 00:25:40 +01:00
Justin Clark-Casey (justincc) 013e002b00 Fix build break for windows with missing package for IScriptEngine in prebuild.xml for OpenSim.Region.CoreModules.Tests.dll 2012-07-11 23:29:45 +01:00
Justin Clark-Casey (justincc) 5269d77cf9 Allow XEngine StartDelay to be configured in the [XEngine] config section.
This is only currently meant for use by regression tests that don't have any issues if XEngine is started up quickly, since no other operations will be occuring simultaneously.
Therefore, this is not yet documented externally.
2012-07-11 23:29:39 +01:00
Justin Clark-Casey (justincc) 8c8e6220fb Remove WorldComm module from the regression TestCompileAndStartScript() since the infrastructure no longer fails if this module isn't present, at least on the tested codepaths 2012-07-11 23:29:31 +01:00
Justin Clark-Casey (justincc) 150860c964 Add regression TestDetachScriptedAttachmentToInventory()
This currently only does a relatively crude check for a ScriptState node in the serialized xml
2012-07-11 23:29:24 +01:00
Justin Clark-Casey (justincc) 0cb1b0bb4a Add regression TestRezScriptedAttachmentsFromInventory() though this currently only checks for the presence of script items, not for started scripts 2012-07-11 23:29:16 +01:00
Justin Clark-Casey (justincc) 56d894ae24 refactor: move management of SOP.SitTargetAvatar into SOP.AddSittingAvatar() and SOP.RemoveSittingAvatar() 2012-07-11 23:29:07 +01:00
Justin Clark-Casey (justincc) b34fd50155 Revert "refactor: Add SOP.IsSitTargetOccupied to improve readability"
This reverts commit c8f0d476d2.
On reconsideration, I think this is less readable since immediately following code still sets SitTargetAvatar directly
2012-07-11 23:15:35 +01:00
Justin Clark-Casey (justincc) 74486e767d refactor: Add SOP.IsSitTargetOccupied to improve readability 2012-07-11 23:15:23 +01:00
Justin Clark-Casey (justincc) 1b8814878d refactor: use sit orientation argument passed in to SP.SendSitResponse() rather than creating a new copy
There are no issues with side-effects since this is a struct.
2012-07-11 23:15:14 +01:00
Justin Clark-Casey (justincc) 095375d63d Move common code to detect whether a part has a valid sit target into a SOP property rather than being repeated in SP.
This also makes the detection in SP.FindNextAvailableSitTarget() and SendSitResponse() identical.
Previously they varied slightly (SendSitResponse didn't check for an older type of invalid quaternion) but the practical effect is most probably zero.
2012-07-11 23:15:06 +01:00