Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Exception Traps

si Money
The nice demon.
Join date: 21 May 2003
Posts: 477
01-04-2004 20:50
LindenLabs,
Would it be possible for you to implement an exception trap system for LSL? We could very much use this feature. There are many scripts out there which are very close to the memory limits, and could run into unforseen problems. It would be very nice if we could handle the event in such a way as to gracefully shut down something as it encounters a stack-heap collision.
_____________________
Like a soul without a mind
In a body without a heart
I'm missing every part

-- Progress --
Catherine Omega: Yes, but lots of stuff isn't listed. "Making UI harder to use than ever" and "removing all the necessary status icons" things.... there's nothing like that in the release notes. :)
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
01-04-2004 21:41
I am sorry Si, but I tack this onto every similar request: Can we get llGetFreeMemory() fixed? It is broken right now.

It reports free memory as
Total_Space - (Stack_space + Heap_Space)

That works if the total space is only used for stack and heap. However the total space in LSL (16k) also houses the byte code of the script. For small scripts the discrepency is small (less than 1k), for large scripts the discrepancy can be more than 6k. The correct formula should be
Total_space - (Stack_space + Heap_space + Bytecode_space)

(Stack,Heap and Bytecode _space variables represent the used amount of memory for each).

And I too would like some exception handling. :)
_____________________
--
010000010110110101100001001000000100111101101101011001010110011101100001
--
Kex Godel
Master Slacker
Join date: 14 Nov 2003
Posts: 869
01-05-2004 07:18
I was wondering why I was getting Stack-Heap collision errors immediately after noting I had 8k free.

We need more storage somehow. If not more memory, we need the ability to swap data out to notecards. I can't write anything which is dependent upon persistent storage becuase of all of the possible run-time errors, which grow more and more likely as my script grows more complex.

I've got at least 2-3 very nice scripts that I cant't finish because of a lack of persistent storage and a lack of error trapping.

I don't want to sell objects that just DROP data into the bit abyss when something goes wrong, causing the people who buy objects from me to potentially lose all of thier customizations.