Commit Graph

16919 Commits (35457448ca72b4371a5238e164126f4d5627acce)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 35457448ca If a script is being stopped manually, then give the scriptpool thread 1 second to finish normally before forcibly aborting.
This is to avoid the worst of the problems in mono 2.6, 2.10 where an aborted thread does not always release all its locks.
This very short grace period is identical to the existing behaviour when a script is removed from the scene.
2012-07-11 23:14:30 +01:00
Justin Clark-Casey (justincc) 596caf41db This script allows an object to be attached directly from prim inventory to another avatar in the scene.
Very useful in serious game/environment scenarios where its only allowed for trusted creators.
Threat level Severe
2012-07-11 23:14:14 +01:00
Justin Clark-Casey (justincc) c62b46a167 Don't allow a prim to be sat upon if its part of an attachment 2012-07-11 23:14:04 +01:00
Justin Clark-Casey (justincc) 2b3098f011 Do not allow a script to attach a prim if its being sat upon.
This prevents a stack overflow where a get position on the avatar will refer to the attachment which will in turn refer back to the avatar.
This required recording of all sitting avatars on a prim which is done separately from recording the sit target avatar.
Recording HashSet is null if there are no sitting avatars in order to save memory.
2012-07-11 23:13:48 +01:00
Justin Clark-Casey (justincc) 74b4efd7f9 minor: remove some recent mono compiler warnings 2012-07-11 23:07:17 +01:00
Justin Clark-Casey (justincc) 298c4c0eb5 Remove duplicate Warp3DImageModule entry in CoreModulePlugin.addin.xml
This was causing 2 copies of the module to be created for each scene.
Probably no bad consequences other than a small waste of memory (both for the module and for the warp3D renderer it loaded)
2012-07-11 23:07:09 +01:00
Justin Clark-Casey (justincc) 068917bc29 Remove redundant SetScene() function in Scene.AddSceneObject()
This is always done later on in SceneGraph.AddSceneObject() if the call hasn't failed due to sanity checks.
There's no other purpose for this method to exist and it's dangerous/pointless to call in other conditions.
2012-07-11 23:06:41 +01:00
Justin Clark-Casey (justincc) d8f1d2892c Remove now duplicate interregion object check that should have been removed a few commits ago in 43a2da9 2012-07-11 23:06:30 +01:00
Justin Clark-Casey (justincc) ccf8e89193 minor: Remove some wrong comments in attachments regression tests 2012-07-11 23:06:23 +01:00
Justin Clark-Casey (justincc) f17f58ac2a Add assert to attachment regression tests to check that number of objects in the scene graph 2012-07-11 23:06:14 +01:00
Justin Clark-Casey (justincc) 6bcb5baab6 Pull prim crossing/teleport checks up into Scene.IncomingCreateObject() from Scene.AddObject()
Only IncomingCreateObject() needs these checks.  General object adding does not need to perform crossing perm checks
2012-07-11 23:05:59 +01:00
Justin Clark-Casey (justincc) 0aaf935333 refactor: extract method UpdateUserInventoryWithAttachment() from AttachObject() for better code comprehension 2012-07-11 23:05:53 +01:00
Justin Clark-Casey (justincc) b30806822e Log MONO_THREADS_PER_CPU value on simulator startup, or "unset" if it is not set 2012-07-11 23:05:43 +01:00
Justin Clark-Casey (justincc) a2c3dfc422 Log warning if time between invocations of the watchdog thread is twice the timer setting.
This is to help detect situations where thread timeout warnings are being generated because of general machine issues rather than deadlock, network or other problems.
2012-07-11 23:05:34 +01:00
Justin Clark-Casey (justincc) 4050a6f8bb minor: add client name to various login service log messages to disambiguate messages from concurrent logins. Also adds destination resolution debug log message showing region endpoint.
Adding endpoint to the log helps to find issues where the region external host information has been wrongly configured
2012-07-11 23:05:26 +01:00
Justin Clark-Casey (justincc) 0d0d04c484 minor: Add more information to OSFunctionThreatLevel and clarify some text in using PARCEL_OWNER, PARCEL_GROUP_MEMBER, ESTATE_MANAGER, ESTATE_OWNER permission categories 2012-07-11 23:05:09 +01:00
SignpostMarv 952b3448a6 porting console commands from raw2sculpt 3.2 2012-07-11 23:05:01 +01:00
Justin Clark-Casey (justincc) d53ef3b302 Add OSSL function osForceAttachToAvatarFromInventory()
This works like osForceAttachToAvatar() but allows an object to be directly specified from the script object's inventory rather than forcing it to be rezzed in the scene first.
Still only attaches objects to the owner of the script.
This allows one to bypass the complicated co-ordination of first rezzing objects in the scene before attaching them.
Threat level high.
2012-07-11 23:04:49 +01:00
Justin Clark-Casey (justincc) 48e88397a0 Use GetInventoryItem() in llRezAtRoot rather than iterating through a cloned dictionary 2012-07-11 23:04:42 +01:00
Justin Clark-Casey (justincc) 976190fe96 refactor: In llGetNotecardLine() use existing GetInventoryItem() rather than inspecting a clone of the TaskInventory dictionary that was not cloned thread-safe 2012-07-11 23:04:34 +01:00
Justin Clark-Casey (justincc) 1e025d6074 refactor: In llGetNumberOfNotecardLines() use existing GetInventoryItem() rather than inspecting a clone of the TaskInventory dictionary that was not cloned thread-safe 2012-07-11 23:04:27 +01:00
Justin Clark-Casey (justincc) fffd2fe10d refactor: use existing GetInventoryItem() in GetScriptByName(), itself renamed from ScriptByName() 2012-07-11 23:01:41 +01:00
Justin Clark-Casey (justincc) cf8adbe007 refactor: In llGetInventoryType() use existing GetInventoryItem() 2012-07-11 23:01:33 +01:00
Justin Clark-Casey (justincc) 890f617e58 refactor: In llGetInventoryCreator() use existing GetInventoryItem() 2012-07-11 23:01:27 +01:00
Justin Clark-Casey (justincc) 6ff0e58db7 refactor: In llGetInventoryPermMask() use existing GetInventoryItem() 2012-07-11 23:00:57 +01:00
Justin Clark-Casey (justincc) 795443cff1 refactor: in llGetInventoryPermMask use existing GetInventoryItem() 2012-07-11 23:00:50 +01:00
Justin Clark-Casey (justincc) 8c7f511e55 refactor: In llRemoteLoadScriptPin() use existing GetInventoryItem() 2012-07-11 23:00:43 +01:00
Justin Clark-Casey (justincc) 0acac2f890 refactor: replace use of LSL_Api.GetTaskInventoryItem() with existing GetInventoryItem() 2012-07-11 23:00:36 +01:00
Justin Clark-Casey (justincc) 72554fc5b8 refactor: In llGetInventoryKey() use existing GetInventoryItem() 2012-07-11 23:00:28 +01:00
Justin Clark-Casey (justincc) aa1442b07e In llMessageLinked() use GetInventoryItems() rather than cloning TaskInventory directory
GetInventoryItems() returns a new list and so is equivalent, and creates this list under lock whereas Clone() is not thread-safe
2012-07-11 23:00:21 +01:00
Justin Clark-Casey (justincc) e8a0ec1287 In llRequestInventoryData() use GetInventoryItems() rather than cloning TaskInventory directory
GetInventoryItems() returns a new list and so is equivalent, and creates this list under lock whereas Clone() is not thread-safe
2012-07-11 23:00:13 +01:00
Justin Clark-Casey (justincc) 3436be2046 refactor: In llCollisionSound() use existing GetInventoryItem() method rather than have it iterate through TaskInventory itself. 2012-07-11 23:00:07 +01:00
Justin Clark-Casey (justincc) 9a0bcb7750 refactor: In llRemoveInventory() use existing GetInventoryItem() method rather than have it iterate through TaskInventory itself. 2012-07-11 22:59:59 +01:00
Justin Clark-Casey (justincc) 218fe36f84 refactor: make llGiveInventory() use existing GetInventoryItem() method rather than iterate through TaskInventory itself. 2012-07-11 22:59:53 +01:00
Justin Clark-Casey (justincc) 07298c8b4f refactor: rename Watchdog.WATCHDOG_TIMEOUT_MS to DEFAULT_WATCHDOG_TIMEOUT_MS to reflect what it actually is 2012-07-11 22:59:46 +01:00
Justin Clark-Casey (justincc) d9f40d1ebc minor: Add some method doc to HasGroupChanged and Schedule GroupForFull/PartUpdate() to indicate when region modules need to invoke them 2012-07-11 22:59:39 +01:00
Justin Clark-Casey (justincc) eddff428ed Removing unused handling of incoming create object by userID and itemID only.
It appears this was never actually used since attachments were rezzed in other code.
This was never available on remote simulator comms, only local.
2012-07-11 22:58:57 +01:00
Justin Clark-Casey (justincc) 61aaa10460 Remove code listed for removal in 0.7.3 that handled script restart for incoming attachments from pre-fatpack regions (versions of OpenSimulator more than a year old) 2012-07-11 22:58:50 +01:00
Justin Clark-Casey (justincc) e1d6929e61 Move update of the final optional ODE total frame stat inside the OdeLock rather than outside to avoid a very occasional race condition with the stat collection thread 2012-07-11 22:58:37 +01:00
Justin Clark-Casey (justincc) 6b87873aa7 refactor: rename _collisionEventPrim to m_collisionEventActors and _collisionEventPrimChanges to m_collisionEventActorsChanges to reflect their actual contents.
These dictionaries handle all actor types, not just physical prims.
2012-07-11 22:58:29 +01:00
Justin Clark-Casey (justincc) f690acbfb6 Fix a regression where we stopped removing avatars from collision event reporting on logout, rather than stopping clearing their collision events.
This occurred in b18c8c8 (Thu May 17 2012).
This was a cause of very occasional race conditions and likely memory leakage as clients came and went from the region.
2012-07-11 22:58:09 +01:00
Justin Clark-Casey (justincc) f49c850269 If a link points to a non-existing item in FetchInventory caps, then don't try to add it to the return data rather than suffering an exception later on 2012-07-11 22:58:01 +01:00
Justin Clark-Casey (justincc) 70f85af75b Add IScene.Name for code clarity to replace the RegionInfo.RegionName used in many, many log messages. 2012-07-11 22:57:53 +01:00
Justin Clark-Casey (justincc) 663b0cc681 Change AttachmentsModule.DetachSingleAttachmentToInv() to accept a SOG directly instead of an item ID to then shuffle through attachments, saving CPU busywork.
Almost all callers already had the sog to hand.
Still checking that it's really an attachment, but now by inspecting SOG.AttachedAvatar
2012-07-11 22:57:39 +01:00
Justin Clark-Casey (justincc) 733a8c9f89 Rather than iterating through all SOGs in the scene looking for the one that matches out fromItemID on detach, go through the agent's attachment sog list instead. 2012-07-11 22:57:31 +01:00
Justin Clark-Casey (justincc) 25109c8e4d Remove code that tried to delete an attachment back to inventory if RezSingleAttachmentFromInventoryInternal() returned null.
null would only ever be returned if the item couldn't be located within inventory and this would happen immediately.
In this case, derezzing wouldn't work anyway since there is no item to derez.
2012-07-11 22:57:22 +01:00
Justin Clark-Casey (justincc) 51724128bf If rest of first line after colon is blank then still warn about running in XEngine if engine specified does not exist.
This is to take account of situations where the user was intending to specify a script engine using colon using its default language.
This probably generates few false positive as scripts are less likely to end a first line colon with a comment for other purposes.
2012-07-11 22:57:12 +01:00
Justin Clark-Casey (justincc) 461831a65e Avoid reporting false positives when a colon is in a comment in the first line of a script where the user was not trying to select a different script engine.
This works by only posting the "Selected engine unavailable" message if we're falling back on XEngine and the language is one handled by XEngine.
In cases where the language is not handled or not allowed, the user will still be notified by the later compiler error.
This avoids the overwhelming majority of false positives where the first line contains a : for other reasons (e.g. source control systems, vim settings, etc.)
Ultimately, I think it would be better to detect script language/engine with a mechanism that didn't just rely on : detection (e.g like #! in unix scripts).
2012-07-11 22:56:59 +01:00
Justin Clark-Casey (justincc) c6fa09c3af minor: reuse colon index calculation in XEngine.OnRezScript. The index if a colon is found on the first line will always be the same as for the whole script. 2012-07-11 22:56:45 +01:00
Justin Clark-Casey (justincc) 9ccf56eaae Fix issue in InventoryArchiveTestCase where it didn't call down to OpenSimTestCase.SetUp() 2012-06-27 21:52:23 +01:00