laduramvishnoi / kryonet

Automatically exported from code.google.com/p/kryonet
0 stars 0 forks source link

Incorrect number of bytes in Serialization #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 reported on code.google.com by captkirk...@gmail.com on 15 Jul 2011 at 10:08

GoogleCodeExporter commented 9 years ago
I am using ObjectBuffer to deserialize data to read it from file then sending 
it over the network serialized again.

Original comment by captkirk...@gmail.com on 17 Jul 2011 at 11:57

GoogleCodeExporter commented 9 years ago
Can you provide a concise, executable test case that reproduces the problem? Do 
the KryoNet tests pass for you?

Original comment by nathan.s...@gmail.com on 26 Jul 2011 at 6:38

GoogleCodeExporter commented 9 years ago
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.

Original comment by captkirk...@gmail.com on 26 Jul 2011 at 9:10

GoogleCodeExporter commented 9 years ago

Original comment by nathan.s...@gmail.com on 26 Jul 2011 at 9:57