Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007658opensim[REGION] Script Functionspublic2015-07-29 20:462015-07-30 08:03
ReporterRobert Adams 
Assigned To 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target Versionmaster (dev code)Fixed in Version 
Summary0007658: Add ossl function osReCompile to rebuild scripts
Description[17:08] Lani Global: (Saved Thu Jul 23 16:46:33 2015)hi Robert... we need an ossl function "osReCompile" where a script could issue a command that would cause the script to be recompiled. So often, over the past 5 years that I've been working in opensim, it has been necessary to recompile scripts to cure bugs.
[17:08] Lani Global: (Saved Thu Jul 23 16:47:49 2015)for example, we currently have a bug that requires a recompile after each region restart for collision events to work.
[17:08] Lani Global: (Saved Thu Jul 23 16:48:04 2015)that is just one of many
[17:08] Lani Global: (Saved Thu Jul 23 16:48:32 2015)llReset isn't enoug
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script Engine
Mono VersionNone
Attached Files

- Relationships

-  Notes
nebadon (administrator)
2015-07-29 22:28

isn't this just kind of a bandaid to mask the real issues though?
Seth Nygard (reporter)
2015-07-30 04:42

There is already a setting that forces all scripts to be recompiled when a sim starts up.

   DeleteScriptsOnStartup = true

I really don't think a function that forces a single script to be recompiled is a great solution. If one script has problems due to script states I would expect others to as well.
Mata Hari (reporter)
2015-07-30 06:56

@Seth the problem with using DeleteScripsOnStartup=true is that many region may contain content where preserving script state is important so those users would need to be able to selectively recompile only those that don't require preserving script state (even though at present preserving script state is broken see 0007558)

I'm not sure how you'd be able to implement a osRecompileScript() though because presumably the script that needs to be recompiled can't be the one calling it (otherwise it wouldn't need to be recompiled in the first place) so it would have to be some other script executing the command and somehow targeting a different script -- some sort of remote pin thing?

One issue I've had that's related to this is there being no easy way to recompile a script inside an object that's in another object's have to pull it out of inventory, wear/rez it, recompile it, delete the original, and put the recompiled one back in. For a case like that, a osRecompileAllScripts() that triggered a recompile of those would be really useful since this issue crops up a lot when objects are sent via HG.
kcozens (administrator)
2015-07-30 08:03

I looked at the code in OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs related to this setting. It only deletes files whose names end in _compiled or _source. It does not remove the script state files.

If you update the version of Open Simulator you are using it is good practice to delete the old compiled script files as part of the update process. If restarting a region without any change to the code running a region is requiring a code re-compile to get collisions working again there is a problem that needs fixing. If this problem is frequent enough you may be in a good position to help track down the problem. Alternatively, provide the script that is not working right after a restart and see if someone else sees the same issue and can track down the cause.

- Issue History
Date Modified Username Field Change
2015-07-29 20:46 Robert Adams New Issue
2015-07-29 22:28 nebadon Note Added: 0029020
2015-07-30 04:42 Seth Nygard Note Added: 0029023
2015-07-30 06:56 Mata Hari Note Added: 0029025
2015-07-30 08:03 kcozens Note Added: 0029028

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker