Don't click here unless you want to be banned.

LSL Wiki : StackHeapCollision

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are

Stack Heap Collision

This error occurs when the script runs out of memory (the stack and heap pointers, which count from opposite directions, meet in the middle, thus the name "stack/heap collision"). To avoid this, check the available memory before doing any memory-intensive calls (particularly those involving lists) using llGetFreeMemory.

Remember that llGetFreeMemory will not return the current available memory but, rather, the historic free memory--the lowest amount of free memory that the script has ever had while running. This could cause a situation where the script has several kilobytes of memory free, but "thinks" it only has a few bytes available. Other than to suggest that the script is redesigned in such a way that this can't happen, there isn't a workaround for this situation.

LSL scripts are each currently allocated 16KB of memory, in which the compiled script's bytecode and the above-mentioned stack and heap are stored.

Errors | Memory
Comments [Hide comments/form]
If you want to listen for this message to display an error or take some other action to notify the owner/creator when this happens there are several problems.

Stack-Heap Collision is spoken on channel 0, and we all know how potentially lagtastic that is
Stack-Heap Collision is spoken with they key NULL_KEY so other than object name there's no way to differentiate where the error actually came from other than object name, and we all know how easy that is to spoof.
-- DragonEccleston (2006-08-19 09:42:40)
Attach a comment to this page: