News about that possible bug in SFS2X

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

NebulaWare
Posts: 13
Joined: 02 Apr 2011, 12:33

News about that possible bug in SFS2X

Postby NebulaWare » 01 Jun 2011, 21:17

Hi again, I have some news about that possible bug in SFS 2X:

The server runs on linux ubuntu 10.10 32bit and the server version is: 2.0.0-RC2a

We made the test with 4 clients connected. 3 clients were unity executables while the 4th was started in Unity.

The server extension is based on the SFS FPS one (in particular the transform stuff for the player movements is exactly the same).

After moving for about 10 minutes 3 of 4 clients were kicked.

The client that was running in unity reported these errors:


1- This error has been displayed when the client has been kicked:

Code: Select all

[SFS DEBUG] TCPSocketLayer: General error reading data from socket: Can't decode an SFSObject. Byte data is insufficient. Size: 0 byte(s)   at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.Binary2Object (Sfs2X.Util.ByteArray data) [0x00000] in <filename unknown>:0
  at Sfs2X.Entities.Data.SFSObject.NewFromBinaryData (Sfs2X.Util.ByteArray ba) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.SFSProtocolCodec.OnPacketRead (Sfs2X.Util.ByteArray packet) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.SFSIOHandler.HandlePacketData (Sfs2X.Util.ByteArray data) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.SFSIOHandler.OnDataRead (Sfs2X.Util.ByteArray data) [0x00000] in <filename unknown>:0
  at Sfs2X.Bitswarm.BitSwarmClient.OnSocketData (System.Byte[] data) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.TCPSocketLayer.CallOnData (System.Byte[] data) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.TCPSocketLayer.HandleBinaryData (System.Byte[] buf, Int32 size) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.TCPSocketLayer.Read () [0x00000] in <filename unknown>:0



2- This is a stack trace caught by the onConnectionLost() method:

Code: Select all

disconnected for this reason: unknown
UnityEngine.MonoBehaviour:print(Object)
NetworkManager:OnConnectionLost(BaseEvent) (at Assets/Scripts/Game/SFS imported/NetworkManager.cs:135)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
NetworkManager:FixedUpdate() (at Assets/Scripts/Game/SFS imported/NetworkManager.cs:56)



3- The last error is displayed continuously after the disconnection and is sent to the client by the server:

Code: Select all

[SFS DEBUG] You are not connected. Request cannot be sent: Sfs2X.Requests.ExtensionRequest
UnityEngine.Debug:Log(Object)
LobbyGUI:OnDebugMessage(BaseEvent) (at Assets/Scripts/Lobby/LobbyGUI.cs:202)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.Logging.Logger:DispatchEvent(LoggerEvent)
Sfs2X.Logging.Logger:Log(LogLevel, String)
Sfs2X.Logging.Logger:Warn(String[])
Sfs2X.SmartFox:Send(IRequest)
NetworkManager:SendTransform(NetworkTransform) (at Assets/Scripts/Game/SFS imported/NetworkManager.cs:125)
NetworkTransformSender:SendTransform() (at Assets/Scripts/Game/SFS imported/NetworkTransformSender.cs:39)
NetworkTransformSender:FixedUpdate() (at Assets/Scripts/Game/SFS imported/NetworkTransformSender.cs:31)

We didn't set anything particular in the xml files, just added 2 game rooms

BTW: this is the second test we made for this bug, the first time instead of the first error we got another one saying something like this (i apologize but we couldn't manage to save this error):

Code: Select all

"Expected SFSObject found 0".

If we find that error again we'll post ASAP.

Let us know, thanks :)
Last edited by NebulaWare on 01 Jun 2011, 22:12, edited 1 time in total.
NebulaWare
Posts: 13
Joined: 02 Apr 2011, 12:33

Postby NebulaWare » 01 Jun 2011, 21:46

New error just after the 5th client logged in the room:

Code: Select all

[SFS DEBUG] TCPSocketLayer: General error reading data from socket: inflating: unknown compression method   at ComponentAce.Compression.Libs.zlib.ZOutputStream.Write (System.Byte[] b1, Int32 off, Int32 len) [0x00000] in <filename unknown>:0
  at Sfs2X.Util.ByteArray.Uncompress () [0x00000] in <filename unknown>:0
  at Sfs2X.Core.SFSIOHandler.HandlePacketData (Sfs2X.Util.ByteArray data) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.SFSIOHandler.OnDataRead (Sfs2X.Util.ByteArray data) [0x00000] in <filename unknown>:0
  at Sfs2X.Bitswarm.BitSwarmClient.OnSocketData (System.Byte[] data) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.TCPSocketLayer.CallOnData (System.Byte[] data) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.TCPSocketLayer.HandleBinaryData (System.Byte[] buf, Int32 size) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.TCPSocketLayer.Read () [0x00000] in <filename unknown>:0


All these errors suggest a kind of data corruption IMO
It seems (i repeat, it seems) that using the game inside unity is more stable than using the executables
Last edited by NebulaWare on 01 Jun 2011, 22:09, edited 1 time in total.
boom_boom_room
Posts: 54
Joined: 19 Jan 2011, 12:36

Postby boom_boom_room » 01 Jun 2011, 21:49

Can you clarify if you get the onConnectionLost event when the user gets kicked? We don't get any event.
NebulaWare
Posts: 13
Joined: 02 Apr 2011, 12:33

Postby NebulaWare » 01 Jun 2011, 22:09

Yes, that method is called when the user is kicked
NebulaWare
Posts: 13
Joined: 02 Apr 2011, 12:33

Postby NebulaWare » 08 Jun 2011, 00:18

Hi again.

I probably found a workaround to avoid this problem:

it seems that using the previous RC of SFS 2x (2.0.0-RC1b) the server is much more stable.

We managed to have 6 users connected for 2 hours without any problem, while with the most recent RC after about 10 minutes almost every player gets kicked.
rparker
Posts: 19
Joined: 18 Oct 2010, 09:10

Postby rparker » 21 Jul 2011, 20:33

Has this behaviour changed when using RC3? We are still experiencing similar issues even after updating to RC3.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 26 guests