Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-228091] llListenRemove() and llSensorRemove() no longer cull queued listen(), sensor() & no_sensor() events. Plus, concerns with other functions. #6245

Closed
sl-service-account opened this issue Jan 13, 2020 · 3 comments

Comments

@sl-service-account
Copy link

Information

It's been a few years since I last tested, but to the best of my memory and from how I've structured my coding in my applications over the last decade, llListenRemove() & llSensorRemove() are supposed to cull any and all queued listen(), sensor() & no_sensor() events.

Today I was curious if this was still the case and I see that it no longer is.

So, even if I look like a fool for possibly forgetting expected behavior, its for the sake of all scripted content on the grid that I am filing this report in hopes that it can be verified on a region running server code prior to the version that changed listen and sensor queue priority.

Here is a test I made for llListenControl() and llListenRemove() testing, the former I do not have any memory over queued event culling behaviour as I mostly use the latter instead:

integer listen1;
default
{
    state_entry()
    {
        listen1 = llListen(0,"","","");
    }
    on_rez(integer i)
    {
        llResetScript();
    }
    touch_end(integer i)
    {
        if (llDetectedKey(0) == llGetOwner())
        {
            llListenControl(listen1,TRUE);
            if ((integer)llGetObjectDesc())
            {
                llOwnerSay("This is a llListenControl() test. Sleeping for 15 seconds. Say something in open chat during this time.");
                llSleep(15.0);
                llListenControl(listen1,FALSE);
                llOwnerSay("Sleep has ended.");
            }
            else
            {
                llOwnerSay("This is a llListenRemove() test. Sleeping for 15 seconds. Say something in open chat during this time.");
                llSleep(15.0);
                llListenRemove(listen1);
                llOwnerSay("Sleep has ended. Restoring listen in 2 seconds.");
                llSetTimerEvent(2.0);
            }
        }
    }
    listen(integer i, string name, key k, string message)
    {
        llOwnerSay("listen() message: '" + message + "'");
    }
    timer()
    {
        llSetTimerEvent(0.0);
        listen1 = llListen(0,"","","");
        llOwnerSay("Listen restored.");
    }
}

Here is a test I made llSensorRemove(), use with at least one other object within sensor range:

default
{
    touch_end(integer i)
    {
        if (llDetectedKey(0) == llGetOwner())
        {
            llOwnerSay("Executing llSensor() and sleeping for 10 seconds.");
            llSensor("","",ACTIVE | PASSIVE,30.0,PI);
            llSleep(10.0);
            llOwnerSay("Ending sleep and executing llSensorRemove().");
            llSensorRemove();
        }
    }
    sensor(integer i)
    {
        llOwnerSay("sensor()");
    }
    no_sensor()
    {
        llOwnerSay("no_sensor()");
    }
}

Here is a test I made for llCollisionFilter(), walk into the test object during the sleep to test:

default
{
    touch_end(integer i)
    {
        if (llDetectedKey(0) == llGetOwner())
        {
            llOwnerSay("Unsetting llCollisionFilter() and sleeping for 10 seconds.");
            llCollisionFilter("",NULL_KEY,TRUE);
            llSleep(10.0);
            llOwnerSay("Ending sleep and setting llCollisionFilter().");
            llCollisionFilter("",NULL_KEY,FALSE);
        }
    }
    collision_start(integer i)
    {
        llOwnerSay("collision_start()");
    }
    collision(integer i)
    {
        llOwnerSay("collision()");
    }
    collision_end(integer i)
    {
        llOwnerSay("collision_end()");
    }
}

Other Information

I included llCollisionFilter() because its another function I believe is affected, but I am not as sure as I am with listens and sensors.
My memory on llPassTouches() and llPassCollisions() suggests they should also cull their related events but I'm not as sure as with listens and sensors.

llSetTimerEvent(0.0) isn't affected.

llReleaseControls() isn't affected.

