yasin1913 / kryonet

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

ConcurrentModificationException upon disconnect of 3 or more Client #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I guess, that some clients are disconnecting at the same time. (It always 
happens upon the end of our game, when the players disconnect. Requires 3 or 
more connected players.)

What is the expected output? What do you see instead?
No CME ;-)

What version of the product are you using? On what operating system?
kryonet_1.04
Windows 7 x64 & OSX Lion
Java7 (x64 & x32) & Java7u4 (x64 & x32)

Please provide any additional information below.

Exception in thread "ServerServiceContext" 
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
at java.util.HashMap$KeyIterator.next(HashMap.java:841)
at com.esotericsoftware.kryonet.Server.update(Server.java:174)
at com.esotericsoftware.kryonet.Server.run(Server.java:336)
at 
ch.xxx.xxx.net.server.impl2.ServerServiceContext.run(ServerServiceContext.java:1
56)
at 
com.google.common.util.concurrent.AbstractExecutionThreadService$1$1.run(Abstrac
tExecutionThreadService.java:52)
at java.lang.Thread.run(Thread.java:722)

Original issue reported on code.google.com by cimn...@gmail.com on 1 May 2012 at 9:20

GoogleCodeExporter commented 8 years ago
Reproducible on Windows 7 x32, too

Original comment by cimn...@gmail.com on 1 May 2012 at 9:22

GoogleCodeExporter commented 8 years ago
Can you make a reproducible test case? You could base it on one of the tests in 
SVN. This issue will be very hard to verify a fix without that.

Original comment by nathan.s...@gmail.com on 1 May 2012 at 5:11

GoogleCodeExporter commented 8 years ago
The HashMap is in a synchronized block and this should not occur. Will address 
if I can reproduce.

Original comment by nathan.s...@gmail.com on 23 May 2012 at 10:56

GoogleCodeExporter commented 8 years ago
Sorry, I really wanted to provide an example, but I don't have time and we 
worked around it somehow.

Regards, Chris

Btw, you should mention somewhere, that for the AutoDiscovery to work, both, 
client and server, have to bind to the same UDP Port.

Original comment by chrigim...@gmail.com on 25 Jul 2012 at 7:24