Error handling data: inflating sfs2x, Invalid SFSDataType

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

Moderators: Lapo, Bax

ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 02 Jun 2011, 09:50

Could you please try to paste (or email) logs from a debug = true client where its possible to see the data sent/received by the client.

Usually in player.log

We also need a small repro test case - as small as possible. That will expedite finding the issue

Best
Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
boom_boom_room
Posts: 54
Joined: 19 Jan 2011, 12:36

Postby boom_boom_room » 02 Jun 2011, 22:46

Sent...
rparker
Posts: 19
Joined: 18 Oct 2010, 09:10

Postby rparker » 21 Jul 2011, 20:38

We are on RC3 now and no change in this issue for us. Clients still get into a state where they stop responding or receiving messages from the server after one of these errors shows up in the log.
mka
Posts: 15
Joined: 31 Jan 2011, 02:43

Postby mka » 29 Jul 2011, 02:56

Hi,

I get pretty similar errors with the latest RC3 Java Client API (but used to happen in all the other versions before as well). I am basically trying to run a load test via the Java Client API to monitor server load etc. But everything above roughly 50 users starts throwing the below errors. The behaviour is pretty random. Though from my last runs most of the errors seem to appear after a room join. After that the client hangs in the same indefinite state and does not report any events or respond.

Some of the errors only turn up as:

Code: Select all

[BitSwarmClient] - ## SocketDataError: Data format exception decompressing buffer


Some are:

Code: Select all

java.lang.IllegalStateException: Invalid SFSDataType. Expected: 18, found: 50
   at com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.decodeSFSObject(DefaultSFSDataSerializer.java:180)
   at com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.binary2object(DefaultSFSDataSerializer.java:168)
   at com.smartfoxserver.v2.entities.data.SFSObject.newFromBinaryData(SFSObject.java:149)
   at sfs2x.client.core.SFSProtocolCodec.onPacketRead(SFSProtocolCodec.java:47)
   at sfs2x.client.core.SFSIOHandler.handlePacketData(SFSIOHandler.java:283)
   at sfs2x.client.core.SFSIOHandler.onDataRead(SFSIOHandler.java:132)
   at sfs2x.client.bitswarm.BitSwarmClient.onSocketData(BitSwarmClient.java:364)
   at sfs2x.client.bitswarm.BitSwarmClient.access$2(BitSwarmClient.java:358)
   at sfs2x.client.bitswarm.BitSwarmClient$3.dispatch(BitSwarmClient.java:105)
   at sfs2x.client.core.EventDispatcher.dispatchEvent(EventDispatcher.java:52)
   at sfs2x.client.core.sockets.TCPSocketLayer.callOnData(TCPSocketLayer.java:146)
   at sfs2x.client.core.sockets.TCPSocketLayer.handleBinaryData(TCPSocketLayer.java:140)
   at sfs2x.client.core.sockets.TCPSocketLayer.access$6(TCPSocketLayer.java:139)
   at sfs2x.client.core.sockets.TCPSocketLayer$NettyIOHandler.messageReceived(TCPSocketLayer.java:269)
   at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)


with further down the stacktrace

Code: Select all

java.lang.IllegalStateException: Can't decode an SFSObject. Byte data is insufficient. Size: 0 bytes
   at com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.binary2object(DefaultSFSDataSerializer.java:162)
   at com.smartfoxserver.v2.entities.data.SFSObject.newFromBinaryData(SFSObject.java:149)
   at sfs2x.client.core.SFSProtocolCodec.onPacketRead(SFSProtocolCodec.java:47)
   at sfs2x.client.core.SFSIOHandler.handlePacketData(SFSIOHandler.java:283)
   at sfs2x.client.core.SFSIOHandler.onDataRead(SFSIOHandler.java:132)
   at sfs2x.client.bitswarm.BitSwarmClient.onSocketData(BitSwarmClient.java:364)
   at sfs2x.client.bitswarm.BitSwarmClient.access$2(BitSwarmClient.java:358)
   at sfs2x.client.bitswarm.BitSwarmClient$3.dispatch(BitSwarmClient.java:105)
   at sfs2x.client.core.EventDispatcher.dispatchEvent(EventDispatcher.java:52)
   at sfs2x.client.core.sockets.TCPSocketLayer.callOnData(TCPSocketLayer.java:146)
   at sfs2x.client.core.sockets.TCPSocketLayer.handleBinaryData(TCPSocketLayer.java:140)
   at sfs2x.client.core.sockets.TCPSocketLayer.access$6(TCPSocketLayer.java:139)
   at sfs2x.client.core.sockets.TCPSocketLayer$NettyIOHandler.messageReceived(TCPSocketLayer.java:269)
   at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)