Original Jira Fields
Field Value
Issue BUG-228091
Summary llListenRemove() and llSensorRemove() no longer cull queued listen(), sensor() & no_sensor() events. Plus, concerns with other functions.
Type Bug
Priority Unset
Status Closed
Resolution Not Applicable
Reporter Lucia Nightfire (lucia.nightfire)
Created at 2020-01-13T18:40:40Z
Updated at 2020-01-24T18:15:42Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  'Date of First Response': '2020-01-14T16:14:18.755-0600',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'SL Simulator',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'It\'s been a few years since I last tested, but to the best of my memory and from how I\'ve structured my coding in my applications over the last decade, llListenRemove() & llSensorRemove() are supposed to cull any and all queued listen(), sensor() & no_sensor() events.\r\n\r\nToday I was curious if this was still the case and I see that it no longer is.\r\n\r\nSo, even if I look like a fool for possibly forgetting expected behavior, its for the sake of all scripted content on the grid that I am filing this report in hopes that it can be verified on a region running server code prior to the version that changed listen and sensor queue priority.\r\n\r\nHere is a test I made for llListenControl() and llListenRemove() testing, the former I do not have any memory over queued event culling behaviour as I mostly use the latter instead:\r\n{code}\r\ninteger listen1;\r\ndefault\r\n{\r\n    state_entry()\r\n    {\r\n        listen1 = llListen(0,"","","");\r\n    }\r\n    on_rez(integer i)\r\n    {\r\n        llResetScript();\r\n    }\r\n    touch_end(integer i)\r\n    {\r\n        if (llDetectedKey(0) == llGetOwner())\r\n        {\r\n            llListenControl(listen1,TRUE);\r\n            if ((integer)llGetObjectDesc())\r\n            {\r\n                llOwnerSay("This is a llListenControl() test. Sleeping for 15 seconds. Say something in open chat during this time.");\r\n                llSleep(15.0);\r\n                llListenControl(listen1,FALSE);\r\n                llOwnerSay("Sleep has ended.");\r\n            }\r\n            else\r\n            {\r\n                llOwnerSay("This is a llListenRemove() test. Sleeping for 15 seconds. Say something in open chat during this time.");\r\n                llSleep(15.0);\r\n                llListenRemove(listen1);\r\n                llOwnerSay("Sleep has ended. Restoring listen in 2 seconds.");\r\n                llSetTimerEvent(2.0);\r\n            }\r\n        }\r\n    }\r\n    listen(integer i, string name, key k, string message)\r\n    {\r\n        llOwnerSay("listen() message: \'" + message + "\'");\r\n    }\r\n    timer()\r\n    {\r\n        llSetTimerEvent(0.0);\r\n        listen1 = llListen(0,"","","");\r\n        llOwnerSay("Listen restored.");\r\n    }\r\n}\r\n{code}\r\n\r\nHere is a test I made llSensorRemove():\r\n{code}\r\ndefault\r\n{\r\n    touch_end(integer i)\r\n    {\r\n        if (llDetectedKey(0) == llGetOwner())\r\n        {\r\n            llOwnerSay("Executing llSensor() and sleeping for 10 seconds.");\r\n            llSensor("","",ACTIVE | PASSIVE,30.0,PI);\r\n            llSleep(10.0);\r\n            llOwnerSay("Ending sleep and executing llSensorRemove().");\r\n            llSensorRemove();\r\n        }\r\n    }\r\n    sensor(integer i)\r\n    {\r\n        llOwnerSay("sensor()");\r\n    }\r\n    no_sensor()\r\n    {\r\n        llOwnerSay("no_sensor()");\r\n    }\r\n}\r\n{code}\r\n\r\nHere is a test I made for llCollisionFilter():\r\n{code}\r\ndefault\r\n{\r\n    touch_end(integer i)\r\n    {\r\n        if (llDetectedKey(0) == llGetOwner())\r\n        {\r\n            llOwnerSay("Unsetting llCollisionFilter() and sleeping for 10 seconds.");\r\n            llCollisionFilter("",NULL_KEY,TRUE);\r\n            llSleep(10.0);\r\n            llOwnerSay("Ending sleep and setting llCollisionFilter().");\r\n            llCollisionFilter("",NULL_KEY,FALSE);\r\n        }\r\n    }\r\n    collision_start(integer i)\r\n    {\r\n        llOwnerSay("collision_start()");\r\n    }\r\n    collision(integer i)\r\n    {\r\n        llOwnerSay("collision()");\r\n    }\r\n    collision_end(integer i)\r\n    {\r\n        llOwnerSay("collision_end()");\r\n    }\r\n}\r\n{code}\r\n\r\nI included llCollisionFilter() because its another function I believe is affected, but I am not as sure as I am with listens and sensors.\r\nMy memory on llPassTouches() and llPassCollisions() suggests they should also cull their related events but I\'m not as sure as with listens and sensors.',
  'What were you doing when it happened?': '?',
  'What were you expecting to happen instead?': '?',
}
@sl-service-account
Copy link
Author

Caleb Linden commented at 2020-01-14T22:14:19Z

I will check with the devs ,what i am seeing is that once the listen or sensor starts again, all those events that were muted with llListenRemove or llSensorRemove, get acted upon again.

@sl-service-account
Copy link
Author

Lucia Nightfire commented at 2020-01-14T22:36:08Z

I'm not understanding what you mean by starting again. The examples I posted trigger a queued event, but the usage of llListenRemove() and SensorRemove() should cull those queued events.

@sl-service-account
Copy link
Author

Caleb Linden commented at 2020-01-24T18:15:35Z

Hi Lucia,

Our devs assert that this is expected behavior. Thanks for the report!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant