Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llDie(); causing the sim to crash.

Jonn Soothsayer
Registered User
Join date: 21 Oct 2005
Posts: 8
04-28-2006 20:37
I was working on making a teleporter and found that if i dont use an llUnSit(llAvitarOnSitTarget()); before using llDie();, whatever sim im in will crash after around 5 teleports.

the only explaination i have for this bug is that the asset server might not be removing the item correctly from the database because of the avitar being on it. im sure there are other possible reasons but thats the only one i could think of that the lindin's could fix.

while my scripts are fixed now and no longer cause a crash, i felt it best to inform the lindins of this bug.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
04-28-2006 22:22
I haven't been able to reproduce this. Can you post the script you're using?
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-28-2006 22:31
Historically, there have been problems relating to llSitTarget and sims crashing, especially with one of the older "link sets greater than 30m" bugs.

If you are able to reproduce the bug, please send it off to Kelly or Vektor Linden. Alternately, you can try the bearaucracy of "Report Bug." ;)
_____________________
---
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
04-29-2006 01:03
I've only seen this bug in the past when the distance was over 512 meters (conviniently the max is 519). I haven't gone looking for it recently. Think it was during 1.4 *sigh* A time when there were enough ways to crash a sim you could spend weeks discovering them all (which I did).
_____________________
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
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
04-29-2006 02:38
It isn't quite the same, but may or may not be related. A few weeks ago I was sat down and went to change clothes. As expected I got thrown out of me seat. Unexpectedly the sim also crashed. Of course it might not have been me but...

The asset server was suddenly interacting with a sat av and unsitting was part of the process... so just maybe.

It's entirely NOT my expectation of normal behaviour (although I also usually stand up before changing clothes if I'm thinking straight) but it could be an occasional glitch that's not related directly to script. That said I'd *still* unsit them first, it seems like far better practise than hammering the asset server to save one line of code.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
04-29-2006 09:01
For what it's worth, I don't think llDie() necessarily results in any kind of interaction with the asset server.
Jonn Soothsayer
Registered User
Join date: 21 Oct 2005
Posts: 8
04-29-2006 16:39
well my original theory was that when it called die the object wasnt being deleted from the asset server correctly or from the sim .... but after thinking it over i wasnt so sure .... anyway here's the code i was using as requested:

(sorry used my first version of the code when i posted instead of the one i ended up crashing sims with)

my main script:
CODE
vector Pos;
float Timeout = 60;
integer Ready = FALSE;
integer Sitting = FALSE;
default
{
timer()
{
if(Sitting == FALSE && Ready == FALSE)
llDie();
}
state_entry()
{
llSetTimerEvent(Timeout);
llSetSitText("Teleport");
llListen(88, "", "", "");
llSitTarget(<0,0,-0.3>, <0,0,0,1>);
llParticleSystem([PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK|PSYS_PART_INTERP_COLOR_MASK,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE,
PSYS_PART_MAX_AGE, 2.25,
PSYS_PART_START_COLOR, <0,0.5,1>,
PSYS_PART_END_COLOR, <0,0.5,1>,
PSYS_PART_START_ALPHA, 1.0,
PSYS_PART_END_ALPHA, 0.0,
PSYS_PART_START_SCALE, <0.2, 0.2, 0>,
PSYS_SRC_BURST_RADIUS, 1.25,
PSYS_SRC_ANGLE_BEGIN, PI - PI/6,
PSYS_SRC_ANGLE_END, PI - PI/6,
PSYS_SRC_BURST_PART_COUNT, 2,
PSYS_SRC_BURST_SPEED_MIN, 0.0,
PSYS_SRC_BURST_SPEED_MAX, 0.0,
PSYS_SRC_OMEGA, <0,0,1>,
PSYS_SRC_BURST_RATE, 0.01,
PSYS_SRC_ACCEL, <0,0,1>]);
}
on_rez(integer P)
{
llResetScript();
}
listen(integer channel, string name, key id, string str)
{
if(llToLower(str)=="die")
{
llDie();
}
Pos = (vector)str;
if(Sitting==TRUE)
{
llSetTimerEvent(0.0);
llParticleSystem([]);
llMessageLinked(LINK_SET, 10, (string)Pos, "");
} else {
Ready = TRUE;
llSay(0, "Sit on the beam to teleport");
}
}
changed(integer p)
{
if(p & CHANGED_LINK) //someone sat on it.
{
if(llAvatarOnSitTarget()!=NULL_KEY)
{
if(llGetPermissions()&PERMISSION_TRIGGER_ANIMATION && llGetPermissionsKey()==llAvatarOnSitTarget()) {
llStopAnimation("sit");
llStartAnimation("stand");
} else {
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);
}
} else {
Sitting = FALSE;
if(llGetPermissionsKey()!=NULL_KEY)
{
llStopAnimation("stand");
}
}
if(Ready==TRUE)
{
llSetTimerEvent(0.0);
llParticleSystem([]);
llMessageLinked(LINK_SET, 10, (string)Pos, "");
} else
Sitting = TRUE;
}
}
run_time_permissions(integer P)
{
if(P & PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("sit");
llStartAnimation("stand");
}
}
link_message(integer sender, integer num, string str, key id)
{
if(num==0 && str=="Die")
llDie();
}
}

simply adding in "llUnSit(llAvatarOnSitTarget());" above llDie() solved the crash problem here so i know it has something to do with an avitar being on the object on it's death.


i also had two mover scripts, one with and one without the llMessageLinked:
CODE
default
{
link_message(integer sender, integer num, string str, key id)
{
if(num==10)
{
vector P = (vector)str;
while(llGetPos()!=P)
llSetPos(P);
llSleep(0.2);
llMessageLinked(LINK_SET, 0, "Die", "");
}
}
}
And the Second:
CODE
default
{
link_message(integer sender, integer num, string str, key id)
{
if(num==10)
{
llSleep(0.1);
vector P = (vector)str;
while(llGetPos()!=P)
llSetPos(P);
}
}
}



Almost forgot to add aslo that in order for it to crash i had to teleport between 5 and 8 times. just say /88 then a vector to set it to teleport heh like "/88 <200,200,30>"