Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
ayyrk #1
Member since Jul 2007 · 92 posts
Group memberships: Members, Premium
Show profile · Link to this post
Subject: Spark Closing Session
Hello, I am tracking down this problem. If anyone has suggestions please let me know.

I am using agsxmpp client on windows mobile devices against OpenFire. The error message below is from the OpenFire log.

The mobile device log shows that the connection was established and the roster start and end call backs finished. In a couple of cases is looks like the last thing the device does before the error is SendMyPresence. When the error happens the device log shows onClose being called.

I set  xmppCon.Show to either ShowType.away and ShowType.chat then call xmppcon.SendMyPresence.

question: could the presence message somehow be breaking OpenFire?


2008.04.02 11:42:30 Closing session due to exception: (SOCKET, R: /212.183.134.65:9002, L: /172.16.5.140:5222, S: 0.0.0.0/0.0.0.0:5222)
org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 (Hexdump: empty)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:164)
Avatar
ayyrk #2
Member since Jul 2007 · 92 posts
Group memberships: Members, Premium
Show profile · Link to this post
Possibly related:  Do I have to synchronize any of the calls made to the XmppClientConnetion object?

That is to say, if I SendMyPresence from multiple threads should the xmppcon.SendMyPresence call be inside a lock(){ }

What about the xmppocn.Send method? Can I call that at the same time from multiple threads? 

Thanks,

Ayyrk
Avatar
Alex #3
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #1
Quote by ayyrk:
question: could the presence message somehow be breaking OpenFire?
I would say no.
Alexander Gnauck
AG-Software
Avatar
Alex #4
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #2
Quote by ayyrk:
Possibly related:  Do I have to synchronize any of the calls made to the XmppClientConnetion object?

That is to say, if I SendMyPresence from multiple threads should the xmppcon.SendMyPresence call be inside a lock(){ }

What about the xmppocn.Send method? Can I call that at the same time from multiple threads? 

The ClientSocket Send functions are locked. The Send member is XmppClientConnection is not. I don't think this should be a problem because there is a lock in the socket class.
But feel free to add a lock and recompile agsXMPP for a test.

There is another thread here in the forum where OpenFire servers have a strange problem on big messages with compression. Did you try to disable compression when its enabled?

Alex
Alexander Gnauck
AG-Software
Avatar
ayyrk #5
Member since Jul 2007 · 92 posts
Group memberships: Members, Premium
Show profile · Link to this post
To date we are only experiencing the problem in Dubai and Taipei.

I never have this problem here in New York on GPRS.

It never occurs over ActiveSync (USB or Bluethooth).

So maybe it is something to do with the GPRS carriers in those locations.

It happens when the connection is first opened. At that point the roster is received and presence info is sent. Could the roster count as a "big message"?

I will add an option to my application to disable compression. I am not sure what I am chasing yet.

-Ayyrk
Avatar
Alex #6
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by ayyrk:
It happens when the connection is first opened. At that point the roster is received and presence info is sent. Could the roster count as a "big message"?

I was referring t this thread:
http://forum.ag-software.de/forum.php?req=thread&id=565
The OP never gave us enough info about the message size causing this problem.

But I don't think its related to this problem. You receive the roster and don't send it. And you said it disconnects after OnRosterEnd, which means the roster was received without problems.

Alex
Alexander Gnauck
AG-Software
Avatar
ayyrk #7
Member since Jul 2007 · 92 posts
Group memberships: Members, Premium
Show profile · Link to this post
This particular beta tester is back from his trip. It may be a while before I have more information to add to this thread.

Thanks!

-Ayyrk
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 SDK Support RSS