osgrid.org
https://forums.osgrid.org/

Script exection gets terminated
https://forums.osgrid.org/viewtopic.php?f=5&t=6151
Page 1 of 1

Author:  Agent Ronin [ Tue Jun 05, 2018 12:49 pm ]
Post subject:  Script exection gets terminated

I am running a script in a region I own, has not other avatars present, and has only 3 other scripts running. The script is for an HUD I am developing. At this time it is being used to process some data to used in the HUD's menu system. The result of the process will be used by the script, but this processing itself will not be part of the HUD scripts.

On repeated script executions I find that the script quits running sometime between 30 and 40 seconds, when it is about half done. The place in the process where it quits varies, and it quits in iteration loops that execute successfully many times, which suggest it is not a bug in the script. It looks to my like something is terminating execution. Is there a time limit on how long a script can run, after which it is forcibly terminated? If so there a region setting that can increase this time?

The functions llGetFreeMemory(), llGetUsedMemory( ) are not yet implemented in Osgrid. Is there another way to get this information?

Author:  Roken Price [ Tue Jun 05, 2018 4:37 pm ]
Post subject:  Re: Script exection gets terminated

You will probably get more meaningful replies by posting the scripts (or at least, sample scripts exhibiting the same behaviour). None of us psychic here.

Author:  Total Sorbet [ Wed Jun 06, 2018 7:16 pm ]
Post subject:  Re: Script exection gets terminated

Although ive not seen your script the duration of 30 to 40 seconds you speak of sounds suspiciously of the event limit setting in opensim.ini. By default an event (touch() listen() state_entry() etc) in lsl has a maximum execution time of 30 seconds. If you exceed this your script will simply stop and will do so silently. This is by design and is intended to stop a rogue script hogging sim resources. Although you could increase this setting in opensim.ini, a better solution would be to use a timer() and rework your code to execute via timer in chunks that are less than 30secs. Having said that, you can find the setting here:


[XEngine]

;# {EventLimit} {} {Amount of time a script can spend in an event handler} {}
;; Time a script can spend in an event handler before it is interrupted
EventLimit = 30

Author:  Total Sorbet [ Wed Jun 06, 2018 7:21 pm ]
Post subject:  Re: Script exection gets terminated

Wanted to add since this is a hud you are making and that huds can travel to different sims via the avatar it would probably be best to assume the sim the hud is operating on will only have the default 30s to work with so is prob best to rework your code and use that timer()

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/