• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
MAINTENANCE ANNOUNCEMENT - JIRA will undergo maintenance starting 1:00am PDT through 3:00am on Saturday 2010.03.20. Please do not enter issues during this time as the system maybe restarted.
Issue Details (XML | Word | Printable)

Key: SVC-2990
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Showstopper Showstopper
Assignee: WorkingOnIt Linden
Reporter: Silicon Plunkett
Votes: 77
Watchers: 12
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

Listen and sensor (maybe other) events persist between states in LSL2

Created: 03/Sep/08 12:11 PM   Updated: 14/Sep/08 05:47 PM
Component/s: Scripts
Affects Version/s: 1.24 Server
Fix Version/s: None

Time Tracking:
Not Specified

Environment: hardware is Irrelevant. Exact server is v1.24.4.95600
Issue Links:
Duplicate
 
Relates

Last Triaged: 04/Sep/08 11:04 PM
Linden Lab Issue ID: DEV-20164


 Description  « Hide
listen events persist between states in LSL2, and timer events persist between states in both LSL2 and Mono

Listen Example:

default
{
state_entry()

{ llListen(0,"","",""); llOwnerSay("Say something"); state state2; }

}
state state2
{
listen(integer c, string n, key id, string msg)

{ llOwnerSay("This text shows in LSL2 but NOT Mono"); }

}

Timer Example:

default
{
state_entry()

{ llSetTimerEvent(2.0); state state2; }

}

state state2
{
timer()

{ llOwnerSay("This shows up in LSL2 and Mono"); llSetTimerEvent(0); }

}

This bug is NASTY. A lot of stuff is going to break.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Kora Zenovka added a comment - 03/Sep/08 01:34 PM
The listener is BAD, but in LSL the timer is supposed to persist over state changes.

This is what it is in the documentation. So it is always better to llSetTimerEvent(0.0) before exiting the state.


Silicon Plunkett added a comment - 03/Sep/08 03:50 PM - edited
Ah, wasn't aware timer events were intended to persist. I always zero them out from habit, excluding this script. Should also note that touch events survive resets in LSL2 but not mono as well, but theres a jira for that already, and this listen bug is brand new.

baron nowhere added a comment - 03/Sep/08 05:06 PM
Updated to Critical.

Here is an example of a script that crashes now in LSL2 that worked fine before. I routinely tell people that a "trick" in their scripts is to simply change states to clear their listeners. Here is an example of a script that now crashes right away in LSL2VM:

// ----------------------------
integer n=0;

default
{
state_entry()

{ llListen(n,"","",""); if (n==70) llOwnerSay("Say something"); state state2; }

}

state state2
{
state_entry()

{ if (n++<70) state default; else llOwnerSay("In State2"); }

}
// ----------------------------


Lex Neva added a comment - 04/Sep/08 05:38 PM
This is EXTREMELY serious! There's more going on here than meets the eye. Look at this:

default
{
state_entry()

{ llListen(0, "", "", ""); }

touch_start(integer total_number)

{ state nolisten; }

listen(integer channel, string name, key id, string message) { llSay(0, "heard: " + message); }
}

state nolisten {

touch_start(integer num) { state default; }
}

Here's what happens when I run it:

[17:32] Lex Neva: Hi!
[17:32] Object: heard: Hi!

[I touch it, switching to state "nolisten"

[17:32] Lex Neva: This
[17:32] Lex Neva: should
[17:32] Lex Neva: not
[17:32] Lex Neva: trigger
[17:32] Lex Neva: events

(I touch it, switching back to state default)

[17:32] Object: heard: This
[17:32] Object: heard: should
[17:32] Object: heard: not
[17:32] Object: heard: trigger
[17:32] Object: heard: events

Not only is the listen still there, events are queueing up and not disappearing. Not only THAT, but they're staying in the queue through a state transition (another thing LSL2 didn't do before) and triggering when I switch to a state with a listen event.

I'm upgrading this to showstopper because this is two very significant changes in how LSL behaves. Each alone would break a lot of existing content.


Simba Fuhr added a comment - 04/Sep/08 09:23 PM
I receive messages from my customers, they tell me, their scripts has been crashedn because of this bug.
One of them own about 400 signs all around sl and has to replace them now.

Please fix this soon


Redbeard McCellan added a comment - 04/Sep/08 09:41 PM
Add my vote to a speedy resolution - this broke several products.

A work around, define a global and store the listen handle then add a llListenRemove in state_exit

Not that requiring another global is a good fix, but....


Jathra Vanmoer added a comment - 05/Sep/08 02:17 AM
In my testing it only seems to effect LSL scripts, I can not get the bug to replicate under mono, but yeah.. a ton of my products have already broken I'm very very pissed off right now.. please fix this immediately..

Lex Neva added a comment - 05/Sep/08 09:41 AM
Yeah, definitely LSL only in my experience too. It affects scripts that were compiled as LSL before 1.24 hit, though, so that means the majority of scripts in SL :/

louise rumpler added a comment - 06/Sep/08 04:51 AM
Yep, LSL bug only. Mono doesnt seem affected by this particular bug.
Please fix.. it IS breaking content.

mcp Moriarty added a comment - 07/Sep/08 06:55 PM
I got hit by this one this week, suddenly a project of mine appeared to freeze up after some heavy use. To make matters worse the "to many listens" error message is not placed in the script error log! It was just scrolling past in the chat history and visitors and even I didn't notice it until about 2 days later.

It would be nice if, while fixing this one, the error message could be placed in the script error log??


stephe ehrler added a comment - 08/Sep/08 12:44 AM
This is a MAJOR problem and is creating mega lag on the grid, potentially hundreds of listens could remain open in a script! On rez/reset you get no listen response but once opened, the listen isn't removed with a state change and of course each time you click it, yet another listen is opened.. Even though I can fix my scripts using llListenRemove, THOUSANDS of scripted object are piling up listens!!!

Here is the code I checked this with:

// Simple script to demo that listens are no longer removed with state change, this is a HUGE problem!!!
// SKunkie Designs, killing lag one avie at a time!!

default
{
state_entry()

{ llSay(0, "Entering state default"); llSleep(.5); llSay(0,"First say 'test' without quotes to test script response, then click the prim to open a listen."); }

listen( integer Chan, string Name, key User, string Msg )
{
if (Msg=="test")

{ llSay(0,"The test failed, listen should be dead from the state change."); }

}
touch_start(integer total_number)

{ state Listen; }

on_rez(integer start_params)

{ llResetScript(); }

}
state Listen
{
state_entry()

{ llSay(0,"We have entered state Listen and now will open a listen, say 'test' with no quotes."); llListen( 0, "", "", "" ); //I know this is bad form, bear with me :-) }

listen( integer Chan, string Name, key User, string Msg )
{
if (Msg=="test")

{ llSay(0,"This is the expected response."); llSleep(.5); llSay(0, "Now we are going to change states which should kill the above started listen."); llSleep(.5); state default; }

}
}


mcp Moriarty added a comment - 08/Sep/08 08:41 AM
This is exactly what I was doing. Read the wiki and decided to let a state change close the listen. I have 12 of these items on my parcel, which over time will accumulate 12*64 listens that don't get closed. Plus another 3 objects made by someone else that I've noticed are also freezing up at random over time, which I also suspect is the same problem. I have contacted the other creator.

Moon Metty added a comment - 08/Sep/08 03:27 PM
Second Life 1.21.0 (94829) Aug 20 2008 23:45:42 (Second Life Public Nightly)
You are at 255355.0, 255355.8, 21.4 in Sandbox Newcomb 1.24 BETA located at sim3006.aditi.lindenlab.com (8.2.33.232:12035)
Second Life Beta Server 1.24.4.95981

=======

After running several tests with listen and sensor, I would say the fix that's running on aditi is looking good.
Only SVC-3036 "Listen event survives 'Script not running' setting" is still occurring.
Please visit aditi to verify.


patnad babii added a comment - 08/Sep/08 04:24 PM
I went on the Aditi grid to test some of my products as well as the script above.

Good news!! the new version Second Life Beta Server 1.24.4.95981 elemininate this bug!

Please follow with a quick rollback on the grid it is a major issue breaking alot of items! all of my products are affected.


Cappy Frantisek added a comment - 10/Sep/08 04:19 PM
Just my two cents, but wouldn't it make sense to use the clean up functions instead of relying on state changes to do the work for you? It seems like beter coding techniques to me.

mcp Moriarty added a comment - 11/Sep/08 12:20 AM
What you say makes sense, but because the memory space is so limited you end up doing many things to save a line of code here and there. Plus the documentation states they will not persist. So it's a known behavior. As far as I'm concerned, if it's documented it's a feature and can be legally used.

The real question is how did they manage to break it? )


stephe ehrler added a comment - 11/Sep/08 12:55 AM - edited
Might be better to code it that way but you have to set a global integer, another line of code to clear each listen etc. The main problem is there are THOUSANDS of scripted objects out in world that were written this way and with this broken, they are piling up listens and creating all sorts of havoc! Obviously LL saw this as a problem because they already jumped on this one! From watching my sim stats, this bug is a LARGE part of the instability we have been seeing this last week or two since this code was released..

Christian Racer added a comment - 12/Sep/08 04:59 AM
Hello,

all my costumers leave my service ;( pls fix it ............


Bo Twang added a comment - 12/Sep/08 10:15 AM
This is affecting my products too and there's really no way to push out a fix to existing customers – there are hundreds & hundreds out there. It not only lags the grid and/or breaks our products, but makes us look pretty shabby. Pointing to an SL bug is not very good consolation to our customers. Please address this ASAP.

Lex Neva added a comment - 12/Sep/08 10:27 AM
The problem is, just fixing this bug may not actually repair the objects out in the wild that are experiencing it. If a script has already crashed due to too many listeners, then a fix for this bug won't restart the script. Lots of scripts probably won't start working properly until they are reset, and for no-mod objects, customers can't always do that. What a mess.

Lex Neva added a comment - 12/Sep/08 10:30 AM
Verified fixed in Second Life Server 1.24.5.96115 which is out on the grid now.

Day Oh added a comment - 13/Sep/08 06:22 PM
The listen example is fixed in 1.24.5.96115, but the timer example still exhibits the scary behavior.

Harleen Gretzky added a comment - 13/Sep/08 06:34 PM
The timer event was never a bug, this is by design and has always been this way.