Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

What causes scripts to go into a non-running state?

Jigsaw Partridge
A man of parts
Join date: 3 Apr 2005
Posts: 69
04-03-2006 03:51
Does anyone have (or could anyone point me to) a handy list of the events/scenarios which will cause all of the scripts (in all of the prims) in an object to go into a non-running state?
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
04-03-2006 06:22
From: Jigsaw Partridge
Does anyone have (or could anyone point me to) a handy list of the events/scenarios which will cause all of the scripts (in all of the prims) in an object to go into a non-running state?


As far as I'm aware there's only:

a) the object moved into no-script land,
b) the user stopped scripts with the tools menu,
c) the object got deleted :)

Other things that stop scripts do so only one at a time - I think.
Jigsaw Partridge
A man of parts
Join date: 3 Apr 2005
Posts: 69
04-03-2006 08:18
Thanks Yumi, possibly your scenario (a) is what is causing my problem. I got the impression from other forum posts that entering a no-script area would just 'suspend' running scripts, I will try and test this to see exactly what does happen.
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
04-03-2006 09:23
d) the script was running its state_entry() event when the sim crashed
e) math error (division by zero, llAcos(2.0), etc...)
f) script ran out of memory
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Jigsaw Partridge
A man of parts
Join date: 3 Apr 2005
Posts: 69
04-03-2006 10:19
OK ty Jesrad, option (e) sounds a possibility as well, the scripts are doing a lot of vector and rotation calculations. Still a bit puzzled as to why all of them would stop running at the same time though. When I've seen script errors (stack/heap collision etc) actually happen in-world (with helpful accompanying error message) before, its usually only the single offending script that needs to be restarted.
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
04-03-2006 11:27
I've had trouble with llSetScale being used in child prims - IIRC it can randomly freeze the entire linkset.
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Jigsaw Partridge
A man of parts
Join date: 3 Apr 2005
Posts: 69
04-03-2006 11:42
I'm not using llSetScale(), but I am using llSetPrimitiveParams() extensively in child prims to adjust position and rotation. The problem also only seems to occur in objects which have physics enabled, although this may be something of a red herring.
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
04-03-2006 11:49
I've not had any freezing trouble with llSetPrimitiveParams altering position and rotations on non-physics-enabled prims, I guess it could be the physics.

Another thing that sends a script to not running: giving it to another prim using llGiveInventory.
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Zuleica Sartre
Registered User
Join date: 27 Sep 2005
Posts: 105
04-03-2006 18:49
If you place a script that did not compile into an object it will go into a not-running state.

Similarly if you edit a script already in an object and the compile fails and you then close it it will go into a not-running state.
Jigsaw Partridge
A man of parts
Join date: 3 Apr 2005
Posts: 69
04-04-2006 10:21
Thanks to all who suggested possible causes, I have investigated further by placing my physics-enabled object in a deep pit (to stop it escaping) and letting it flail about for a few hours. It would seem that at some point 'something' happens which causes all the scripts to enter a non-running state, even those which weren't doing anything at the time. Click on 'set all scripts to running', and the object continues on happily, apparently none the worse for wear.

Problem transferred to 'pending' pile.
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
04-04-2006 10:33
I've had this happen to some animals. Sometimes when left to wander alone, I would find them "stuck", with the scripts in the root prim in no-run state :( Apparently this is caused by collisions, possibly during a sim crash.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Jigsaw Partridge
A man of parts
Join date: 3 Apr 2005
Posts: 69
04-04-2006 10:48
Yup, that sounds consistent with what I have been seeing, although I do not think there was any sim crash, it was just collisions which triggered it. Sigh, now I have to put some sort of black box recorder in my object to try and work out what type of collision causes this.
Fenrir Reitveld
Crazy? Don't mind if I do
Join date: 20 Apr 2005
Posts: 459
04-04-2006 20:33
From: Jesrad Seraph
I've had this happen to some animals. Sometimes when left to wander alone, I would find them "stuck", with the scripts in the root prim in no-run state :( Apparently this is caused by collisions, possibly during a sim crash.

I've seen this with my self-roaming objects. In fact, I sometimes find them with ALL SCRIPTS set to no-run, in every prim -- Root or child. Even the simple scripts that just control animations/visual effects and in no way do anything intense.

I've never actually observed one hard-crash or whatever it's doing to get it into that state though...

Exactly as Jigsaw describes...