纳金网
标题:
sfs2x服务端返回带中文字符串key的ISFSObject到u3d客户端,抛Ex...
[打印本页]
作者:
Nightstar
时间:
2013-12-20 10:38
标题:
sfs2x服务端返回带中文字符串key的ISFSObject到u3d客户端,抛Ex...
客户端组织了一个三层ISFSObject的嵌套关系数据,其中有业务中文字符串数据作为ISFSObject的key,能发送到服务端,但是服务端返回客户端时,抛出异常:
Exception: java.nio.BufferOverflowException
Message: *** Null ***
+--- --- ---+
Stack Trace:
+--- --- ---+
java.nio.HeapByteBuffer.put(Unknown Source)
java.nio.ByteBuffer.put(Unknown Source)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.encodeSFSObjectKey(DefaultSFSDataSerializer.java:1320)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.obj2bin(DefaultSFSDataSerializer.java:505)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.object2binary(DefaultSFSDataSerializer.java:491)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.encodeObject(DefaultSFSDataSerializer.java:830)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.obj2bin(DefaultSFSDataSerializer.java:508)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.object2binary(DefaultSFSDataSerializer.java:491)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.encodeObject(DefaultSFSDataSerializer.java:830)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.obj2bin(DefaultSFSDataSerializer.java:508)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.object2binary(DefaultSFSDataSerializer.java:491)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.encodeObject(DefaultSFSDataSerializer.java:830)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.obj2bin(DefaultSFSDataSerializer.java:508)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.object2binary(DefaultSFSDataSerializer.java:491)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.encodeObject(DefaultSFSDataSerializer.java:830)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.obj2bin(DefaultSFSDataSerializer.java:508)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.object2binary(DefaultSFSDataSerializer.java:491)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.encodeObject(DefaultSFSDataSerializer.java:830)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.obj2bin(DefaultSFSDataSerializer.java:508)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.object2binary(DefaultSFSDataSerializer.java:491)
com.smartfoxserver.v2.entities.data.SFSObject.toBinary(SFSObject.java:234)
com.smartfoxserver.v2.protocol.binary.BinaryIoHandler.handleWrite(BinaryIoHandler.java:76)
com.smartfoxserver.v2.protocol.SFSIoHandler.onDataWrite(SFSIoHandler.java:333)
com.smartfoxserver.v2.protocol.SFSProtocolCodec.onPacketWrite(SFSProtocolCodec.java:157)
com.smartfoxserver.bitswarm.core.BitSwarmEngine.writeToSocket(BitSwarmEngine.java:396)
com.smartfoxserver.bitswarm.core.BitSwarmEngine.write(BitSwarmEngine.java:390)
com.smartfoxserver.bitswarm.io.Response.write(Response.java:70)
com.smartfoxserver.v2.api.response.SFSResponseApi.sendExtResponse(SFSResponseApi.java:86)
com.smartfoxserver.v2.api.SFSApi.sendExtensionResponse(SFSApi.java:1338)
com.smartfoxserver.v2.extensions.BaseSFSExtension.send(BaseSFSExtension.java:433)
com.smartfoxserver.v2.extensions.BaseSFSExtension.send(BaseSFSExtension.java:410)
vr.fullControl.vrtest.VrOnlineExtension.SendFPSetData(VrOnlineExtension.java:537)
vr.fullControl.vrtest.simulation.World.processSendFPData(World.java:133)
vr.fullControl.vrtest.handlers.SendFirePowerDataToClient.handleClientRequest(SendFirePowerDataToClient.java:13)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.java:208)
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionController.java:143)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
经过测试,服务端send到客户端时,只要实例化的ISFSObject用中文做了Key就会抛这个异常,求好心人指点下。
但是我的一个朋友测试,他那里是能send到客户端成功的。我的同事测试也会报这个异常。
真心求指教!!!!
作者:
may
时间:
2013-12-20 12:04
帮你顶一下,这个问题不是很明白
作者:
Nightstar
时间:
2013-12-20 13:57
may 发表于 2013-12-20 12:04
帮你顶一下,这个问题不是很明白
非常感谢
欢迎光临 纳金网 (http://old.narkii.com/club/)
Powered by Discuz! X2.5