Jump to content

llAvatarOnLinkSitTarget returns UUID when no-one is sat... and worse...


Rick Nightingale
 Share

You are about to reply to a thread that has been inactive for 626 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

OK, figure this one out:

I've simplified this code while troubleshooting. Long story short: Detect if an avatar is sat on a link in a linkset, if so, start some particles from that link.

Except... I'm getting the same valid avatar key (my alt) from two links at the same time, yet that avatar is not sat on the item at all. It was, but isn't now, and it certainly wasn't sat on two at the same time. No-one is sat on the thing!

Code excerpt:

integer i=2; // Don't care about root, start at link 2
do { // Itterate the child prims in the linkset
	llOwnerSay((string)i); 
	if (llAvatarOnLinkSitTarget(i)) {
		llOwnerSay("Av:"+(string)llAvatarOnLinkSitTarget(i));
		llLinkParticleSystem(i,gParticles);
	}
	else {
		llLinkParticleSystem(i,[]);
		llOwnerSay("No");
	}
} while(++i<=4); // Four prims in the linkset

This is the test output:

2
Av:[my alt's key redacted]
3
Av:[my alt's key redacted]
4
No

So... my alt is sat on both links 2 and 3, and yet is not actually sat on anything. In fact, I've just TP'd the alt out of the region and re-run the test - it gives the exact same output.

Sometimes I think SL is just playing with my mind...

Edited by Rick Daylight
Link to comment
Share on other sites

  • Rick Nightingale changed the title to llAvatarOnLinkSitTarget returns UUID when no-one is sat... and worse...

Right now... my brain is so boggled with this I'm stumped. I've just relogged (and the alt is not logged on) and it tells me that alt is still sat on those two links at the same time.

I give up!

Link to comment
Share on other sites

@Rick Daylight

It seems to work ok for me.. are you checking this in your changed event?

default
{
    state_entry()
    {     
    }
    changed(integer change)
    {     
        if (change & CHANGED_LINK)         
        {
            integer i=2;
        do { 
           
            if (llAvatarOnLinkSitTarget(i)) {
                llOwnerSay("Link: " + (string)i + " Av:"+(string)llAvatarOnLinkSitTarget(i));
               // llLinkParticleSystem(i,gParticles);
            }
            else {
              //  llLinkParticleSystem(i,[]);
                llOwnerSay("Link: " + (string)i + " Av: NONE");
            }
        } while(++i<=4); 
        }
    }
}

Β 

  • Like 1
Link to comment
Share on other sites

That function I excerpted is called both from changed() and if I change the particle mode manually. The script does a few other things, but nothing that would interfere with this. If it wasn't for the fact that it's getting my alt's key, I might think I'm doing something wrong, somewhere... but llAvatarOnLinkSitTarget() is returning the key of an avatar that's not even logged on. Twice.

Edited by Rick Daylight
Link to comment
Share on other sites

37 minutes ago, Rick Daylight said:

Detect if an avatar is sat on a link in a linkset

If you only care about who's sat and not on which links, you could always go back to:

// number of avatars sat on the thing:
llGetObjectDetails(llGetKey(),[OBJECT_SIT_COUNT]);
// old method:
llObjectPrimCount()-llGetNumberOfPrims();
// get their keys with
llLinkKey(llGetNumberOfPrims()-avatar_index);

Β 

Edited by Quistess Alpha
Link to comment
Share on other sites

I care about which links, not who's sat.

I think the point here is that the function is completely failing... it's like the prim has got itself stuck thinking it has an avatar sat on it. That's some serious wrongness... but how to repro this for a Jira report???

Link to comment
Share on other sites

It's not the script - I've changed and recompiled it and it gets the same results. It's the prims.

A new script in the same object, just to check the llAvatarOnLinkSitTarget() output, gets the same nonsense returned keys of an avatar that's not even logged in.

This is aΒ failure at a fundamental level.

Yes, I'll probably delete the entire linkset and remake it, since I don't really know where the failure is and cannot trust the entire thing now.

Yet another several hours wasted troubleshooting my work only to find it's nothing to do with me and is yet another bug in SL. I'm very unimpressed with LL.

Link to comment
Share on other sites

No... no it doesn't.

Since the new copy stays put - that's just saved me (by seconds) from deleting it and making it again. Thank you!

I was in the middle of re-writing the [AV]sit code. There's a very customised version of it in the thing. I wonder if that somehow caused this to happen. It shouldn't (how can a prim get stuck like that???) but who knows, lol

Edited by Rick Daylight
  • Like 1
Link to comment
Share on other sites

Not really related, but... I think my build here is cursed. Probably because I'm the devil ;)

The number of odd things that have happened to it is just going up and up.

The other week, I went down into my dungeon for the first time in a few days only to find half of the build had gone. I thought it was the missing mesh issue at first and was even taking some snapshots to add to the Jira. Then, to me horror, I realised it was really gone. Two huge, locked, and heavily experience-scripted linksets had just vanished, taking half the visible build with them. No way I had done that myself, my landlord certainly hadn't and no-one else can edit my stuff. There was no sign of them in my inventory (not returned or deleted) and of course, I had backups of the entire build except those two which I had been working on the most until a few days before they vanished.

A ticket to get a rollback was filed... which was answered long after the 72 hours that they said was all that it could be rolled back. Useless.

I've just about finished rebuilding now... and I get this. So you'll understand that I'm a bit frustrated with LL.

Edited by Rick Daylight
  • Sad 1
Link to comment
Share on other sites

@CarlaWetter Interesting... the symptoms certainly sound similar. There were no disconnects or anything like that, but perhaps related is that my dungeon is under water to take advantage of the different lighting effects. Whatever caused it managed to happen twice; the first sit target getting stuck causing the alt to then sit on the next sit target, which then got stuck too...

I'll keep a close eye on this and add to the Jira if it happens again and I can pinpoint anything useful. It was working fine before my rebuild, but I made big changes to the [AV]sit and other code in it to force sit target changes and other stuff, so maybe I managed to break something in a similar way to the crashing.

  • Like 1
Link to comment
Share on other sites

Interesting. I hope the problematic linkset is saved for posterity.

2 hours ago, Rick Daylight said:

[...] yet another bug in SL.

Some Linden: Oh dammit now I gotta go patch my buggy virtual world again. Wonder if any links were targets of llSitOnLink(), maybe the absent alt was force-sat… and the plot thickens:

2 hours ago, Rick Daylight said:

Two huge, locked, and heavily experience-scripted linksets had just vanished,

Chekov's smoking gun right there! But how else might we confuse llAvatarOnLinkSitTarget()? Could there still be a sneak path that lets the linkset change while there's an avatar seated? Like, what happens when a vehicle passenger is denied access to a parcel? even if the parcel border is a sim border and somebody crashed in crossing? (Seems unlikely anything like that happened in this case.)

2 hours ago, Rick Daylight said:

I think my build here is cursed. Probably because I'm the devil ;)

If the place really is cursed, it could command huge rents. Like from griefers, for example. If we can't monetize evil anymore, really, what is the point?

  • Like 1
  • Haha 1
Link to comment
Share on other sites

Well, I did take it into inventory but it seems re-rezzing it resets the targets. It has happend before... it will happen again ;)

Yes, lots of llSitOnLink(), plus the ability to just click-to-sit although that has now been changed to touch-to-tell the-script-to-do-llSitOnLink(), for reasons. Add to that four sets of customized (including the sit targets) [AV]sit scripts that take over once the avatar is seated.

However, if you mean the alt was force sat while it was absent, no. That's one of the checks (using llGetAgentSize()) that happens frequently in my script before trying to do anything to with them in case the avatar has bugged out before I get chance to grab it.

Edited by Rick Daylight
Link to comment
Share on other sites

See https://jira.secondlife.com/browse/BUG-232261

Aside from the above, I've seen vehicles changing regions where riders fall off or get disconnected causing sit targets to get stuck as well as agents having bad packet loss triggering it upon llUnsit() without a following disconnect/crash.

I think llSitOnLink() needs another error condition handling that checks if an agent is currently teleporting/region crossing and if so, throw a new error code instead of executing, resulting in a stuck sit target.

Edited by Lucia Nightfire
  • Like 2
Link to comment
Share on other sites

It just occurred to me that if you want/need to be careful about planning around this bug, you can llGetObjectDetails(ID,[OBJECT_ROOT]); the ID returned by llAvatarOnLinkSitTarget(); if the avatar's object_root is the same as the linksets root, then the avatar actually exists in the region and is, in fact, sitting on the object.

Link to comment
Share on other sites

13 minutes ago, Quistess Alpha said:

It just occurred to me that if you want/need to be careful about planning around this bug, you can llGetObjectDetails(ID,[OBJECT_ROOT]); the ID returned by llAvatarOnLinkSitTarget(); if the avatar's object_root is the same as the linksets root, then the avatar actually exists in the region and is, in fact, sitting on the object.

The problem happens when an agent is unsat but the server never gets the message.

Disabling then enabling the sit target does not release the stuck UUID either.

I think the server should be updated to check if sit targets are really in use when the sit target is disabled and/or enabled.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 626 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

Γ—
Γ—
  • Create New...