Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Scripting & Permissions

Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
03-13-2006 10:43
From: Christopher Omega
So a script that checks if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) before every call to either llStopAnimation or llStartAnimation will still function properly, correct?

Yes, that seems to be the case, and it's the fix that I'll be applying.

However, as I mentioned on the "wtf" thread, I deliberately *don't* have a permissions check on detach for any object that needs an animation stopped, because you literally need every millisecond it appears. When something goes back into inventory, half the time you end up keeping the same animation *anyway*, even having the llStopAnimation call right first in the detach event (and that problem's been getting worse, even over the time I've been scripting). Now, this new change is a useful fix for that problem, even if it's a bit of a kludge, but if it just fired *after* the attach(), that would mean there were no errors.

The other things that you've mentioned either don't cause permissions loss or are also accompanied by an attach() or changed() event, where you just request them again, as you should. I've never had any problems with them with scripts that don't constantly check permissions, either as sit objects or as attachments.

edit: oh, and yes, run_time_permissions should definitely be called whenever permissions change, I agree.
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
run_time_permissions()
03-13-2006 11:12
Nope. It doesnt fire upon detach in 1.8. This does seem like an oversight.
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
Xandi Mars
Registered User
Join date: 31 Mar 2004
Posts: 181
ive been lindened...bad
03-13-2006 11:47
Omg
_____________________
um yes i know im a dork...i wear my title with pride
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
run_time_permissions() fires on detach in 1.9
03-13-2006 12:47
From my testing in 1.9, run_time_permissions() now fires upon detach. It appears that the Lindens may be following this thread. :)

It appears that permissions are still being automatically removed BEFORE a changed() event, so scripts that attempt to stop animation without checking for permission *are* going to generate errors. The errors just cause an ignorable icon to show above the object and are pretty benign. If thar be Lindens lurking here, could you give any insight into why permissions are revoked before change() and not after? Thx!

I'm playing with the new run_time_permissions() functionality, to see what I can do with it.
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
Ben Stravinsky
Second Life Resident
Join date: 7 Nov 2004
Posts: 149
hmmmm
03-13-2006 12:50
There Is No Way On This Earth I Am Running Around Fixing Everything That Gives Out Errors Because Of What I've Just Read!

My Account Is Just Gonna Be Spammed To Hell With People Thinking I Owe Them A Fix For Something Thats Not My Fault.

Yes Thats Capitals, Yes I'm Shouting, Stick A Linden In Front Of Me.
Brent Linden
eXtreme Bug Hunter
Join date: 16 Feb 2005
Posts: 212
03-13-2006 13:10
We hear your concerns and we're looking at how this is affecting ya'll. I'll be in touch soon :)
_____________________
The best way to predict the future is to invent it. -Alan Kay
Siggy Romulus
DILLIGAF
Join date: 22 Sep 2003
Posts: 5,711
03-13-2006 13:23
From: Kelly Linden
Script permissions got a change in preview.

Previously permissions that were granted because the script was on an attachment or a vehicle would keep those permissions after the person detached the item or stood up. This was necessary because the scripter was responsible for 'cleaning up' - stopping animations etc - after the person stood up from a vehicle for example.

In preview the permission is lost as soon as the person stands up from the object, at the same time any animations etc that would normally have to be stopped by the script are stopped when the permission is revoked.

Yes, this will cause some previously perfectly fine scripts to now spam error messages, even though they will still behave normally. The behavior / display of script error messages is currently under review but no changes have been made in the current preview.


I have an extremely popular item that unsits and av then animates them - in fact its intrinsic to how it works - and quite legal to do under LSL.

Not a hack - not an exploit - I get permissions - unseat the av then run an animation. after x amount of time I stop the animation.

I go through all the correct checking for perms before stopping and starting said animations.

If I GET permissions - I should be able to hold those permissions until revoked.

I'm going to check it tonight after work.

If this is the case I stand by my original statement of 'rewarding lazy scripters while breaking content of those who play by the rules'
_____________________
The Second Life forums are living proof as to why it's illegal for people to have sex with farm animals.

From: Jesse Linden
I, for one, am highly un-helped by this thread
Siggy Romulus
DILLIGAF
Join date: 22 Sep 2003
Posts: 5,711
03-13-2006 13:24
From: Brent Linden
We hear your concerns and we're looking at how this is affecting ya'll. I'll be in touch soon :)


I'll make that simple - if it busts my diving board I'll forward all my customer requests to you.
_____________________
The Second Life forums are living proof as to why it's illegal for people to have sex with farm animals.

From: Jesse Linden
I, for one, am highly un-helped by this thread
Brent Linden
eXtreme Bug Hunter
Join date: 16 Feb 2005
Posts: 212
03-13-2006 13:42
Noooo! Pick Kona, he's got a tougher skin.

Anyway, I talked to the developer on the case, and we have an idea on how to fix it. I'll keep ya'll posted.
_____________________
The best way to predict the future is to invent it. -Alan Kay
Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
03-13-2006 13:46
From: Brent Linden
Noooo! Pick Kona, he's got a tougher skin.

Anyway, I talked to the developer on the case, and we have an idea on how to fix it. I'll keep ya'll posted.


Could it not just be moved to after the attach() or changed() event, rather than before. That way you're still able to force the cleanup, but those that wish to retain the control over cleanup for whatever reason can do so.
_____________________
Brent Linden
eXtreme Bug Hunter
Join date: 16 Feb 2005
Posts: 212
03-13-2006 13:52
Ok, here's the fix to the fix that fixes your fix:

We will only automatically take away permissions for the camera, since that is why this fix was being put in in the first place. We are trying to prevent "camera griefing" -- or taking the camera and not giving it back! In the process we hit every permission, and after some thought, fire bombs raids on the Lab and constructive criticisms from you all, we decided that was a bad idea.

Thanks for your concerns, and see you in Preview!
_____________________
The best way to predict the future is to invent it. -Alan Kay
Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
03-13-2006 13:53
From: Brent Linden
Ok, here's the fix to the fix that fixes your fix:

We will only automatically take away permissions for the camera, since that is why this fix was being put in in the first place. We are trying to prevent "camera griefing" -- or taking the camera and not giving it back! In the process we hit every permission, and after some thought, fire bombs raids on the Lab and constructive criticisms from you all, we decided that was a bad idea.

Thanks for your concerns, and see you in Preview!


Thank you Brent.
_____________________
Brent Linden
eXtreme Bug Hunter
Join date: 16 Feb 2005
Posts: 212
03-13-2006 14:10
As I understand it, we don't have a way to detect the end of the detaching callback (yet). So for now, the fix is crippled. In the future we may try to fix it the right way, but not for Wednesday's release.
_____________________
The best way to predict the future is to invent it. -Alan Kay
Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
03-13-2006 14:12
From: Brent Linden
As I understand it, we don't have a way to detect the end of the detaching callback (yet). So for now, the fix is crippled. In the future we may try to fix it the right way, but not for Wednesday's release.


Ah, that's kind of what I'd thought earlier to be honest as it's the only reason I could think of as to why it had been put in before the event fired.
_____________________
Siggy Romulus
DILLIGAF
Join date: 22 Sep 2003
Posts: 5,711
03-13-2006 14:13
From: Brent Linden
Noooo! Pick Kona, he's got a tougher skin.

Anyway, I talked to the developer on the case, and we have an idea on how to fix it. I'll keep ya'll posted.


No Kona is a friend of mine - I'll pick whoever it inconveniences the most.
_____________________
The Second Life forums are living proof as to why it's illegal for people to have sex with farm animals.

From: Jesse Linden
I, for one, am highly un-helped by this thread
Siggy Romulus
DILLIGAF
Join date: 22 Sep 2003
Posts: 5,711
03-13-2006 14:19
From: Brent Linden
Ok, here's the fix to the fix that fixes your fix:

We will only automatically take away permissions for the camera, since that is why this fix was being put in in the first place. We are trying to prevent "camera griefing" -- or taking the camera and not giving it back! In the process we hit every permission, and after some thought, fire bombs raids on the Lab and constructive criticisms from you all, we decided that was a bad idea.

Thanks for your concerns, and see you in Preview!


Okies - thanks - that sounds very reasonable.

You can understand the concerns though - this is behavior that I explicitly asked about as far back as 1.2. Breaking content that follows the rules - while fixing content that doesn't (stopping animations in this case and revoking perms) I can't see as a 'good thing'.

Especially when you have probably a thousand instances of an item in world that follows the rules laid down.

Perhaps a better/easier way to revoke permissions? Make it easier to turn off all perms and stop all anims that a scripter can invoke?
_____________________
The Second Life forums are living proof as to why it's illegal for people to have sex with farm animals.

From: Jesse Linden
I, for one, am highly un-helped by this thread
Siggy Romulus
DILLIGAF
Join date: 22 Sep 2003
Posts: 5,711
03-13-2006 14:20
Update: just had a friend test it in preview and email me.. and verily it is fuckered right up.

Seeing there is no fix for it - I'll see what wednesday brings.

For now I'll take down all my diving board vendors and forward all refund requests and customer support - as I said I would.

I like to keep abreast of changes and updates - I test things based on what the release notes say will change.. springing a last minute fundemental change in how premissions work (not perceived - not accepted - but actual verified by LL behavior) is uncool.
_____________________
The Second Life forums are living proof as to why it's illegal for people to have sex with farm animals.

From: Jesse Linden
I, for one, am highly un-helped by this thread
Xandi Mars
Registered User
Join date: 31 Mar 2004
Posts: 181
hi
03-13-2006 14:48
A very humble thankyou to LindenLabs and Brent Linden
_____________________
um yes i know im a dork...i wear my title with pride
Brent Linden
eXtreme Bug Hunter
Join date: 16 Feb 2005
Posts: 212
03-13-2006 14:54
Everyone stop panicking! :)

We're fixing the fix. A new update should be available today.

translation: Don't worry about it, it like it never existed.

*flashes you all with the red blinky thing from Men In Black*

What are you doing here? You were about to tell everyone how kewl Brent Linden is, and how you wouldn't ever possibly think of complaining to him about anything :)
_____________________
The best way to predict the future is to invent it. -Alan Kay
Siggy Romulus
DILLIGAF
Join date: 22 Sep 2003
Posts: 5,711
03-13-2006 15:37
From: Brent Linden
Everyone stop panicking! :)

We're fixing the fix. A new update should be available today.

translation: Don't worry about it, it like it never existed.

*flashes you all with the red blinky thing from Men In Black*

What are you doing here? You were about to tell everyone how kewl Brent Linden is, and how you wouldn't ever possibly think of complaining to him about anything :)


LOL

Ok being at work and having to go on second hand info passed to me via gmail is incredibly frustrating.

If we are having a miscommunication of whats going on - then you have my sincere and humble appology - but as you can imagine the thought of facing a madcap runaround world on Tuesday followed by having my IM's and Email clogged for possibly weeks (apart from the having to take down one of my #1 items - that I can live with anyways) - does frazzle my already messy hair and puts a fire under my ass.

Again - if all is well and fixed you have my apologies for any heated statements I've made.
_____________________
The Second Life forums are living proof as to why it's illegal for people to have sex with farm animals.

From: Jesse Linden
I, for one, am highly un-helped by this thread
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
03-13-2006 16:33
From: Christopher Omega
If I'm understanding these changes correctly, I think LL may have just worded the changes a little vaguely.

So a script that checks if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) before every call to either llStopAnimation or llStartAnimation will still function properly, correct?

A truly well written script would make these checks - there's no telling when an avatar will log out, move into another simulator, get pushed 1000m away by a griefer... all of these revoke permissions, but don't trigger a run_time_permissions(integer perms) event for the permissions change.


IMO, run_time_permissions should be invoked EVERY time a permission changes, even in the scenerios I mentioned above.
==Chris


Some of my old scripts use a flag that tells the script they requested and got permissions, instead of calling llGetPermissions(). This was on the theory that integer == TRUE would be faster and take less memory than ((llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) != FALSE. That flag stays set until the script cleans up after itself on dettach. IE, some of my scripts which are technically correct but built with efficiency based on a logical assumption, will break because that logical assumption changed.

I would suggest that either the error messages generated be rerouted so as not to make the object appear broken to the end user, or the permissions release delay idea be implemented.
_____________________
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
03-13-2006 16:55
Phew! We've been UnLindened.
_____________________
Siggy Romulus
DILLIGAF
Join date: 22 Sep 2003
Posts: 5,711
03-13-2006 18:56
From: someone

SL will clean up camera control and triggered animations automatically, so it is not necessary for scripts to do this. We made this change to better handle poorly behaved scripts that do not stop animating, grabbing controls, etc. when the resident is no longer interacting with them. This does mean that existing scripts which try to clean up after themselves will generate script warnings, as they will no longer have the necessary permissions.


Ok - thats from the latest 'Preview Update' thread.

Can someone give me the a definitive 'this is how its gonna be' - because it kinda flys in the face of what Brent said - and if it IS then it means that the 'everything is gonna be fine' isn't the case.

And I really want a heads up on this as soon as I can.
_____________________
The Second Life forums are living proof as to why it's illegal for people to have sex with farm animals.

From: Jesse Linden
I, for one, am highly un-helped by this thread
Luth Brodie
Registered User
Join date: 31 May 2004
Posts: 530
03-14-2006 09:59
From: Siggy Romulus

And I really want a heads up on this as soon as I can.


Siggy...
I went in to the preview to check all my pose scripts as I was reading this thread. I also checked my copy of the delux diving board and had no issue with either.
_____________________
"'Aarrr,' roared the Pirate Captain, because it seemed a good way to end the conversation."
The Pirates! In An Adventure With Scientists.

Reel Expression Poses and Animations:
reelgeek.co.uk/blog
Ricky Shaftoe
Owner, "Rickymations"
Join date: 27 May 2005
Posts: 366
03-14-2006 11:16
Phew, I am glad they've fixed the fix. Like Ben Stravinsky, I was starting to get nervous.

Er, how do we log onto the preview grid? I've never done that.
1 2 3