secondlife / jira-archive

3 stars 0 forks source link

[BUG-229988] If a script crashes post-state_entry with a touch event in the current state, it becomes draggable #7745

Open sl-service-account opened 3 years ago

sl-service-account commented 3 years ago

What just happened?

If a script crashes in a event that is called after touch_start is detected and enabled(I.E. enabling the ability to touch a object), it will become draggable for anyone who has permissions to move the object.

What were you doing when it happened?

The following will intentionally crash the script after touch_start has been initalized:


default{
    state_entry(){
        llSetTimerEvent(1);
    }

    timer(){
        <1,1,1>/0;
    }

    touch_start(integer total_number){
        llSay(0, "Touched.");
    }
}

What were you expecting to happen instead?

Crashed scripts should have their touchable flag removed from the primitive.

Other information

This messed up a object's position that I did not want moved after the script had crashed. This isn't counted towards the region side undo, so it isn't easy to re-position precisely located objects.

Links

Related

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-229988 | | Summary | If a script crashes post-state_entry with a touch event in the current state, it becomes draggable | | Type | Bug | | Priority | Unset | | Status | Accepted | | Resolution | Triaged | | Reporter | Chaser Zaks (chaser.zaks) | | Created at | 2021-01-05T22:11:59Z | | Updated at | 2022-01-06T18:26:58Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2021-01-05T17:43:59.684-0600', "Is there anything you'd like to add?": "This messed up a object's position that I did not want moved after the script had crashed.\r\nThis isn't counted towards the region side undo, so it isn't easy to re-position precisely located objects.", 'ReOpened Count': 0.0, 'Severity': 'Unset', 'System': 'SL Simulator', 'Target Viewer Version': 'viewer-development', 'What just happened?': 'If a script crashes in a event that is called after touch_start is detected and enabled(I.E. enabling the ability to touch a object), it will become draggable for anyone who has permissions to move the object.', 'What were you doing when it happened?': 'The following will intentionally crash the script after touch_start has been initalized:\r\n{code}\r\ndefault{\r\n state_entry(){\r\n llSetTimerEvent(1);\r\n }\r\n\r\n timer(){\r\n <1,1,1>/0;\r\n }\r\n\r\n touch_start(integer total_number){\r\n llSay(0, "Touched.");\r\n }\r\n}\r\n{code}', 'What were you expecting to happen instead?': 'Crashed scripts should have their touchable flag removed from the primitive.', } ```
sl-service-account commented 3 years ago

Maestro Linden commented at 2021-01-05T23:44:00Z

There's some strange (to me) behavior around grabbing. Prims are grabbable by default - this can be observed by rezzing a new prim, pressing Ctrl+2 to enter grab mode, then clicking to drag the prim around. But if a script with an active touch event is added, a click while in grab mode triggers a touch touch action instead, even though the object is still flagged as grabbable (llGetStatus(STATUS_BLOCK_GRAB_OBJECT) returns TRUE).

One workaround for the issue presented in this Jira is to set llSetStatus(STATUS_BLOCK_GRAB_OBJECT, TRUE) on the object so that the grab action is never available. But it would be better if the object click behavior reset to default (as though the script were removed) when a script with an active touch event crashed.