I've found that quite a decent amount of folks arrive on this blog with the search terms "libsecondlife callback twice" - I assume that in libsl there is a condition where the chat callback gets called twice during the chat...
I'll describe what I see on the network with the "classic" client and then you can go and debug the libsl, if it has a bug or not :-)
When the user starts to type, the viewer sends the packet "ChatFromViewer" with the type equal to 4 and empty message - this is a sign that the user has started typing, and I'd suppose that this also starts various typing animations and typing sounds.
When the user finishes typing the message, then this message is sent within the packet of the same kind, but with the type 1.
Afterwards, always, there is a packet with the type 5 - which, it seems, signifies the "end of the typing business" from this user - if I start typing and then backspace out the characters - then I get the type 5 packet.
What is interesting is that depending on the network (or on the client itself?) I've seen the type 5 arrive before type 1.
I do not yet properly deal with the resequencing of the packets and seen this only once - so do not know whether it is a bug on the client, in my code, or on the loopback interface (even though the second is the most probable).
Possibly the sim sends similar kinds of packets, and the libsl does not fully handle them (or does not handle the out-of-order scenario - which obviously might be symmetric. I'd suggest to do the packet debugging on the libsl with the slproxy and capture which packets trigger the condition - then you might be closer to finding the cause of the problem.
If there are "genuine" duplicates - well, that might be a problem... Of course, one can keep a queue of the "recently seen packets" and throw away the repetitions, but then you will not be able to handle some corner cases (a user very frequently typing the same stuff - could be needed for whatever odd scenario).
That's what I have to say about this topic - maybe you find it useful, maybe not - but without a better problem description it's hard to say - so feel free to write up something in the comments on whether I guessed the problem correctly, and if you find some solution in libsl for it :) good luck!
Showing posts with label libsl. Show all posts
Showing posts with label libsl. Show all posts
Thursday, March 27, 2008
libsecondlife callback twice
Posted by
Dalien
at
11:34 PM
4
comments
Saturday, June 23, 2007
libsecondlife check-up & some more crash debugging
Today was the time to try out where is the libsecondlife since the last time i played with it..
I quickly checked out the testclient - more commands have been added since the last time I tried, now I can sit on things, touch things, stand up, walk, follow someone else, im, whisper, shout - quite a reasonable set of activities :-)
while testing it I had launched the windlight firstlook client, and I think I figured out why Vint was crashing with the firstlook - looks like I got the same problem on it, with the exception that the debug output is dumped...
So, there are two reasons:
- close the IM window
- group notice or group chat event (not sure yet)
both seem to be related to some packet being unhandled.
Needless to say, that the testclient.exe from the libsecondlife handles everything just great.
Wonder how many crashes are actually caused by the improper network traffic - if many/most - maybe we can have a sanitizing proxy :)
Posted by
Dalien
at
2:37 AM
0
comments
Subscribe to:
Posts (Atom)