Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Object unlink + llDie combo flaky

Accent Godel
Registered User
Join date: 1 May 2003
Posts: 7
05-29-2003 23:31
Repro:
1. Drop the first script into a cube, name that cube 'display'.
2. Make a second cube called 'aaa_lifetimeproxy' and drop the second script in that.
3. put a copy of 'aaa_lifetimeproxy in the inventory of 'display'.
4. Make any 2 prim object, name it 'Accent Sword' and drop it into the inventory of display.
5. touch the display repeatedly - the 'Accent sword' will appear and dissappear a couple of times (watch your cash).

Eventually the sword won't disapper - though your cash has been refunded. (and the aaa_liftimeproxy has died.)

Selecting the display will act as if the 'Accent sword' still exists and is still linked. You can even select individual pieces, change textures etc. even though those prims have been refunded. The only thing you cannot do is unlink successfully.

If you take the display object back into inventory then re-rez it, the 'Accent Sword' is gone.

CODE

integer bshow = TRUE;
default
{
state_entry()
{
llSetStatus(STATUS_PHYSICS,FALSE);
llRequestPermissions(llGetOwner(),PERMISSION_CHANGE_LINKS);
}
object_rez(key id)
{
llCreateLink(id,TRUE);
}
touch(integer ct)
{
llMessageLinked(LINK_ALL_CHILDREN,0,"Wrap it up",NULL_KEY);
llBreakLink(llGetLinkNumber());
if(bshow)
{
llRezObject("Accent Sword",<0,0,2.0>+llGetPos(),<0,0,0>,<0,0,0,1>,0);
llRezObject("aaa_lifetimeproxy",llGetPos(),<0,0,0>,<0,0,0,1>,0);
}
bshow = !bshow;
}
}

CODE

integer bDie;
default
{
state_entry()
{
bDie = FALSE;
llSetStatus(STATUS_PHYSICS,FALSE);
}
changed(integer ichanged)
{
if ((ichanged & CHANGED_LINK) && bDie)
{
llDie();
}
}
link_message(integer sender,integer num,string str,key id)
{
if (str = "Wrap it up")
{
bDie = TRUE;
}
}
}
Andrew Linden
Linden staff
Join date: 18 Nov 2002
Posts: 692
05-30-2003 11:38
We've been able to reproduce this. It turns out that the object that is not disappearing is actually being deleted on the server (hence the correct refund) but that information is somehow sometimes not getting transmitted to the client.

Such objects are called "ghost objects". One way to determine if an object is a "ghost" or not is that you cannot collide with it -- objects will pass right though it because it is not really there.

There are currently more than one way to get a "ghost" on the clients, however this recipie appears to be an easy one to reproduce. Thanks, it has been filed as a bug.
Accent Godel
Registered User
Join date: 1 May 2003
Posts: 7
06-15-2003 10:51
I was playing with this again to see if it might have been fixed. It hasn't :-)

However:
There is a further issue with ghost objects.

If the ghost object was part of an object that handled the money event, it will still accept payment. However that money just disappears, it doesn't go to the owner of the object.

Updated repro steps:
1. As above, create ghost object.
2. Left click on ghost object select "Pay..."
3. Pay 1L. The money will be deducted from the payee, but not added to another account.

Here's the updated script:

CODE

integer bshow = TRUE;
default
{
state_entry()
{
llSetStatus(STATUS_PHYSICS,FALSE);
llRequestPermissions(llGetOwner(),PERMISSION_CHANG
E_LINKS);
}
object_rez(key id)
{
llCreateLink(id,TRUE);
}
touch(integer ct)
{
llMessageLinked(LINK_ALL_CHILDREN,0,"Wrap it up",NULL_KEY);
llBreakLink(llGetLinkNumber());
if(bshow)
{
llRezObject("Accent Sword",<0,0,2.0>+llGetPos(),<0,0,0>,<0,0,0,1>,0);
llRezObject("aaa_lifetimeproxy",llGetPos(),<0,0,0>,<0,0,0,1>,0);
}
bshow = !bshow;
}
money(key id, integer amount)
{
if (amount >= 1)
{
llGiveInventory(id,strForSaleItem);
}
}
}
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
06-15-2003 14:08
Ive also been having problems with rez, link, delink to make rezed objects unmodifyable. Ive been experimenting with rezzing my lab from one prim. Many of the components of my lab are linked, and large. All the prims are supposed to die when the rezzer is clicked. This happens, but with my walls, which are 2x3 10 m flatcube prims 4 of them, linked together, the parent is the only prim that derezzes, the children just de-link and not derez.

... odd

-Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm