I've got a really strange problem, i am trying to do a really simple thing, put a float in a SFSObject and sending it to the server.
This code works:
Code: Select all
void test(){
SFSObject data = new SFSObject();
data.PutFloat("x", 2.305684f);
smartfox.Send(new ExtensionRequest("moveRequest", data, MainSmartfox.smartfox.LastJoinedRoom, false));
}
This code doesn't work:
Code: Select all
void test(){
SFSObject data = new SFSObject();
data.PutFloat("x", 1.305684f);
smartfox.Send(new ExtensionRequest("moveRequest", data, smartfox.LastJoinedRoom, false));
}
The only thing i changed was that i increased the float with 1, and suddenly it works! I am have absolutely no clue whats going on and all help is appreciated!
These floats doesn't work either:
1.305684
-1.448122
1.258205
2.796537
The error message in the smartfox console:
Code: Select all
11:24:12,688 ERROR [1939520811@qtp-182510869-5] mortbay.log - /BlueBox/BlueBox.do
java.lang.IllegalArgumentException: Unexpected null or empty byte array!
at com.smartfoxserver.v2.protocol.SFSIoHandler.onDataRead(SFSIoHandler.java:80)
at com.smartfoxserver.v2.bluebox.BlueBox.doPost(BlueBox.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
at com.smartfoxserver.v2.bluebox.SessionFilter.doFilter(SessionFilter.java:141)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)