Open plaza-in-a-heatwave opened 4 years ago
Looks like the name field: String name = p.readByteString();
is to blame in PlayerLoginPacket.java:22.
But there doesn't seem to be a way to make this name field longer client-side.
Could one of the packet definition numbers have got mixed up? are we sending "type 0" for some packets by mistake?
Could this be players trying to login with an invalid version (e.g getdown fails or autoupdate=off)? Nope users confirmed they were prompted to update before this
It looks like the original user gets the out-of-bounds error, while other uses (like me below) just cant get past the "loading maps" stage. Channel exception caught: An existing connection was forcibly closed by the remote host
means the client timed it out after 8s.
[2020-11-01T16:25:43.371Z]: [player joined] New player added to channel 127.0.0.1. Registered players:0/1.
[2020-11-01T16:25:43.480Z]: [auth] /127.0.0.1:46054 provided correct code
[2020-11-01T16:25:43.480Z]: [player joined] Registered player "player1", defender, junk joined on 127.0.0.1. Registered players:1/1.
[2020-11-01T16:25:43.480Z]: [chat] <cadesim_broadcast>:Welcome player1 (defender)
[2020-11-01T16:25:43.480Z]: [chat] <cadesim_broadcast>:Players in server: 1 ( Att. 0, Def. 1)
Attackers:
-
Defenders:
player1 (junk)
[2020-11-01T16:25:43.480Z]: [chat] <cadesim_private>(to player1):The following Cadesim commands are supported: /propose, /vote, /info, /show
[2020-11-01T16:25:43.527Z]: null
[2020-11-01T16:25:44.480Z]: INFO: player player1 is lagged, sending catch up packets...
[2020-11-01T16:30:33.558Z]: Channel exception caught: An existing connection was forcibly closed by the remote host
[2020-11-01T16:30:33.590Z]: [chat] <cadesim_broadcast>:Goodbye player1 (defender)
[2020-11-01T16:30:33.590Z]: [chat] <cadesim_broadcast>:Players in server: 0 ( Att. 0, Def. 0)
Attackers:
-
Defenders:
-
[2020-11-01T16:30:33.590Z]: [player left] De-registered and logged out player "player1", 127.0.0.1. Registered players:0/0.
[2020-11-01T16:30:33.590Z]: [chat] <cadesim_broadcast>:Round ended, final scores were:
Defender:0
Attacker:0
[2020-11-01T16:30:33.590Z]: Ending game #13.
The fact that other users can't access the sim while the original person gets the error makes sense. The entire packet stack crashes (until it is renewed after the round) so everyone else's packets are not processed and the client times out in the usual way.
another trace:
[2020-11-06T12:13:48.166Z]: [player joined] New player added to channel <ipaddr1>. Registered players:0/1.
[2020-11-06T12:13:48.228Z]: [auth] /<ipaddr1>:<port1> provided correct code
[2020-11-06T12:13:48.244Z]: [player joined] Registered player "player1", attacker, warfrig joined on <ipaddr1>. Registered players:1/1.
[2020-11-06T12:13:48.260Z]: [chat] <cadesim_broadcast>:Welcome player1 (attacker)
[2020-11-06T12:13:48.260Z]: [chat] <cadesim_private>(to player1):The following Cadesim commands are supported: /propose, /vote, /info, /show
[2020-11-06T12:13:49.228Z]: INFO: player player1 is lagged, sending catch up packets...
[2020-11-06T12:13:59.026Z]: [chat] player1:/propose gameSettings
[2020-11-06T12:13:59.026Z]: [chat] <cadesim_broadcast>:Started vote on gamesettings
[2020-11-06T12:13:59.026Z]: [chat] <cadesim_private>(to player1):You voted FOR gamesettings
[2020-11-06T12:13:59.026Z]: [chat] <cadesim_broadcast>:Vote on gamesettings -
1 players eligible
1 votes cast (1-0)
0+ votes wins
60 seconds left to vote
[2020-11-06T12:13:59.026Z]: [chat] <cadesim_broadcast>:Vote gamesettings passed 1-0. It will take effect when the current turn/break is over.
[2020-11-06T12:14:00.228Z]: [chat] <cadesim_broadcast>:Round ended, final scores were:
Defender:0
Attacker:0
[2020-11-06T12:14:00.228Z]: Ending game #0.
[2020-11-06T12:14:00.228Z]: pre-generated the next map name in rotation: 2v2-willepi-2.txt
[2020-11-06T12:14:00.228Z]: Players voted to switch map; rotated map to: 2v2-xio-1.txt
[2020-11-06T12:14:00.228Z]: [chat] <cadesim_broadcast>:the temporary settings are still applied this round. Vote restart to clear them, or wait for the round to end naturally.
[2020-11-06T12:14:00.244Z]: [chat] <cadesim_broadcast>:Started new round: #2
[2020-11-06T12:14:09.729Z]: [chat] <cadesim_broadcast>:Goodbye player1 (attacker)
[2020-11-06T12:14:09.729Z]: [chat] <cadesim_broadcast>:Players in server: 0 ( Att. 0, Def. 0)
Attackers:
-
Defenders:
-
[2020-11-06T12:14:09.729Z]: [player left] De-registered and logged out player "player1", <ipaddr1>. Registered players:0/0.
[2020-11-06T12:14:09.729Z]: [chat] <cadesim_broadcast>:Round ended, final scores were:
Defender:0
Attacker:0
[2020-11-06T12:14:09.729Z]: Ending game #1.
[2020-11-06T12:14:09.729Z]: [chat] <cadesim_broadcast>:all temporary settings were reverted
[2020-11-06T12:14:09.729Z]: [chat] <cadesim_broadcast>:Started new round: #3
[2020-11-06T12:14:14.197Z]: [player joined] New player added to channel <ipaddr1>. Registered players:0/1.
[2020-11-06T12:14:14.229Z]: [auth] /<ipaddr1>:<port2> provided correct code
[2020-11-06T12:14:14.229Z]: [player joined] Registered player "player1", attacker, warfrig joined on <ipaddr1>. Registered players:1/1.
[2020-11-06T12:14:14.229Z]: [chat] <cadesim_broadcast>:Welcome player1 (attacker)
[2020-11-06T12:14:14.229Z]: [chat] <cadesim_private>(to player1):The following Cadesim commands are supported: /propose, /vote, /info, /show
[2020-11-06T12:14:15.127Z]: INFO: player player1 is lagged, sending catch up packets...
[2020-11-06T12:14:30.932Z]: WARNING - malformed packet with valid opcode from /<ipaddr1>:<port2> error message: readerIndex(34) + length(4) exceeds writerIndex(34): PooledUnsafeDirectByteBuf(ridx: 34, widx: 34, cap: 34), java.lang.IndexOutOfBoundsException (player was kicked, see trace)
java.lang.IndexOutOfBoundsException: readerIndex(34) + length(4) exceeds writerIndex(34): PooledUnsafeDirectByteBuf(ridx: 34, widx: 34, cap: 34)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1395)
at io.netty.buffer.AbstractByteBuf.readInt(AbstractByteBuf.java:766)
at com.benberi.cadesim.server.codec.util.Packet.readInt(Packet.java:70)
at com.benberi.cadesim.server.codec.packet.in.ReceiveSettingsPacket.execute(ReceiveSettingsPacket.java:46)
at com.benberi.cadesim.server.codec.packet.ServerPacketManager.process(ServerPacketManager.java:106)
at com.benberi.cadesim.server.model.player.PlayerPacketManager.queueIncomingPackets(PlayerPacketManager.java:325)
at com.benberi.cadesim.server.codec.packet.ServerPacketManager.queuePackets(ServerPacketManager.java:47)
at com.benberi.cadesim.server.service.GameService.run(GameService.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[2020-11-06T12:14:30.932Z]: [chat] <cadesim_broadcast>:Goodbye player1 (attacker)
[2020-11-06T12:14:30.932Z]: [chat] <cadesim_broadcast>:Players in server: 0 ( Att. 0, Def. 0)
Attackers:
-
Defenders:
-
[2020-11-06T12:14:30.932Z]: [player left] De-registered and logged out player "player1", <ipaddr1>. Registered players:0/0.
[2020-11-06T12:14:30.932Z]: [chat] <cadesim_broadcast>:Round ended, final scores were:
Defender:0
Attacker:0
[2020-11-06T12:14:30.932Z]: Ending game #2.
[2020-11-06T12:14:30.932Z]: [chat] <cadesim_broadcast>:all temporary settings were reverted
[2020-11-06T12:14:30.932Z]: [chat] <cadesim_broadcast>:Started new round: #4
[2020-11-06T12:15:28.089Z]: [player joined] New player added to channel <ipaddr1>. Registered players:0/1.
[2020-11-06T12:15:28.135Z]: [auth] /<ipaddr1>:<port3> provided correct code
[2020-11-06T12:15:28.135Z]: [player joined] Registered player "player1", attacker, warfrig joined on <ipaddr1>. Registered players:1/1.
[2020-11-06T12:15:28.135Z]: [chat] <cadesim_broadcast>:Welcome player1 (attacker)
[2020-11-06T12:15:28.135Z]: [chat] <cadesim_private>(to player1):The following Cadesim commands are supported: /propose, /vote, /info, /show
[2020-11-06T12:15:51.229Z]: [chat] <cadesim_broadcast>:Goodbye player1 (attacker)
[2020-11-06T12:15:51.229Z]: [chat] <cadesim_broadcast>:Players in server: 0 ( Att. 0, Def. 0)
Attackers:
-
Defenders:
-
[2020-11-06T12:15:51.229Z]: [player left] De-registered and logged out player "player1", <ipaddr1>. Registered players:0/0.
[2020-11-06T12:15:51.229Z]: [chat] <cadesim_broadcast>:Round ended, final scores were:
Defender:0
Attacker:0
[2020-11-06T12:15:51.229Z]: Ending game #3.
[2020-11-06T12:15:51.229Z]: [chat] <cadesim_broadcast>:all temporary settings were reverted
[2020-11-06T12:15:51.229Z]: [chat] <cadesim_broadcast>:Started new round: #5
[2020-11-06T12:15:57.542Z]: [player joined] New player added to channel <ipaddr1>. Registered players:0/1.
[2020-11-06T12:15:57.635Z]: [auth] /<ipaddr1>:<port4> provided correct code
[2020-11-06T12:15:57.635Z]: [player joined] Registered player "player1", attacker, warfrig joined on <ipaddr1>. Registered players:1/1.
[2020-11-06T12:15:57.635Z]: [chat] <cadesim_broadcast>:Welcome player1 (attacker)
[2020-11-06T12:15:57.635Z]: [chat] <cadesim_private>(to player1):The following Cadesim commands are supported: /propose, /vote, /info, /show
[2020-11-06T12:15:58.229Z]: INFO: player player1 is lagged, sending catch up packets...
[2020-11-06T12:16:04.400Z]: Channel exception caught: An existing connection was forcibly closed by the remote host
[2020-11-06T12:16:04.432Z]: [chat] <cadesim_broadcast>:Goodbye player1 (attacker)
[2020-11-06T12:16:04.432Z]: [chat] <cadesim_broadcast>:Players in server: 0 ( Att. 0, Def. 0)
Attackers:
-
Defenders:
-
[2020-11-06T12:16:04.432Z]: [player left] De-registered and logged out player "player1", <ipaddr1>. Registered players:0/0.
[2020-11-06T12:16:04.432Z]: [chat] <cadesim_broadcast>:Round ended, final scores were:
Defender:0
Attacker:0
[2020-11-06T12:16:04.432Z]: Ending game #4.
[2020-11-06T12:16:04.432Z]: [chat] <cadesim_broadcast>:all temporary settings were reverted
This last instance could be because an update was pushed while the user was in the sim. To fix it, we would need to check for updates on login once again.
Possibly send map screenshots in sections or remove all together.
Related #72
two users have reported this happening - and observed from a third user
The server resets itself after the map ends. The current round keeps ticking because the player (who proposed the settings) seems to get stuck logged in, so it doesn't normally end the round (as it would when there are 0 players left).