EsotericSoftware / kryonet

TCP/UDP client/server library for Java, based on Kryo
BSD 3-Clause "New" or "Revised" License
1.82k stars 419 forks source link

Incorrect number of bytes in Serialization #12

Closed ghost closed 10 years ago

ghost commented 10 years ago

From captkirk...@gmail.com on July 16, 2011 00:08:40

What steps will reproduce the problem? 1. 2. 3. What is the expected output? What do you see instead? com.esotericsoftware.kryo.SerializationException: Incorrect number of bytes (15 remaining) used to deserialize object: shared.components.SharedComponent@1508f31 at com.esotericsoftware.kryonet.TcpConnection.readObject(TcpConnection.java:148) at com.esotericsoftware.kryonet.Server.update(Server.java:186) at com.esotericsoftware.kryonet.Server.run(Server.java:336) at server.network.GameServer.run(GameServer.java:263) at java.lang.Thread.run(Thread.java:662) What version of the product are you using? On what operating system? Newest Please provide any additional information below. Using Kryo without KryoNet works without any problems.

Original issue: http://code.google.com/p/kryonet/issues/detail?id=11

ghost commented 10 years ago

From captkirk...@gmail.com on July 17, 2011 16:57:15

I am using ObjectBuffer to deserialize data to read it from file then sending it over the network serialized again.

ghost commented 10 years ago

From nathan.s...@gmail.com on July 25, 2011 23:38:13

Can you provide a concise, executable test case that reproduces the problem? Do the KryoNet tests pass for you?

ghost commented 10 years ago

From captkirk...@gmail.com on July 26, 2011 14:10:33

Hey I figured out the problem I had to register my packets in the same order on the client and server sides. Very useful library thanks.

ghost commented 10 years ago

From nathan.s...@gmail.com on July 26, 2011 14:57:50

(No comment was entered for this change.)

Status: WontFix