Justin Clark-Casey (justincc)
038d1bf742
Add a regression test to compile and start a script. Remove Path.GetDirectoryName when getting assembly loading path in Compiler.CompileFromDotNetText().
...
The Path.GetDirectoryName call in Compiler.CompileFromDotNetText is unnecessary since AppDomain.CurrentDomain.BaseDirectory is always a directory.
Later path concatenation is already done by Path.Combine() which handles any trailing slash.
Removing Path.GetDirectoryName() will not affect the runtime but allows NUnit to work since it doesn't add a trailing slash to AppDomain.CurrentDomain.BaseDirectory.
2012-02-07 17:44:37 +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
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
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
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
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
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
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
Diva Canto
d8ee0cbe1c
First stab at cleaning up Caps. Compiles. Untested.
2011-04-30 09:24:15 -07: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
Jeff Ames
f1f0bc23f4
Formatting cleanup.
2010-09-12 13:43:49 -04:00
Justin Clark-Casey (justincc)
74e5fe5aa9
Remove various warnings and improve logging messages. No functional changes.
2010-08-23 22:24:23 +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
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
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
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
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
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
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
Jeff Ames
70d5b1c34c
Formatting cleanup. Add copyright headers.
2010-01-04 06:17:30 +09: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
33d5018e94
Remove an insterface member that was never used
2009-12-22 15:35:39 +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
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
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
Justin Clark-Casey (justincc)
55a0896918
minor: remove mono compiler warning
2009-11-27 19:28:26 +00:00