Too Many Listens Error...
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
06-24-2009 15:18
Hello, everyone.
I've recently created a teleporter system for my own use, and I hope to release it as a product. However, my friends have been telling me that my teleporters have been getting the "Too Many Listens" error when I'm not around. The error seems to be occuring randomly, so it's been difficult for me to replicate.
These teleporters can only have three listens at any given time, and two of these listens are only temporary.
1) A listen for communicating with other teleporters 2) A listen for the user interface (dialog menus) 3) A listen for communicating with the "teleport beam"
The first listen is the only one that is permanently open (unless the owner changes the channel).
The wiki and several other sources have confirmed that the error is only supposed to occur when there are more than 64(?) listens open, which is certainly not the case.
I can't post the script on the forums, but I'll gladly provide it to anyone who needs it.
Any help is appreciated.
_____________________
Life is a highway... And I just missed my exit.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
06-24-2009 15:38
Are you sure you're removing the listens with llListenRemove()?
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
06-24-2009 15:57
Positive. I've checked the script several times, looking for every instance of them. The only one not being removed is the first one.
_____________________
Life is a highway... And I just missed my exit.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
06-24-2009 16:01
Sounds like a job for extreme brute force debugging: have it llOwnerSay the handle for every llListen.
In all the scripts you're listening with.
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
06-24-2009 16:04
Oh, fun. I'll post an update soon.
Edit: What should I be looking for here? The listen handle is incrementing each time, as it should be (I think)...
_____________________
Life is a highway... And I just missed my exit.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
06-24-2009 16:42
From: Cypher Ragu Oh, fun. I'll post an update soon.
Edit: What should I be looking for here? The listen handle is incrementing each time, as it should be (I think)... You can send one my way if you are still lost.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
06-24-2009 17:11
From: Cypher Ragu Oh, fun. I'll post an update soon.
Edit: What should I be looking for here? The listen handle is incrementing each time, as it should be (I think)... Are you closing the listen before you open a new one? The order does matter.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
06-24-2009 18:03
From: Cypher Ragu Oh, fun. I'll post an update soon.
Edit: What should I be looking for here? The listen handle is incrementing each time, as it should be (I think)... Hmmm, now add code to print the handle that it's CLOSING each time. Look for discrepancies.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-24-2009 23:43
this is why I mostly use state changes to close listens, there's no mistakes possible there. (yes I know not every device can use that logic).
we recently saw a similar thing with a titler. the listen was only closed after it'd been used, but a new one was started (and it's handle stored) on a timer.. leaving the old one open if it hadn't been used, and now unclosable because the new handle was saved in the old variable, so there was no longer a stored reference.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-25-2009 00:38
From: Void Singer this is why I mostly use state changes to close listens, there's no mistakes possible there. (yes I know not every device can use that logic).
we recently saw a similar thing with a titler. the listen was only closed after it'd been used, but a new one was started (and it's handle stored) on a timer.. leaving the old one open if it hadn't been used, and now unclosable because the new handle was saved in the old variable, so there was no longer a stored reference. That's not quite true, the handles are allocated sequentially and llListenRemove doesn't give an error. You could just brute force close all previous listens. Of course this is a TERRIBLE solution, which is why it isn't referenced on the wiki.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
Too Many Listens Error... Debug
06-25-2009 00:45
From: Cypher Ragu my friends have been telling me that my teleporters have been getting the "Too Many Listens" error when I'm not around. The error seems to be occuring randomly, so it's been difficult for me to replicate. In order to debug and to get a more strict control on listen handles, use a list for them: list handles=[]; default { ... handles += [llListen( someChannel, "", NULL_KEY, "")]; ... }
This way you can: 1. See how many listens are open, by looking at the list length. 2. Easily remove all listens, by looping through the list
_____________________
From Studio Dora
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
Update:
06-25-2009 17:34
Alright, I've added debug for both sides of the listen handle (creating and removing), and I haven't found anything out of the ordinary.
I'm definitely considering the list idea.
P.S. Jesse, I sent you a copy of the script. Don't think I'm just dumping this on you, though, I'm still trying to figure it out.
_____________________
Life is a highway... And I just missed my exit.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
06-25-2009 17:57
From: Cypher Ragu Alright, I've added debug for both sides of the listen handle (creating and removing), and I haven't found anything out of the ordinary.
I'm definitely considering the list idea.
P.S. Jesse, I sent you a copy of the script. Don't think I'm just dumping this on you, though, I'm still trying to figure it out. I in no way thought you were going to dump it on someone. Always glad to see people learning here and I can plainly see that you are learning. Sometimes we just need an extra pair of eyes to see the obvious and to help us get over a hurdle. From past experience I can say that this hurdle always happens right before we make a huge leap in our understanding. I will hurry up and log in and grab it, unfortunately i might be looking at a ban here for a few days for reasons that I will not go into here. But if I can not respond in world then I will pass it on to a friend that can get it to you.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
06-25-2009 18:07
Here is the problem and it is a common mistake that has gotten most of us at least once: [lsl] else if (Channel == TeleportListenChannel); { if (Mssg == "CloseListen"  { llListenRemove(TeleportListenChannel); llMessageLinked(LINK_SET, 0, "TeleporterDisengage", ""  ; llSetText(FloatingText, < 0.0, 1.0, 0.0 >, 1.0); } } [/lsl] Can you spot it? It's this ";" in your else if [lsl] else if (Channel == TeleportListenChannel){ if (Mssg == "CloseListen"  { llListenRemove(TeleportListenChannel); llMessageLinked(LINK_SET, 0, "TeleporterDisengage", ""  ; llSetText(FloatingText, < 0.0, 1.0, 0.0 >, 1.0); } } [/lsl]
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
06-25-2009 18:38
From: Jesse Barnett Here is the problem and it is a common mistake that has gotten most of us at least once: [lsl] else if (Channel == TeleportListenChannel); { if (Mssg == "CloseListen"  { llListenRemove(TeleportListenChannel); llMessageLinked(LINK_SET, 0, "TeleporterDisengage", ""  ; llSetText(FloatingText, < 0.0, 1.0, 0.0 >, 1.0); } } [/lsl] Can you spot it? It's this ";" in your else if [lsl] else if (Channel == TeleportListenChannel){ if (Mssg == "CloseListen"  { llListenRemove(TeleportListenChannel); llMessageLinked(LINK_SET, 0, "TeleporterDisengage", ""  ; llSetText(FloatingText, < 0.0, 1.0, 0.0 >, 1.0); } } [/lsl] That's A problem, bit it's not THE problem, all that will do is trigger redundantly if it gets "CloseListen" chatted on the wrong channel, which is unlikely to happen. The problem is that he's calling llListenRemove(TeleportListenChannel) instead of llListenRemove(someHandle).
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
06-25-2009 18:46
From: Argent Stonecutter That's A problem, bit it's not THE problem, all that will do is trigger redundantly if it gets "CloseListen" chatted on the wrong channel, which is unlikely to happen. The problem is that he's calling llListenRemove(TeleportListenChannel) instead of llListenRemove(someHandle). Thanks Argent. I am still looking at it some off and on and will give it a final try in Aditi after I finish, IF I can log on.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
06-25-2009 19:07
Aaah, of course! It seems so obvious now. Thank you VERY much for your help, everyone, this has been bugging me. /me passes out cookies and lemonade 
_____________________
Life is a highway... And I just missed my exit.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
06-25-2009 19:39
in SendTeleportMenu(key ID){ change the channel to ListenChannel in the else test in else if (Mssg == "Config"  { llDetectedKey will not work in a listen see: http://lslwiki.net/lslwiki/wakka.php?wakka=llDetectedKeyRemove CleanTeleporterList() from the timer event and just put it at the end of state_entry. Start your llSetTimerEvent in touch_start, add more time if necessary in the different listen tests or set to zero in your listen tests where applicable. Might try using a dedicated handle for channel zero so that you do not have to continually redefine ListenChannel. Remove zero channel when you do not need it anymore and then remove ListenChannel and zero channel again in the timer event? Should clean up the code and make it easier to debug.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|