Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
tjabber #1
Member since Feb 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
Subject: What would cause PartialTokenException exceptions?
In my test setup I don't see PartialTokenExceptions, but when I integrate my library with the larger application I start seeing them fairly frequently. For example:

agsXMPP.Xml.xpnet.PartialTokenException occurred
  Message="Exception of type 'agsXMPP.Xml.xpnet.PartialTokenException' was thrown."
  Source="agsXMPP"
  StackTrace:
       at agsXMPP.Xml.xpnet.Encoding.scanEndTag(Byte[] buf, Int32 off, Int32 end, Token token) in C:\depot\users\tjabber\RB\Client\PCM\agsxmpp\Xml\xpnet\Encoding.cs:line 1095

I'm not sure what would cause this? The Openfire server is still alive and there's nothing obvious in the logs.

I do wonder if my understanding of the threading model is correct. When I printout the thread IDs of the callbacks they seem to come from a thread pool of 3 or so tasks. This lead me to believe I didn't need to start a new thread for the XmppConnection, so I didn't. I wonder if that could be part of the problem?
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
This is how they xpnet parser works internal. This exception should cause no problems in your program, or do they? If this is the case then please ignore them.

All bytes that are received by the socket get pushed to the Xml Tokenizer. Depending on the server software, tcp/ip stack, buffersize and others we push here only partial xml to the tokenizer. In your case its a partial EndTag. So could be something like "......</messag" where "e>" is missing and will arrive with the next socket read event.

Alex
This post was edited on 2008-02-29, 11:10 by Alex.
Avatar
tjabber #3
Member since Feb 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
Hm, Visual Studio keeps breaking on them. I'm not sure why it's interested. Those exceptions do appear to be caught in your code.
Avatar
Alex #4
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
never had this problem, do you have any special Visual Studio settings?

Alex
Avatar
tjabber #5
Member since Feb 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
The good thing about VS is how configurable it is. That's also the bad thing.

I think I had debug/exceptions turned on to break on thrown exceptions. Turning that off fixed it. Sorry for the false alarm.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS