Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to read object larger than read buffer: 1195725856 #163

Open
Betalord opened this issue Feb 22, 2021 · 1 comment
Open

Unable to read object larger than read buffer: 1195725856 #163

Betalord opened this issue Feb 22, 2021 · 1 comment

Comments

@Betalord
Copy link

Hi,
checking my server's logs, I see a lot of exceptions of this type:

com.esotericsoftware.kryonet.KryoNetException: Unable to read object larger than read buffer: 1195725856
at com.esotericsoftware.kryonet.TcpConnection.readObject(TcpConnection.java:118)
at com.esotericsoftware.kryonet.Server.update(Server.java:198)
at com.betalord.sgx.network.ServerProcessor.run(ServerProcessor.java:90)
at java.base/java.lang.Thread.run(Thread.java:834)

Now I use default constructor for server and for client, so the object buffer size is 2048 (default). I don't think I send any big objects over the network, they shouldn't be bigger than 1 KB I believe (but could be wrong). However, 1 GB as in given example is just absurd, so there must be some kind of a bug in kryonet that's causing it. From the logs I see I get different values, for example:

369295616
1195725856
369295616
50331695
1195725856
369295616
1431520594
50331695
50331686
1195725856
50331695
50331695
50331695
1212498244
1195725856
and so on.

Any idea on what is going on?

@Ry-DS
Copy link

Ry-DS commented Jun 8, 2021

Using Log.TRACE() from minlog can help you debug and see what kind of object is causing this problem.
My guess is that you have a circular dependency (A has B as a property, but B also has A as a property).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants