These forums are CLOSED. Please visit the new forums HERE
Script breaks after a while. |
|
|
RichardEric Collins
Registered User
Join date: 29 Aug 2007
Posts: 16
|
09-12-2007 01:55
I have a door script that lets it work as a linked object, it also copes with being linked into a link set that already has a copy of that door. Very annoying thing is that if I link two doors in a test shape they work for a bit then just fail altogether. Resetting the script makes no difference. How can from one reset they work then stop working then after a second reset still refuse to work! Its doing my head in. Anyone else had this?
|
|
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
|
09-12-2007 02:16
I've had scripts fail due to heap/stack colissions, but they always resumed working after another reset.
Maybe we can help you if you post the code... |
|
RichardEric Collins
Registered User
Join date: 29 Aug 2007
Posts: 16
|
09-12-2007 02:59
What do you mean by 'heap/stack' collisions?
|
|
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
|
09-12-2007 03:56
Imagine the memory of an SL script (16 k):
[################################################] The heap is where your code is stored, and it's located at the start of the memory block. The stack is where variables are stored and it's located at the end of the memory block: [HEAPHEAPHEAP.............................................STACKSTACKSTACKSTACKSTACK] When you're running out of memory, the end of the heap and the beginning of the stack collide: [HEAPHEAPHEAPSTACKSTACKSTACKSTACKSTACKSTACKSTACKSTACKSTACKSTA] It's a common error to get when you're using too much memory. However, resetting the script will clear the stack and should make your script work again (for a while at least, till the stack fills up again). In your case a reset doesn't make it working again, so I assume it's a different problem. |
|
RichardEric Collins
Registered User
Join date: 29 Aug 2007
Posts: 16
|
09-12-2007 04:27
How can I test for this? I don't think its the problem as when the object is the root it works fine.
|
|
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
|
09-12-2007 11:16
I don't think it's the problem either.
If a script runs into a stack/heap colission, it'll say so on open chat. If you're near you'll see it. |
|
Ravanne Sullivan
Pole Dancer Extraordinair
Join date: 10 Dec 2005
Posts: 674
|
09-12-2007 11:40
Sometimes if a script fails it will set itself as not running. Resetting the script will not set the script to running again, you have to open it and check the running checkbox.
_____________________
Ravanne's Dance Poles and Animations
Available at my Superstore and Showroom on Insula de Somni http://slurl.com/secondlife/Insula de Somni/94/194/27/ |
|
RichardEric Collins
Registered User
Join date: 29 Aug 2007
Posts: 16
|
09-15-2007 11:42
Thanks for the tip, I'll try that. (now that i'm back from my conference and have time, hate it when work gets in the way of play)
![]() |
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
09-15-2007 12:12
How big is the linked object? I've had problems with opening windows when the house is too big. They link, but the ones furthest from center might not raise, because moving them that far would cause them to violate the rules for distance in a link set.
This shouldn't happen in a small object, but could in a 20x20 house. |
|
RichardEric Collins
Registered User
Join date: 29 Aug 2007
Posts: 16
|
09-15-2007 12:18
I think I've just fixed it. It was the touch message going wrong, not sure what was going on but filling in the other two touch messages with stub funcs and calling llPassTouches(FALSE);
seems to have fixed the problem. Thanks guys for your help. ![]() |
|
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
|
09-16-2007 07:54
next time... post the code
![]() |