EsotericSoftware / EsotericSoftware/kryonet

Oversized buffer

Open
#107 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
411
PR merge metrics
No merged PRs in 30d

Description

10-04 16:35:29.974 5730-5830/com.drkmns.gameloopballs E/AndroidRuntime: FATAL EXCEPTION: Thread-8160
10-04 16:35:29.974 5730-5830/com.drkmns.gameloopballs E/AndroidRuntime: Process: com.drkmns.gameloopballs, PID: 5730
10-04 16:35:29.974 5730-5830/com.drkmns.gameloopballs E/AndroidRuntime: com.esotericsoftware.kryo.KryoException: Buffer overflow. Available: 0, required: 9

So. I've tried everywhere - on Stackoverflow, on googlegroups - EVERYWHERE.

Tried with changing the buffer size in both server's and client's constructors. Tried with emulators, tablets and phones.

On localhost and android emulator everything is running well. When I put the server on a real machine this exception comes. (Also, it's not working on a Samsung Galaxy S4).

This is the first code which was not working:

```
name = "MOJANAZWA";
Login login = new Login();
login.name = name;
client.sendTCP(login);
TestPacket test = new TestPacket();
while (true) {

test.msg = "33333333333333";
client.sendTCP(test);
}
```

I've added this and it works (but I think it's a bad solution):

while (true) {

```
test.msg = "55555444444444444444444444444444444444444444444444444444444444444455";
client.sendTCP(test);
synchronized (client) {
try {
client.wait(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
```

Is there someone that could help me?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.