Page 1 of 1

Error decoding UtfString

Posted: 01 May 2011, 14:54
by dingo
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.

Posted: 01 May 2011, 17:35
by ThomasLund
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

Posted: 01 May 2011, 18:00
by dingo
i see.

many thanks! :D