I have also tried changing the compression settings without any change. The errors keep coming randomly.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 29 Jul 2011, 08:25

Few users have posted similar errors. We are working closely with customers who have reported issues like these.
As of today we are practically 100% confident that there's no issue with the Server and this problem is caused by a network error.
Should this problem persist or affect a large number of clients you should check your bandwidth and overall quality of the server side network infrastructure.
Lapo
--
gotoAndPlay()
...addicted to flash games
spwar
Posts: 2
Joined: 27 Sep 2011, 14:54

Postby spwar » 28 Sep 2011, 08:18

Lapo wrote:Few users have posted similar errors. We are working closely with customers who have reported issues like these.
As of today we are practically 100% confident that there's no issue with the Server and this problem is caused by a network error.
Should this problem persist or affect a large number of clients you should check your bandwidth and overall quality of the server side network infrastructure.


Hello,

We have the same problem with invalid SFSDataType(Expected: SFS_OBJECT). Is there any solution for that issue already?

In our case it starts when 4-5 users are connected. More users join faster it comes. In fact users receive this error not simultaneously but one by one in the range of 30 seconds or so. We have the latest versions of sfs2x server and client API (Unity C#).

Thanks for help beforehand,
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 28 Sep 2011, 10:44

Do you have a way to reproduce it? If so please get in touch with us via email and we'll exchange the necessary files to study the case.
Make sure that you're running RC3 and the latest C# API available.
Lapo

--

gotoAndPlay()

...addicted to flash games
spwar
Posts: 2
Joined: 27 Sep 2011, 14:54

Postby spwar » 16 Dec 2011, 15:18

Thanks
boom_boom_room
Posts: 54
Joined: 19 Jan 2011, 12:36

Re: Error handling data: inflating sfs2x, Invalid SFSDataTyp

Postby boom_boom_room » 01 Mar 2012, 17:23

This is annoying. We have revamped the java code, used the latest patch, optimized the objects being sent and received, controlled how may packets are being sent / second and also used UDP for positional updates. We have been battling this for months with no positive result. I started this post in May last year and this error is still prevalent. Any hopes on addressing this? Is there a solution? What is causing this? Can you atleast list out the reasons why this could happen? We have invested a lot of time and effort out here and we would appreciate some direction on this matter. Thanks.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error handling data: inflating sfs2x, Invalid SFSDataTyp

Postby Lapo » 02 Mar 2012, 08:36

Just to understand. Are you using SFS2X 2.0.1 and the client API provided with it?
If so, can you please give me access to your application so that I can login and see the problem in action?
thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
boom_boom_room
Posts: 54
Joined: 19 Jan 2011, 12:36

Re: Error handling data: inflating sfs2x, Invalid SFSDataTyp

Postby boom_boom_room » 02 Mar 2012, 10:49

Yes its SFS 2x and the latest client API. I shall setup something for you in some time.
boom_boom_room
Posts: 54
Joined: 19 Jan 2011, 12:36

Re: Error handling data: inflating sfs2x, Invalid SFSDataTyp

Postby boom_boom_room » 02 Mar 2012, 11:42

I have sent you a message with the details.
vmnikulin
Posts: 26
Joined: 17 Feb 2012, 12:48

Re: Error handling data: inflating sfs2x, Invalid SFSDataTyp

Postby vmnikulin » 05 Mar 2012, 12:35

Hello!

I'm using SFS2x version 2.0.1 with Java client and getting same error:

Code: Select all

2012-03-05 17:33:19,591 [New I/O client worker #5-1] ERROR [SFSIOHandler] Error handling data: Invalid SFSDataType. Expected: 18, found: 0
2012-03-05 17:33:19,595 [New I/O client worker #5-1] ERROR [SFSIOHandler] Error handling data: Can't decode an SFSObject. Byte data is insufficient. Size: 0 bytes
2012-03-05 17:33:20,117 [New I/O client worker #1-1] ERROR [SFSIOHandler] Error handling data: Invalid SFSDataType. Expected: 18, found: 0
2012-03-05 17:33:20,118 [New I/O client worker #1-1] ERROR [SFSIOHandler] Error handling data: Can't decode an SFSObject. Byte data is insufficient. Size: 0 bytes


How I can fix it?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error handling data: inflating sfs2x, Invalid SFSDataTyp

Postby Lapo » 05 Mar 2012, 17:13

Usually this kind of error is only seen if there's a network error. In that case invalid data may arrive at the client and generate an error, after which the connection might be lost or unresponsive (client side).
If you think this is a different scenario then please provide more context, including all possibile details and a description on how this error is triggered or the steps by which the problem can be replicated.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 47 guests