Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script run-time error?

Raiden Karuna
Registered User
Join date: 1 Sep 2004
Posts: 65
10-10-2004 23:47
hey I got a object thats worked fine until now.. I got these errors after a function ran..

Object:Script run-time error
Object:Stack-Heap Collision

then the object stopped responding and I had to re-rez it. Any ideas why or what causes this??? is it something in my script or a SL problem?
Driftwood Nomad
Registered User
Join date: 10 May 2003
Posts: 451
10-11-2004 00:04
The short answer is that the script ran out of memory. Try splitting the script into two or more seperate scripts and all should be ok.

Scripts have a 16k limit, and if your script gets too big, it will crash. There are more detailed answers about stack/heap collisions and what it actually means, but I'll let someone else explain it as I don't fully know all the details myself :)
_____________________
Driftwood Nomad
D&D Dogs Co-founder

"Second Life’s first AI companion animal"
The Second Opinion, 08/05/2003

D&D Dogs HQ Pawaii (127, 63)
Mainland Store Kuula (214, 124)

http://www.sldogs.com

SL Dogs Zazzle store!
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-11-2004 00:40
try the wiki

StackHeapCollision
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
10-11-2004 06:24
Raiden,

Without seeing the script, and assuming it ran fine for a while, I'd bet that what happened is related to a list of some sort that builds. The script will continue to run and possibly this list is also building to the point where it is reaching the limits of your memory.

In the host there are two pointers to your allotted memory (16k).

One pointer is your stack, the other is the heap. Think of one as where your program resides, and the other the pointer to your saved variables. Now picture them at opposite ends of a football field. The two pointers start from opposite ends of this field. As your program builds the list the one pointer charges down the field till it collides with the other pointer. If they try to store bytes on the other end of the field, that will corrupt that area and cause the error.
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts