Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetNextEmail() Script run-time / Bounds Check Error

Rathe Underthorn
Registered User
Join date: 14 May 2003
Posts: 383
02-10-2005 03:51
There is a NASTY bug with llGetNextEmail() that causes a Bounds Check Error.

If you use the email() event as instructed on a timer, and then call llGetNextEmail() at the end of the event if there are pending emails while at the same time crossing sims the email() event is then trigged on the new sim but the memory address to the email() event variables are no longer valid. The script then immediately explodes when you try to access any of the email() event variables such as, address, message, etc.

Luckily enough there is the Bounds Checker Error in place that kills the script, otherwise one would suspect this could make the server exploitable.

It is VERY frustrating though and has held up a script Francis and I have been developing for over 4 months now! PLEASE FIX IT!
Derek Jones
SL's Second Oldest Monkey
Join date: 18 Mar 2003
Posts: 668
02-10-2005 07:16
From: Rathe Underthorn
There is a NASTY bug with llGetNextEmail() that causes a Bounds Check Error.

If you use the email() event as instructed on a timer, and then call llGetNextEmail() at the end of the event if there are pending emails while at the same time crossing sims the email() event is then trigged on the new sim but the memory address to the email() event variables are no longer valid. The script then immediately explodes when you try to access any of the email() event variables such as, address, message, etc.

Luckily enough there is the Bounds Checker Error in place that kills the script, otherwise one would suspect this could make the server exploitable.

It is VERY frustrating though and has held up a script Francis and I have been developing for over 4 months now! PLEASE FIX IT!


I have a script in one of my vehicles that sends and recieves email. I've been running the scripts for several months and I can't say I've seen this error. It's probably likely I will see this error eventually so I agree they should fix it.
_____________________
The fact that a believer is happier than a skeptic is no more to the point than the fact than a drunken man is happier than a sober one
Rathe Underthorn
Registered User
Join date: 14 May 2003
Posts: 383
02-10-2005 10:32
This bug had plagued our script for months and we could not find the source of it forever. I initially had assumed it had to be a local function returning incorrectly but I went through the few functions we had in this script over and over and over and they all return nothing but booleans (as integer) in all possible execution paths. So after lots and lots of debugging I was able to pinpoint the crash to exactly to the first line where any variable from email() is referenced, but this only seems to happen as some sort of race condition when crossing sims. Otherwise the email contents are always the same and not corrupt themselves. It unfortunately affects our script a LOT due to the nature of it.
Tread Whiplash
Crazy Crafter
Join date: 25 Dec 2004
Posts: 291
WEIRD bounds-check error...
02-10-2005 10:42
Yes! I have this same issue!

Except: I'm not using Email stuffs; only llListen() calls!

However, I do get the crash on the first instance in which the "message" string parameter is accessed.

Freaky and inconsistent, too! For some reason, I get it more frequently when there's a lot of rezzing & script interaction going on with my objects.... But there seem to be no hard-and-fast rules or guarantees. Sometimes it works, sometimes it doesn't. Frustrating as hell!

Have filed bug reports; haven't heard anything back... :(

Take care,

--Noel "HB" Wade
(Tread Whiplash)
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
02-10-2005 11:50
This doesn't totaly supprise me. If the object is mod you could try using llRemoteLoadScriptPin to overwrite the crashed instance of the script.

Or you could have 20 instances of the *exact* same script (same guid) then when the first one crashes it *might* not take out the others.
_____________________
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
Rathe Underthorn
Registered User
Join date: 14 May 2003
Posts: 383
02-10-2005 12:35
From: Tread Whiplash
Yes! I have this same issue!

Except: I'm not using Email stuffs; only llListen() calls!

However, I do get the crash on the first instance in which the "message" string parameter is accessed.

Freaky and inconsistent, too! For some reason, I get it more frequently when there's a lot of rezzing & script interaction going on with my objects.... But there seem to be no hard-and-fast rules or guarantees. Sometimes it works, sometimes it doesn't. Frustrating as hell!

Have filed bug reports; haven't heard anything back... :(

Take care,

--Noel "HB" Wade
(Tread Whiplash)


Yes!! It was VERY hard to reproduce, I'm assuming because it is something of a race condition. Yet it would ALWAYS pop up when you weren't looking and of course not when you were. Its taken months to debug this and still no way to fix it other than resetting the script. This is an unacceptable solution, Lindens PLEASE fix this!
Rathe Underthorn
Registered User
Join date: 14 May 2003
Posts: 383
02-10-2005 12:40
I'm going to take a wild guess here and say that this bug probably affects ALL event()'s when a script is handed off to another sim while actively processing an event. Sounds like a thread/race condition on the server side which could lead to an array of other problems.
Rathe Underthorn
Registered User
Join date: 14 May 2003
Posts: 383
02-10-2005 12:51
This is particularly critical and should be addressed because it not only affects a small niche of moving scripts but also could affect any attachment using scripts because they too cross sims when attached to an avatar. This is bad for anyone distributing products that users are unable to reset or fix themselves when they die from a bounds check error and may be the source of many objects unexplainably dying.
Dan Linden
Linden Lab Employee
Join date: 31 Dec 1969
Posts: 66
02-14-2005 10:55
If you have any simple repro case for this bug, please post it.

Dan
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
02-15-2005 06:06
From: Rathe Underthorn
I'm going to take a wild guess here and say that this bug probably affects ALL event()'s when a script is handed off to another sim while actively processing an event. Sounds like a thread/race condition on the server side which could lead to an array of other problems.


Probably the event queue is getting corrupted.
_____________________
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