Commit Graph

363 Commits (df7468ffa27b46f074b0f9c6d6c7be4e09164c88)

Author SHA1 Message Date
Melanie 16aa00e944 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2012-02-01 10:08:45 +00:00
Justin Clark-Casey (justincc) 99e71222f0 Lay out script status in property per row format, since getting too long for console lines. 2012-02-01 00:27:42 +00:00
Justin Clark-Casey (justincc) e3680f216e Add count of events queued for a particular script in "scripts show" console command 2012-02-01 00:17:02 +00:00
Justin Clark-Casey (justincc) 8b3da1bff4 Make script console commands only show for selected region. 2012-02-01 00:10:07 +00:00
Justin Clark-Casey (justincc) 437de6743c Implement "xengine status" console command to show various xengine stats 2012-02-01 00:07:06 +00:00
Melanie 43128c9016 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2012-01-14 06:09:19 +00:00
Justin Clark-Casey (justincc) 82f0e19349 Extend scripts show command to accept a single item UUID parameter to display one script's status
Usage is now scripts show [<script-item-uuid>]
2012-01-14 00:44:19 +00:00
Melanie bdb5ac96d9 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-11-19 22:39:15 +00:00
Justin Clark-Casey (justincc) cacc028835 If the entire simulator is shutting down then don't bother to unload the scripts from the appdomain in XEngine.
All the other actions (script state save, etc.) still occur.
This makes shutdown where there are many scripts vastly quicker.
2011-11-17 21:03:08 +00:00
Melanie b975cbcbed Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
	OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
	OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
	OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2011-10-27 18:14:38 +01:00
Justin Clark-Casey (justincc) 40bee97015 For now, comment out error message on new script engine console commands.
This causes false positives if a simulator has more than 1 region and the current region is 'root' since this sends the command separately to each region and each region has its own XEngine
2011-10-27 03:01:27 +01:00
Melanie 635b1bf18e Merge commit '601dabb1b73a894e4f2f61abe6e9053d380008cd' into bigmerge 2011-10-25 03:16:40 +01:00
Melanie 85d40ce1d1 Merge commit '5607fd3af828846291de3358067bb1214619489e' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 03:16:26 +01:00
Melanie df430d572d Merge commit '3cf7fb4eca2ad57835311e8098868f2571709392' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 03:10:54 +01:00
Melanie 1bb0e3c800 Merge commit 'b45219065c7a81b3ec488b3a6734773c34268618' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 03:07:25 +01:00
Melanie 1ec82bb000 Merge commit '116fbe8258e336be3f6ac1e11119214629799faa' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
2011-10-25 03:06:18 +01:00
Melanie 89e973805d Merge commit 'ecad9f9fd589f90d1c7a20faf14af0304804b616' into bigmerge 2011-10-25 02:57:01 +01:00
Melanie 69b480770a Merge commit 'ee84c0589ccca1e7f3216ca1395c3002b773f30f' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 01:50:55 +01:00
Melanie 8e69dde397 Merge commit 'ea7366ddc6f0e13519589fcaa3729fd36b5eef79' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 01:36:39 +01:00
Justin Clark-Casey (justincc) 601dabb1b7 Extend scripts stop/start/suspend/resume console commands to allow action on a single script by giving the script item id (which can be found via scripts show).
Not an ideal way to do this on a region with many scripts.  Needs refinement later.
2011-10-19 22:30:31 +01:00
Justin Clark-Casey (justincc) 32c3faedd6 Add "scripts stop" and "scripts start" console commands.
These will stop all running scripts and start all stopped scripts respectively.
A stopped script does not save any events for later processing.
2011-10-19 21:40:28 +01:00
Justin Clark-Casey (justincc) f836710af5 minor: improve command help on scripts suspend/resume 2011-10-19 21:34:55 +01:00
Justin Clark-Casey (justincc) 5607fd3af8 Fix resume scripts.
On resume, we need to place requeue the script for event processing if there are any events on the queue.
Also need to do this under m_Script lock in order to avoid a race
2011-10-19 21:30:37 +01:00
Justin Clark-Casey (justincc) 3cf7fb4eca Add "scripts suspend" and "scripts resume" commands.
These aim currently to suspend and resume all scripts.
However, resume isn't currently working due to what looks like a bug in resume functionality itself.
2011-10-19 20:53:24 +01:00
Justin Clark-Casey (justincc) b45219065c on log and "show scripts" messages, show script item UUID rather than asset UUID
The item ID is the one required for any script manipulation on the command line, so I think it's somewhat more useful to show this bearing in mind the limited space available
2011-10-19 20:26:05 +01:00
Justin Clark-Casey (justincc) 116fbe8258 add current script status to "scripts show" command (running, suspended, etc.) 2011-10-19 20:24:07 +01:00
Justin Clark-Casey (justincc) ecad9f9fd5 Add "show scripts" command to show all scripts currently known to the script engine in the current region.
Also added synonym of "scripts show"
2011-10-19 20:09:02 +01:00
Justin Clark-Casey (justincc) ee84c0589c Don't execute rest of code in XEngine.RemoveRegion() and Close() if the module is disabled. 2011-10-14 01:06:43 +01:00
Justin Clark-Casey (justincc) ea7366ddc6 When shutting down XEngine, log how many scripts are being shutdown so the user knows why they are waiting. 2011-10-12 19:42:04 +01:00
Tom 5484c9b585 Bring us up to date. 2011-09-14 19:11:32 -07:00
Justin Clark-Casey (justincc) 00f8946bd4 minor: if the script engine fails to find a prim for a script, also print out that prim's local id in the error message. 2011-09-12 22:44:14 +01:00
Oren Hurvitz 1dd904b78e Delay loading scripts until the scene has finished loading 2011-09-09 23:01:05 +01:00
Tom 66dec3b874 Resolve merge commits, stage 1 2011-09-04 07:06:36 -07:00
Justin Clark-Casey (justincc) cf3ffe5bb4 Fix llAttachToAvatar()
Apart from one obvious bug, this was failing because attempting to serialize the script from inside the script (as part of saving the attachment as an inventory asset) was triggering an extremely long delay.
So we now don't do this.  The state will be serialized anyway when the avatar normally logs out.
The worst that can happen is that if the client/server crashes, the attachment scripts start without previous state.
2011-08-24 20:49:23 +01:00
Melanie 61d4291da5 Create a method to force the script engine to save state from outside 2011-05-24 03:17:12 +01:00
Melanie d5841e07c2 Create a method to force the script engine to save state from outside 2011-05-24 02:40:59 +02:00
Melanie 4beb0c9b9b Merge branch 'master' into careminster-presence-refactor 2011-05-05 09:49:10 +01:00
Diva Canto d8ee0cbe1c First stab at cleaning up Caps. Compiles. Untested. 2011-04-30 09:24:15 -07:00
Melanie c271bbcc8a Preserve the script running flag when copying an object. 2011-01-08 16:44:28 +01:00
Melanie efc555ca22 Actually set the PrivateBinPath in XEngine so relocating the scripts
directory works
2010-10-16 10:50:07 +02:00
Melanie 6f689f591a Merge Master 2010-09-26 17:56:31 +01:00
BlueWall 4f25b73b57 Add configurable path to script engine assemblies
Adding ability to place script engine assemblies outside
	the codebase directories.

	Uses new [XEngine] option: ScriptEnginesPath = "path_to_assemblies"

Signed-off-by: Melanie <melanie@t-data.com>
2010-09-26 02:30:46 +01:00
Melanie 6a1ce17cdb Merge branch 'master' into careminster-presence-refactor
The modules will need to be updated for this to compile and run again. Please
don't use until I do the companion commit to modules later on.
2010-09-13 16:17:38 +01:00
Jeff Ames f1f0bc23f4 Formatting cleanup. 2010-09-12 13:43:49 -04:00
Melanie 1bfec00a88 Merge branch 'master' into careminster-presence-refactor 2010-08-23 23:55:15 +01:00
Justin Clark-Casey (justincc) 74e5fe5aa9 Remove various warnings and improve logging messages. No functional changes. 2010-08-23 22:24:23 +01:00
meta7 f0bad66d41 For my own sanity, fix a bug in xengine 2010-08-09 23:34:37 -07:00
Melanie 686837d9ed Merge branch 'master' into careminster-presence-refactor 2010-07-20 21:18:27 +01:00
Diva Canto b7f1288361 Adding it again.
Revert "Reverting this for now, but this needs to go in again."

This reverts commit c0d9ab941d.
2010-07-20 04:23:39 -07:00
Diva Canto c0d9ab941d Reverting this for now, but this needs to go in again.
Revert "Another stab at http://opensimulator.org/mantis/view.php?id=4858. Eliminated more nested locks."

This reverts commit ffbae52a13.
2010-07-19 16:22:29 -07:00
Diva Canto ffbae52a13 Another stab at http://opensimulator.org/mantis/view.php?id=4858. Eliminated more nested locks. 2010-07-19 15:20:34 -07:00
Diva Canto 5c0c7fda6c One more stab at http://opensimulator.org/mantis/view.php?id=4858.
Eliminated the nested locks of m_Scripts and m_PrimObjects.
2010-07-19 13:59:11 -07:00
Melanie fa45d5b5fa Revert "A stab in the dark. Revert the compile lockout temporarily. If you know what"
This reverts commit f798679b80.
2010-07-19 01:10:57 +01:00
Melanie f798679b80 A stab in the dark. Revert the compile lockout temporarily. If you know what
this is, you should test it. If you don't, don't use it.
2010-07-19 00:06:23 +01:00
Melanie 922e874653 Merge branch 'master' into careminster-presence-refactor 2010-07-11 13:32:10 +01:00
unknown 6352fc5f57 Bug in 0.6.9 sometimes restoring script state causes region console to crash due to unhandled file lock exception. Attempt to resolve by wrapping several instances of file create / read logic in using statements and added some error handling for locked file exceptions. If it is IDisposable, it must be disposed! The close statements are unnecessary but harmless so I have left those in. The end of the using block will close and dispose automagically. 2010-07-09 18:23:48 +01:00
Melanie ec73074aac Merge branch 'master' into careminster-presence-refactor 2010-07-02 03:02:53 +01:00
Justin Clark-Casey (justincc) 54d7f6ef43 Add region name on the end of script startup debug messages 2010-07-01 21:34:53 +01:00
Melanie 46a531d865 Merge branch 'master' into careminster-presence-refactor 2010-06-30 21:35:05 +01:00
Melanie 1db2921782 Fix scripts in rezzed objects not starting (Mantis #4775) 2010-06-30 21:25:39 +01:00
Melanie 6701fc2ffa Fix the XML serializationt to provide an empty script state element if
the script hasn't yet saved state, or can't save state because of a loop
2010-06-29 21:50:52 +01:00
Melanie 6b2d2413f7 Merge branch 'master' into careminster-presence-refactor 2010-06-09 16:48:37 +01:00
Melanie 16439fa354 If a script is deleted before it gets compiled, don't even bother to try
compiling it
2010-06-09 03:51:43 +01:00
Melanie 98cb4f74b2 Merge branch 'master' into careminster-presence-refactor 2010-04-19 07:00:40 +01:00
Melanie 21cad5d3ac All scripts are now created suspended and are only unsuspended when the object
is fully rezzed and all scripts in it are instantiated. This ensures that link
messages will not be lost on rez/region crossing and makes heavily scripted
objects reliable.
2010-04-19 06:29:26 +01:00
Jeff Ames af265e001d Formatting cleanup. 2010-02-15 19:21:56 +09:00
Melanie e9c9a74e0a Some merge fixups 2010-01-26 15:12:41 +00:00
Melanie b80ea00265 Merge branch 'master' into careminster 2010-01-26 14:53:14 +00:00
Justin Clark-Casey (justincc) 38cfc9366c Fix a problem where llDie() calls were sometimes leaving dead objects behind.
When an object was deleted, the remove script instance call was aggregating the scripting events as normal.
This would queue a full update of the prim before the viewer was notifed of the deletion of that prim (QuitPacket)
On some occasions, the QuitPacket would be sent before the full update was dequeued and sent.
In principle, you would think that a viewer would ignore updates for deleted prims.  But it appears that in the Linden viewer (1.23.5),
a prim update that arrives after the prim was deleted instead makes the deleted prim persist in the viewer.  Such prims have no properties
and cannot be removed from the viewer except by a relog.
This change stops the prim event aggregation call if it's being deleted anyway, hence removing the spurious viewer-confusing update.
2010-01-25 21:51:58 +00:00
Melanie 61ce884336 Merge branch 'master' into careminster 2010-01-03 21:43:39 +00:00
Jeff Ames 70d5b1c34c Formatting cleanup. Add copyright headers. 2010-01-04 06:17:30 +09:00
CasperW a9f4d7a29c Add a debugger tag to stop Visual Studio from breaking 2009-12-23 17:34:08 +01:00
Melanie 30f59370d3 Merge branch 'master' into careminster 2009-12-22 15:48:41 +00:00
Melanie c11f259e15 Remove GetState. It is really unused and was reinstated by the revert 2009-12-22 15:46:55 +00:00
Melanie a24d9bff03 Revert "Remove an insterface member that was never used"
It was used. By the API, which is dynamically loaded. So it didn't complain
until it hit Bamboo

This reverts commit 33d5018e94.
2009-12-22 15:45:56 +00:00
Melanie 73491cceed Merge branch 'master' into careminster 2009-12-22 15:37:24 +00:00
Melanie 33d5018e94 Remove an insterface member that was never used 2009-12-22 15:35:39 +00:00
Melanie 28c7bb99bf Merge branch 'master' into careminster 2009-12-22 09:30:50 +00:00
Melanie 1876ce90af FINALLY! Script compile errors now appear in the script error pane,
not in a funky debug window.
2009-12-22 09:24:01 +00:00
root b53b871669 Add a data path for error messages 2009-12-22 06:25:32 +01:00
root 05e8b4e72c Add a data path for error messages
Committed from my other box where git is not configured properly

Signed-off-by: Melanie <melanie@t-data.com>
2009-12-22 04:55:43 +00:00
Melanie df30b1c832 Merge branch 'master' into careminster 2009-12-21 10:28:50 +00:00
Melanie 27453890d5 Script State Fix: Part 2
Change the reader to wrap old-style definitions in new style wrappers.
Change importer to not check irrelevant data that can't be reconstructed
This removes the last bit of knowledge of XEngine's .state files from core.
2009-12-21 10:26:52 +00:00
Melanie 83d8ba5775 Remove extra checking on the itemID of saved state, since it changes during
rez from inventory.
2009-12-21 06:41:10 +00:00
Melanie f6ef487413 Script State Fix: Step 1
Add Engine=xxx attribute and check for it's presence. Ignore state data
written bby another engine
2009-12-21 06:29:23 +00:00
CasperW 172e2f4e76 Fix to existing ReaderWriterLockSlim implementations 2009-12-06 17:23:07 +01:00
CasperW 9888f95068 Convert multiple lock()s which directly hinder script performance in linksets to ReaderWriterLockSlim. 2009-11-30 21:17:15 +01:00
Melanie d3e7a52933 Merge branch 'master' into careminster 2009-11-28 09:26:00 +00:00
Justin Clark-Casey (justincc) 55a0896918 minor: remove mono compiler warning 2009-11-27 19:28:26 +00:00
Melanie 06f41bb017 Merge branch 'master' into careminster 2009-11-26 17:27:03 +00:00
Melanie c6bfecccaa Fix a small bug. Trusted script crossings now work again 2009-11-26 17:16:22 +00:00
Melanie 9d63f90467 Remove the old (Remoting) region crossing code. Fix the new code to
pass script state and assembly again properly. Reintroduce respecting tht
TrustBinaries flag. Changes the interregion protocol! No version bump
because it was broken anyway, so with a version mismatch it will simply
stay broken, but not crash. Region corssing still doesn't work because
there is still monkey business with both rezzed prims being pushed across
a border and attached prims when walking across a border. Teleport is
untested by may work.
2009-11-26 17:03:09 +00:00
Melanie 22c325aa5a Remove GetAssemblyName and friends from the SE interface. It's now handled
internally
2009-11-26 13:13:48 +00:00
Melanie 88842edc95 Remove GetAssemblyName and friends from the SE interface. It's now handled
internally
2009-11-26 12:08:20 +00:00
CasperW 889ce36afa Added some [DebuggerNonUserCode] modifiers to functions that throw EventAbortException() to ease debugging on Visual Studio 2009-11-23 17:59:24 +01:00
Melanie 00130841db Remove parallel loading from XEngine, but retain the new design where
all scripts are loaded from the same thread, rather than launching a
new one for each script. This is only marginally slower, but avoids the
race condition that led to script engine failure.
2009-11-03 20:23:50 +00:00
John Hurliman ec7fd8b1f8 More performance improvements to XEngine script loading 2009-10-29 06:42:40 -07:00
John Hurliman dd13fa361b * Misc. formatting cleanup for the previous patch
* Added the new AppDomainLoading variable to the [XEngine] section in the example config
2009-10-29 05:56:37 -07:00
Dan Lake 33448e4ba8 Optimizations 2009-10-29 05:39:18 -07:00
Melanie 66923983a7 Add support for display of the script compilation errors in the script editor's
debug pane. This will still use DEBUG_CHANNEL currently, since it is not
fully implemented. This also removes the "Compiled successfully" message
that pops up in the viewer.
2009-10-17 22:36:44 +01:00
Justin Clark-Casey (justincc) f1f239758f Apply http://opensimulator.org/mantis/view.php?id=4066
If XEngine compile fails, show script name in error message in-world as well as the exception itself
Thanks Luca Peck
2009-10-09 17:43:25 +01:00
Jeff Ames ee205e7e81 Formatting cleanup. 2009-10-01 01:17:47 +09:00
Melanie 090868ff4a Change the return value if the compiler to "object" to allow compilers
to return dynamic method objects
2009-08-31 11:42:54 +01:00
Melanie 73b0cf492d Add some extra info to script load messages 2009-08-14 01:35:14 +01:00
Melanie eba23048ca Replace the Replaceable modules name 2009-08-10 23:08:22 +01:00
Melanie 4ee8d8a813 Another stab at cmickeyb's patch for script GC.
Moved the Close() for the appdomain-hosted parts into a new destructor
on ScriptInstance.
2009-08-07 20:43:23 +01:00
Melanie f8d8366bfa Revert the XEngine memleak patch, it causes premature GC.
This matches behavior seen with an earlier attempt to do this, apparently
the sponsor mechanism does't work in Mono
2009-08-07 03:04:06 +01:00
Melanie 91f6898b26 |From: James J Greensky <jame.j.greensky@intel.com>
|Date: Wed, 5 Aug 2009 09:51:52 -0700
|Subject: [PATCH] Closed two major memory leaks for scripted objects
|
|Two major memory leaks for the scripted objects were fixed
|- One leak had to do with remoting acrossing app domains.  When a script and
|  its controlling agent communicate across an application boundary, it calls
|  functions on a stub proxy object that then invokes the remote method on
|  the object in the other app domain. These stub objects (two for each script)
|  were setup to have infinate lifetimes and were never being garbage collected.
|- The second leak was the result of adding a scene object part instance method
|  to a scene event and never removing it.  This cause the event's delegate list
|  to maintain a link to that object which is then never freed as the scene event
|  object is never destroyed.

Patch applied, please direct feedback to me. Possible issue: Longtime idle
scripts like vendors may fail.
2009-08-06 22:03:20 +01:00
Melanie 17bdc45c5c Add plumbing for the SceneObjectDeleter to wait for the script engine to
allow final deletion of objects. Meant to support the attach(NULL_KEY) event,
2009-08-04 03:17:13 +01:00
Melanie Thielker 8ecfc9a717 Committing the interface change and the addition to the modules to get
the ball rolling on replacable modules. No user functionality yet
2009-07-10 20:17:13 +00:00
Dr Scofield 98ea70644a From: Alan Webb <alan_webb@us.ibm.com>
After noticing on several occasions that the thread counts
we see when running OpenSIm were bordering on the astronomical
I decided to seriously investigate.

After much poking I discovered that the problem is actually very
simple. The XEngine secition of the example ini says that the
timeout for an iden thread is in seconds, and an example value
of 60 is specified. In fact, this is actually resulting in a 60mS
idle timeout, which is not normally enough for a smart thread
to survive. I have added a multiplier to the XEngine constructor
so that the number now matches the published behavior.
2009-06-25 08:17:37 +00:00
Melanie Thielker 5139160ce4 Correct an error where the config file name was always considered to be a
local file. This caused llHttpRequest and llSetInventoryPermsMask to fail
on regions that load their config from a web server
2009-06-06 16:39:28 +00:00
Melanie Thielker 9f932a4205 Thank you, thomax, for a patch to provide finer-grained access control to
scripting.
Fixes Mantis #2862
2009-06-05 09:47:42 +00:00
Jeff Ames 840de6c036 Minor: Change OpenSim to OpenSimulator in older copyright headers and LICENSE.txt. 2009-06-01 06:37:14 +00:00
Justin Clarke Casey 9f6b8ec9b0 minor: Remove some mono compiler warnings. Uncomment code when it's actually being used. 2009-04-15 19:46:37 +00:00
Melanie Thielker 3c338e4e56 Convert both script engines to new region module format. Add proper unload
handling to XEngine. Add needed stubs to DotNetEngine.
2009-04-15 18:51:17 +00:00
Melanie Thielker f6f3737fe8 Fix a regression where animations would only be sent if the avatar has
attachments. Convert base types to LSL types for event marshalling through
IScriptModule to avoid parameter errors.
2009-04-12 02:42:05 +00:00
Melanie Thielker 217b2d93ae Adding a script event, changed(CHANGED_ANIMATION)
This is sent to all root prims of all attachments of an avatar when the
animation state changes. llGetAnimation() can thenbe used to find the
new movement animation. This eliminates the need for fast timers in AOs
2009-04-11 16:51:27 +00:00
Melanie Thielker a7de0ae9ec Make the scrpt engines ignore any script that begins with //MRM: 2009-04-10 21:44:27 +00:00
Melanie Thielker 8902923b12 Introduce IXmlRpcRouter, an interface that allows registering XMLRPC
UUIDs with a central marshaller for grids, or publish the ULS for objects
elsewhere.
2009-04-10 21:08:33 +00:00
Melanie Thielker 0377ddb5de Add events to IScriptEngine to notify scripting modules of the removal
of objects from the scene, and of scripts from objects. This facilitates
the development of modules that can register prims with externall servers
for inbound email and XMLRPC. Currently implemented in XEngine only.
Also applying cmickeyb's compiler locking patch, since it seems risk-free.
2009-04-10 19:07:41 +00:00
Melanie Thielker 706a2df516 Read the .map files in on sim startup. Also clean them up when an assembly
is deleted.
2009-03-26 15:06:20 +00:00
Melanie Thielker 8dfe8a0d1d Make the error messages passed to RegionReady more descriptive
Patch by antont, thank you.
Fixes Mantis #3338
2009-03-26 01:02:19 +00:00
Melanie Thielker b83ad8a97b Thank you, dslake, for a patch that fixes XEngine linemap handling.
Fixes Mantis #3321
2009-03-22 11:57:00 +00:00
Charles Krinke 08c76989a7 Mantis#3187. Thank you kindly, DoranZemlja for a patch that:
Adds a warning for an LSL construct that exploits a
popular list memory saving hack.
2009-02-23 02:43:51 +00:00
Jeff Ames 818af9d482 Refactor log4net logger handling in script engine. (#3148) 2009-02-22 01:26:18 +00:00
Melanie Thielker 0086f9bd92 Fix the windows sharing violations on script crossings 2009-02-18 22:32:25 +00:00
Dr Scofield 180be7de07 this is step 2 of 2 of the OpenSim.Region.Environment refactor.
NOTHING has been deleted or moved off to forge at this point.  what
has happened is that OpenSim.Region.Environment.Modules has been split
in two:

- OpenSim.Region.CoreModules: all those modules that are either
  directly or indirectly referenced from  other  OpenSim packages, or
  that provide functionality that the OpenSim developer community
  considers core functionality:

      CoreModules/Agent/AssetTransaction
      CoreModules/Agent/Capabilities
      CoreModules/Agent/TextureDownload
      CoreModules/Agent/TextureSender
      CoreModules/Agent/TextureSender/Tests
      CoreModules/Agent/Xfer
      CoreModules/Avatar/AvatarFactory
      CoreModules/Avatar/Chat/ChatModule
      CoreModules/Avatar/Combat
      CoreModules/Avatar/Currency/SampleMoney
      CoreModules/Avatar/Dialog
      CoreModules/Avatar/Friends
      CoreModules/Avatar/Gestures
      CoreModules/Avatar/Groups
      CoreModules/Avatar/InstantMessage
      CoreModules/Avatar/Inventory
      CoreModules/Avatar/Inventory/Archiver
      CoreModules/Avatar/Inventory/Transfer
      CoreModules/Avatar/Lure
      CoreModules/Avatar/ObjectCaps
      CoreModules/Avatar/Profiles
      CoreModules/Communications/Local
      CoreModules/Communications/REST
      CoreModules/Framework/EventQueue
      CoreModules/Framework/InterfaceCommander
      CoreModules/Hypergrid
      CoreModules/InterGrid
      CoreModules/Scripting/DynamicTexture
      CoreModules/Scripting/EMailModules
      CoreModules/Scripting/HttpRequest
      CoreModules/Scripting/LoadImageURL
      CoreModules/Scripting/VectorRender
      CoreModules/Scripting/WorldComm
      CoreModules/Scripting/XMLRPC
      CoreModules/World/Archiver
      CoreModules/World/Archiver/Tests
      CoreModules/World/Estate
      CoreModules/World/Land
      CoreModules/World/Permissions
      CoreModules/World/Serialiser
      CoreModules/World/Sound
      CoreModules/World/Sun
      CoreModules/World/Terrain
      CoreModules/World/Terrain/DefaultEffects
      CoreModules/World/Terrain/DefaultEffects/bin
      CoreModules/World/Terrain/DefaultEffects/bin/Debug
      CoreModules/World/Terrain/Effects
      CoreModules/World/Terrain/FileLoaders
      CoreModules/World/Terrain/FloodBrushes
      CoreModules/World/Terrain/PaintBrushes
      CoreModules/World/Terrain/Tests
      CoreModules/World/Vegetation
      CoreModules/World/Wind
      CoreModules/World/WorldMap

- OpenSim.Region.OptionalModules: all those modules that are not core
  modules:

      OptionalModules/Avatar/Chat/IRC-stuff
      OptionalModules/Avatar/Concierge
      OptionalModules/Avatar/Voice/AsterixVoice
      OptionalModules/Avatar/Voice/SIPVoice
      OptionalModules/ContentManagementSystem
      OptionalModules/Grid/Interregion
      OptionalModules/Python
      OptionalModules/SvnSerialiser
      OptionalModules/World/NPC
      OptionalModules/World/TreePopulator
2009-02-10 13:10:57 +00:00
Dr Scofield 9b66108081 This changeset is the step 1 of 2 in refactoring
OpenSim.Region.Environment into a "framework" part and a modules only
part. This first changeset refactors OpenSim.Region.Environment.Scenes,
OpenSim.Region.Environment.Interfaces, and OpenSim.Region.Interfaces
into OpenSim.Region.Framework.{Interfaces,Scenes} leaving only region
modules in OpenSim.Region.Environment.

The next step will be to move region modules up from
OpenSim.Region.Environment.Modules to OpenSim.Region.CoreModules and
then sort out which modules are really core modules and which should
move out to forge.

I've been very careful to NOT BREAK anything. i hope i've
succeeded. as this is the work of a whole week i hope i managed to
keep track with the applied patches of the last week --- could any of
you that did check in stuff have a look at whether it survived? thx!
2009-02-06 16:55:34 +00:00
Sean Dague efcf00ee60 From: Christopher Yeoh <yeohc@au1.ibm.com>
This patch fixes the problem where if an object containing a script is
deleted at the same time as an object containing the same script is
rezzed, it can result in the assembly file being deleted after the
second object script initialisation has found it but not started using
it yet, resulting in the script not starting up.
2009-02-05 16:12:51 +00:00
Jeff Ames 6126c687c1 Update svn properties, minor formatting cleanup. 2009-01-30 09:03:23 +00:00
Dr Scofield ce1e1854b1 From: Christopher Yeoh <yeohc@au1.ibm.com>
This changeset fixes a race condition where a script (XEngine run) can
startup before a reference is added to it in all of the required
places in the XEngine class. The effect of this is that a script can
sometimes on startup miss script events. For example a script which
starts up and initialises itself from a notecard may never receive the
dataserver event containing the notecard information.

The patch isn't as clean as I'd like - I've split the constructor of
ScriptInstance up so it does everything it did before except
call Startup and post events like state_entry and on_rez. An Init
function has been added which is called after the ScriptInstance
object has been added to the necessary data structures in XEngine.

Happy to rework it if someone suggests a better way of doing it.
2009-01-28 09:52:09 +00:00
Dr Scofield a3ac702941 From: Christopher Yeoh <yeohc@au1.ibm.com>
Adding Oarfileloaded and EmptyScriptCompileQueue event support which
allows (with a module) for programmatic notification of when a region
objects and scripts are up and running after a server start or
load-oar.
2009-01-28 09:22:12 +00:00
Teravus Ovares 8e01f75784 * Progressive texture patch + PriorityQueue put into the LLClient namespace.
* Updates LibOMV to r2362
2009-01-19 17:11:57 +00:00
Dahlia Trimble 630ce5b264 Revert progressive texture patch from r8001 until issues can be addressed 2009-01-10 09:15:23 +00:00
Dahlia Trimble 3bdd4db3fd Thanks jhurliman for a patch that implements progressive texture downloading - Mantis #2655 2009-01-10 01:46:47 +00:00
Melanie Thielker 81a4fe9db7 Insert a 15 seconds delay before the script engine starts loading scripts 2008-12-28 17:22:31 +00:00
idb 3fe966d6b3 An initial implementation of llMinEventDelay in XEngine.
Not implemented yet in DotNetEngine.
Fixes Mantis #2830
2008-12-21 19:04:06 +00:00
Teravus Ovares ca0de93d9a * Adding some locks to XEngine's m_PrimObjects which were prone to 'the collection was modified' 2008-12-17 15:30:26 +00:00
idb 84ba5dd962 Fix an ArgumentNullException when moving a DotNet scripted object to the next region 2008-12-06 14:55:18 +00:00
Justin Clarke Casey 915593bfbc * refactor: Rip out SOP inventory from the partial into a separate class
* SceneObjectPartInventory.cs isn't a particularly good name but it's probably not got a long life
* A proper inventory interface to follow
* Parallel changes for other inventory partial classes to follow at a later date
2008-11-21 21:16:42 +00:00
Melanie Thielker f518ca7feb Reapply r7369 r7367 r7366 r7370 r7381. This brings it back up to the new
libOMV.
2008-11-19 06:25:34 +00:00
Melanie Thielker 3234472d62 Reverting the texture sending patch and the new libOMV. This makes this
release a direct descendant of the stable 7364, with all the features and
none of the issues.
This omits the following patch chain: r7383 r7382 r7381 r7377 r7375 r7373
r7372 r7370 r7369 r7368 r7367 r7366
2008-11-19 06:15:21 +00:00
Justin Clarke Casey 93b18d7323 * Remove Appdomain code in XEngine.cs 2008-11-17 21:36:12 +00:00
Justin Clarke Casey c25a0ea792 * Update libOMV to r2359. This is necessary for the progressive texture patch
* Update libopenjpeg as well for this patch.
* Appears to be okay on a very short sniff test
* Source code will be placed in opensim-libs shortly
2008-11-17 21:00:34 +00:00
Melanie Thielker ca35b49b70 Make scripts in objects rezzed from script compile synchronously to close
a timing gap. Still not 100%, but getting there
2008-11-13 19:00:46 +00:00
Melanie Thielker 664e8a464e Script region crossing. This has not user functionality, but lays all the
groundwork.
2008-11-09 19:30:40 +00:00
Melanie Thielker 833f5e8bed Refactor IEventReceiver back into IScriptEngine 2008-11-08 02:24:34 +00:00
Justin Clarke Casey 9366a234cf * refactor: Convert most non SOP methods to use SOG.IsAttachment rather than SOP.IsAttachment 2008-11-01 22:04:35 +00:00
Teravus Ovares c26d0ebc19 * Added missing dependencies that was causing build to fail in windows. Mono doesn't seem to care. 2008-10-17 01:59:43 +00:00
Homer Horwitz ae9e38bf3f Fixed (mono-)script handling for SL viewer 1.21:
- Added two missing caps (UpdateScriptAgent, UpdateScriptTask)
- Added one missing EventQueue event (ScriptRunningReply)
- Changed DNE and XEngine to use this new event
As we only use the mono engine anyway, the "Mono" checkbox is set by
default but doesn't have any function.
2008-10-16 21:46:03 +00:00
Melanie Thielker 638cce09d1 Restore "friendly errors" to the XEngine 2008-10-07 21:59:56 +00:00
Melanie Thielker ab260b5d23 Fix: Mantis#2326: Fix: privilege escalation through attach from ground
Fix: objects being duplicated inventory on detach. Fix: Mad jumping around of
attachments while editing. Fix: Attachments being persisted to database on
login. Fix: Attachments being persisted when changed by a script like
invisprim refresh. Fix: Attachpoint set, but not reset correctly. Fix: prevent
spurious full updates while editing attachments. Several other fixes
2008-10-03 21:44:33 +00:00
Melanie Thielker c2308d8a7d Add explicit CultureInfo to the script compile thread in DotNetEngine to
ensure that scripts will compile on nonenglish systems
2008-09-28 20:29:56 +00:00
Melanie Thielker 85068dae60 Add friendly error messages to both engines. 2008-09-27 05:31:43 +00:00
Melanie Thielker b416422349 Kill "Compile successful" message when rezzing prims/wearing attachments
Changes behavior to send on_rez event to prims when rezzed from agent
inventory.
2008-09-26 20:18:31 +00:00
Melanie Thielker e5db6a75d0 Finishing the code cleanup in DNE, make llDie work again in DNE.
Add some compile messages from XEngine into DNE as well.
2008-09-26 17:59:36 +00:00
Melanie Thielker f926d917cb Fix script engine name parsing for DotNetEngine to make that actually work
Add a reference for Windows builds
2008-09-25 17:54:44 +00:00
Melanie Thielker f11107821e Add an extension to allow registering multiple interfaces of a type with
Scene. Make the script engines check that the engine name in the
//Engine:language comment is a valid engine and treat it as a normal
comment if it's not.
//DotNetEngine: needs to be written as //ScriptEngine.DotNetEngine: now, since
that is it's real internal name. //XEngine: still works
2008-09-25 17:26:32 +00:00
Melanie Thielker f3c8963c86 Convergence is almost complete. This brings the diff between the API to < 10k
and makes it use a common set of types in both engine. Fixes the issues with
running both engines and HTTP requests / listens / timers etc..
Also fixes a couple of minor Scene issues and a CTB by nullref.
2008-09-25 05:13:44 +00:00
Melanie Thielker fb7a29a5ef Rename lots of stuff in DNE to reduce source code differences in the
LSL implementation files. Rename lots of stuff in XEngine for the same
reason. Move methods between interfaces. Just refactor stuff.
2008-09-24 13:18:06 +00:00
Melanie Thielker 218902bedc Decouple AsyncCommands from XEngine and the script instance. Make
all methods needed outside the API ststic. Async command processing
is now wholly internal to the API. This sets the stage for the next
convergence step.
2008-09-24 02:58:05 +00:00
Melanie Thielker 70d264ee6c Update the permissions system to handle scripts and notecards the way
it was meant to. No functional changes, just better code
2008-09-23 03:36:16 +00:00
Melanie Thielker b8a39a4dde Remove the script engine identifier tag, so the compiler just sees
the language specifier. Makes language specifiers work again with
script engine specifiers.
2008-09-22 11:18:49 +00:00
Melanie Thielker 79ac01fb0c Prevent scripts from running under multiple engines at once 2008-09-22 02:11:40 +00:00
Melanie Thielker 1602ba6175 Allows to use the new script engine feature. Begin your script with
//XEngine: or //DotNetEnine: , optionally followed by a language
like //XEngine:lsl, and it will be run on the chosen engine.
2008-09-21 22:16:17 +00:00
Melanie Thielker 94aaf67dfa Change the scirpt engine loading mechanism. Script engines are now
ordinary region modules and are able to coexist in one instance.
See http://opensimulator.org/wiki/ScriptEngines for details. There were
changes to OpenSim.ini.example, please note DefaultScriptEngine.
Also see the User docs and FAQ on the Wiki. Default is DotNetEngine.
2008-09-21 21:47:00 +00:00
Melanie Thielker 85586bb7b2 Change XEngine startup to enable it to run as a normal region module
rather than a special one
2008-09-21 02:52:12 +00:00
Justin Clarke Casey fb5014cf5b * Duh, forgot I had undone some of the changes I meant to include in the previous commit 2008-09-19 19:07:20 +00:00
Justin Clarke Casey 4c7ddd2c71 * Remove one possible deadlock situation as seen today
* On script rez, XEngine was taking an m_scripts lock and then later on an m_parts lock when looking for a part by local id
* In the meantime, a scene object being deleted would take an m_parts lock and then later on try to take an m_scripts lock when it tried to trigger script removal
* There may be better ways to resolve this, but I believe that in general, we must always take an m_parts lock before an m_scripts lock
2008-09-19 18:50:19 +00:00
Melanie Thielker 7e8320bada Kan-Ed fix series. Fix llTakeControls to behave as documented.
XEngine fixes: prevent queue overruns, prevent spamming when no key
is down. Release controls when conflicting permissions are requested
or permissions are refused later. Release when prim or script are deleted.
Fixes Scene script instance deletion semantics.
2008-09-17 22:00:56 +00:00
Justin Clarke Casey 0b52453762 * Change XEngine default configuration values to match those in OpenSim.example.ini
* Particularly important for max threads since setting this to 2 was causing all events to wait behind the regularly sleeping maintenance event
2008-09-16 16:41:46 +00:00
Justin Clarke Casey 7f3bfa277b * minor: method documentation 2008-09-16 16:37:16 +00:00
Melanie Thielker fdb24c46ac Provide a GetApi method on the IScriptEngine to get a named API reference
This allows cross-api method calls on the implementation and also allows
"Meta APIs" that only provide common functionality to other APIs
2008-09-13 14:40:42 +00:00
Jeff Ames fae34bb10c Update svn properties, formatting cleanup. 2008-09-09 01:26:48 +00:00
Melanie Thielker 490ac0be00 Implement proper persistence of the following prim properties:
Floating text, Rotation, Texture animation, Particle System
This will make "Eye Candy" scripts work without modification in
XEngine. The use of the CHANGED_REGION_RESTART hack is no longer
needed. Implemented in MySQL only, hovertext also in SQLite.
2008-09-08 02:40:20 +00:00
Melanie Thielker 669f553400 Xengine patch to force a persistence save on script creation. This prevents
duplicate delivery of state_entry if a region is restarted just after
saving the script. Changes script state saves to no longer abort long-
running event handlers. Queues the save instead. Adds shutdown handler
to save script state on irderly shutdown
2008-09-07 22:01:25 +00:00
Teravus Ovares 7d89e12293 * This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point.  Regular people should let the dust settle.
* This has been tested to work with most basic functions. However..   make sure you back up 'everything' before using this.  It's that big!  
* Essentially we're back at square 1 in the testing phase..  so lets identify things that broke.
2008-09-06 07:52:41 +00:00
Dr Scofield 109aa00150 fix: PostInitialise() not being called on script engines (nasty one that)
cleanup: warnings, readability
2008-09-02 12:07:23 +00:00
Melanie Thielker 61978649ec Change some chat output functions so that text is truncated at
1000 chars to avoid the exception thrown by libomv at 1100 chars.
Change string->int conversion so it copes with non-numeric chars
after the number and no longer uses a float to parse the value.
2008-09-02 03:43:18 +00:00
Melanie Thielker bf4d1fbb8d Refactor IScriptInstance / IScriptEngine to use a generic IScriptWorkItem,
which is a thin wrapper around a IWorkItemResult from the SmartThreadPool.
However, it is very easy to reimplement on top of basic threading and therefore
makes the IScriptInstance class independent of the specific threading
implementation.
2008-08-28 00:37:22 +00:00
Melanie Thielker 5525a3ecb4 Thank you, salahazar, for a patch that corrects the behavior of
llDetectedLink(). Also a small refactor to remove an interface member
from IScriptEngine.
2008-08-27 22:53:58 +00:00
Melanie Thielker 6e3367d68c Refactor XScriptInstance to IScriptInstance and move into Shared/. Now
engines that want to use the XEngine's instance handling and state
persistence can do so. IScriptInstance is optional, but it does
require the SmartThreadPool if it is used.
2008-08-27 22:38:36 +00:00
Melanie Thielker a2985b5655 Refactor Executor into the script app domain and IScript. This changes
an implicit reference into a proxied one and further reduces memory
consumption of XEngine
2008-08-27 21:36:03 +00:00
Jeff Ames 6ef9d4da90 Formatting cleanup. 2008-08-18 00:39:10 +00:00
lbsa71 8e869b2fff * Changed a number of field names to ccc (public members shouldn't be called m_) 2008-07-26 21:22:15 +00:00
Jeff Ames 80d8e2889e Update svn properties. Formatting cleanup. Remove a compiler warning. 2008-07-23 13:24:25 +00:00
Melanie Thielker 746c6fb1a2 Patch #9141 (Mantis #1655)
Untangles llDie handling in XEngine, which resulted in a thread being
aborted while executing inside of Scene.
2008-07-12 00:06:45 +00:00
Charles Krinke 01904e66f2 Mantis#1690. Thank you kindly, Melanie for a patch that:
esets script permissions when a script is recompiled.
2008-07-08 15:16:43 +00:00
Jeff Ames d470d30c09 Copyright notices and formatting cleanup. 2008-07-06 14:02:22 +00:00
Dr Scofield 2dadbc2f70 mini-warnings-safari, plus cleanup of IUserServices method naming. 2008-07-04 10:19:58 +00:00
Charles Krinke ce5122ebf3 Mantis#1659. Thank you, Melanie for a patch that:
In LSL, the state command should have an immediate effect. 
The OpenSim script engine seems to wait until the function 
ends to process the state transition.
2008-07-04 00:59:38 +00:00
Charles Krinke 7580fa5c0a Mantis#1648. Thank you, Melanie for a patch that:
Fix a script Xengine deadlock/hang if llResetScript is used in changed()
2008-07-02 13:31:39 +00:00
Charles Krinke 0aaf0c4565 Mantis#1640. Thank you, Chernega for a patch that addresses:
It would appear that calling llResetScript() in state_entry() causes deadlock of region. 
Probably due to llResetScript calling state_entry again. llResetScript should see who called it, 
and not recall state_entry() after a state/variable reset. Once this script is in a prim, 
the region/world/debug/script window shows it consuming the server (from 2,400 to 800,000 milliseconds).
2008-07-01 13:42:47 +00:00
Dr Scofield 313f7f60fd properly explaining each #pragma warning disable
massaging OSHttpRequestPump to not abort on exceptions...
2008-06-30 11:57:47 +00:00
Charles Krinke 590df180a4 Manti#1624. Thank you, Melanie for a patch that:
Sets XEngine threads to en-US culture before calling script events, 
fixes i18n issues with european locales.
2008-06-28 17:47:06 +00:00
Charles Krinke 9a0ef22ed9 Mantis#1616. Applied Melanie's patch. This may or may
not break trunk.
2008-06-28 16:08:12 +00:00
Teravus Ovares ec7110f2cf * Melanie adds the event manager back to the XEngine so all yr events are hers, I mean, fire. 2008-06-28 03:45:52 +00:00
Dr Scofield 748f72326d last round of warning squashing. calling it a day now. 2008-06-27 23:03:39 +00:00
Charles Krinke 6d5d911f3f Mantis#1600. Thank you, Melanie for a patch that:
Fixes persistence of variable values to address
broken persistence in the big refactor.
2008-06-26 13:49:11 +00:00