Page 1 of 1

Disconnection after

Posted: 23 Sep 2010, 02:48
by RobDM
I installed SFS_PRO 1.6.6 on linux-32 bit. I use the unity API.
The first user login, join the room. The second user login, join the room. 4 or 5 messages is sended, everything is fine. The connection need between 5 and 10 seconds
But when the second one start to move (so:it send his position at 2Hz) the other one is disconnected.
Also that doesn't happend during the day, only after 7pm.
I read on the forum it's about the MaxAllowedDroppedPacket or a slow internet connection, but even if I put MaxAllowedDroppedPacket = 100, the problem is still there. And less 20 objects with 8 float are sended.
Any clue or idea how find/resolve that problem ?

Thank you.

Posted: 23 Sep 2010, 06:10
by BigFIsh
Hello,

Does your AdminTool (that came with SFS) show any dropped message values?

2 messages per second sounds resonable.

Any warnings in your log files? Warnings/Info related to clients being disconnected unexpectedly usually get shown.

Does your server send any other additional data to the client? Did you analyse the incoming messages from the server?

Did you restart the server after making changes to config.xml?

Posted: 23 Sep 2010, 17:05
by RobDM
BigFIsh wrote:Does your AdminTool (that came with SFS) show any dropped message values?

No

BigFIsh wrote:Any warnings in your log files? Warnings/Info related to clients being disconnected unexpectedly usually get shown.

No warning

BigFIsh wrote:Does your server send any other additional data to the client? Did you analyse the incoming messages from the server?

No additional data

BigFIsh wrote:Did you restart the server after making changes to config.xml?

I restart the server.

I finaly find how show the SFS debug messages. I have warnings:
- The room list is empty
- WARNING! SFSobecjt received for unknown room. Command ignored!!! Roomlist not up to date ?
-

Code: Select all

[SFS DEBUG] WARNING: Exception thrown trying to send/read data via HTTP. Exception: System.Xml.XmlException: unexpected end of file. Current depth is 3  Line 1, position 172.
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000]
  at Mono.Xml2.XmlTextReader.Read () [0x00000]
  at System.Xml.XmlTextReader.Read () [0x00000]
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000]
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000]
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000]
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000]
  at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000]
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000]
  at System.Xml.XmlDocument.LoadXml (System.String xml) [0x00000]
  at SmartFoxClientAPI.SmartFoxClient.XmlReceived (System.String msg) [0x00000]
  at SmartFoxClientAPI.SmartFoxClient.HandleMessage (System.String msg) [0x00000]
  at SmartFoxClientAPI.SmartFoxClient.HandleHttpData (SmartFoxClientAPI.Http.HttpEvent evt) [0x00000]
  at SmartFoxClientAPI.Http.HttpConnection.HttpSendViaSockets (System.String message) [0x00000]
UnityEngine.Debug:Log(Object)
SFNetworkLogin:onDebugMessage(String) (at Assets\ScriptsFlorian\Network\SFNetworkLogin.cs:22)
SFNetwork:OnDebugMessage(String) (at Assets\ScriptsFlorian\Network\SFNetwork.cs:192)
System.MulticastDelegate:invoke_void_string(String)
SmartFoxClientAPI.SmartFoxClient:_DispatchEvent(SFSEvent)
SmartFoxClientAPI.SmartFoxClient:ProcessEventQueue()
SFNetwork:FixedUpdate() (at Assets\ScriptsFlorian\Network\SFNetwork.cs:70)


I guest the two first error are linked. But the third one is throw just before the OnConnectionLost Event. And if I try to connect again, it say "Already connected"[/code]

And also the problem is still here this morning so I guest it's not about a slow connection

Posted: 23 Sep 2010, 19:28
by RobDM
The two first warning are resolved. I sended a SFSObject before the joinRoom.

After many tests, Just before the Exception/disconnection a SFSObject is received but it miss half of the paquet. Any Ideas why that happenned ?

Posted: 23 Sep 2010, 19:56
by BigFIsh
Since this is related to Unity API, I have moved this topic to a more appropriate place.

Posted: 23 Sep 2010, 20:53
by ThomasLund
Are you certain you are running the latest dll? Looks vaguely like an error that has been fixed some while ago. Note that the demos have old dll's

If you are running latest and greatest - try to cook down a small repro case and send it to me.

/T

Posted: 23 Sep 2010, 21:32
by RobDM
I just try with the lastest dll. Same problem.
Also the next [SFS DEBUG] after the exception has 6 message at the same time.

I have also asked on the Unity forum : http://forum.unity3d.com/viewtopic.php?p=402708#402708

Posted: 24 Sep 2010, 07:00
by ThomasLund
As said - I need a small Unity project as reproduction case. If you send me that, I can most likely fix it fast.

If not - no chance of helping you

/Thomas