Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
rksprst #1
Member since Oct 2010 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: agsXMPP.Xml.xpnet.PartialTokenException gets generated thousands of times
We're getting the following error logged:

-        Caught: "" (agsXMPP.Xml.xpnet.PartialTokenException)    Exception Message = null, Exception Type = "agsXMPP.Xml.xpnet.PartialTokenException"
Call stack:
>    agsXMPP.dll!agsXMPP.Xml.StreamParser.Push(byte[] buf = {unknown}, int offset = {unknown}, int length = {unknown})   
     agsXMPP.dll!agsXMPP.XmppConnection.SocketOnReceive(object sender = {unknown}, byte[] data = {unknown}, int count = {unknown})   
     agsXMPP.dll!agsXMPP.net.BaseSocket.FireOnReceive(byte[] b = {unknown}, int length = {unknown})   
     agsXMPP.dll!agsXMPP.net.ClientSocket.EndReceive(System.IAsyncResult ar = {unknown})   
     System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken = {unknown})   
     [External Code]   
     System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken = {unknown})   
     System.dll!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(uint errorCode = {unknown}, uint numBytes = {unknown}, System.Threading.NativeOverlapped* nativeOverlapped = {unknown})   
     [External Code]

The error seems to occure in agsXMPP.Xml.StreamParser in the Push(byte[] buf, int offset, int length) method in line: 137:
tok = m_enc.tokenizeContent(b, off, b.Length, ct);

Is this expected behavior?
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by rksprst:
Is this expected behavior?

for agsXMPP it is because the parser throws an exception when a partial Stanza is received on the socket and is waiting for the rest to parse the stanza.

In MatriX I have rewritten this part to improve speed and get rid of these exceptions.

Alex
Avatar
IrQ #3
Member since Oct 2010 · 6 posts
Group memberships: Members
Show profile · Link to this post
have same problem. Using agsXMPP as server process.
When using client Vacuum-im this excepion generating  so often. When using Psi+ no exception generated.
agsXMPP - last revision from svn. When used version 1.1 there was no exception.
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this exception is only internal for the parser state and can be completely ignored.
The parser throws an internal exception when the data which was received over the socket is partial Xml. Its waiting then for the next socket receive to parse the Xml. On big stanzas this can happen quite often.
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