Error decoding UtfString

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

Moderators: Lapo, Bax

dingo
Posts: 97
Joined: 27 Jan 2009, 21:34

Error decoding UtfString

Postby dingo » 01 May 2011, 14:54

Hello.

I'm sending a Base64 encoded image to the server as a UtfString.
But I'm getting the following error on the Server:

WARN [SocketReader] protocol.SFSProtocolCodec - Error deserializing request: java.lang.IllegalArgumentException: Error decoding UtfString. Negative size: -3154


This only happens with some images, others work fine.
Is it possible that some images are too big so the UtfString is so long, that it turns negative? If yes, what is the length limit on UtfString?

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

Postby ThomasLund » 01 May 2011, 17:35

You can see the limits here:

http://docs2x.smartfoxserver.com/Develo ... t-sfsarray

Best thing is to use byte array for things like what you do

/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
dingo
Posts: 97
Joined: 27 Jan 2009, 21:34

Postby dingo » 01 May 2011, 18:00

i see.

many thanks! :D

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 18 guests