PC-Logix / LanteaCraft

A Stargate-themed mod for Minecraft
http://lanteacraft.com
Other
43 stars 21 forks source link

server crash, warez join server with online-mode #442

Closed Cronosus closed 8 years ago

Cronosus commented 8 years ago

repeated three-times, then i post it here http://cronos.wz.cz/mc/gc/crash-2016-06-12_10.45.38-server.txt

adit, cause found -when someone with warez try to join my server (online-mode) and is kicked, server crashing crash: http://cronos.wz.cz/mc/err/crash-2016-06-15_21.39.15-server.txt log: http://cronos.wz.cz/mc/err/2016-06-15-3.log

StargateMC commented 8 years ago

Warez meaning a cracked client? interesting.

AfterLifeLochie commented 8 years ago

The links have rotted so I've no idea why this happens, but it's probably because we internally use the player's UID; if you're playing with a cracked client then you don't have one for us to work with.

It probably shouldn't crash, but...

Cronosus commented 8 years ago

i tried compile latest version here and looks fixed... just "released" version have this problem.

AfterLifeLochie commented 8 years ago

I'm not quite sure what you mean -- are you saying that if you compile LC yourself (including the coremod) and place it in the client it works, but the version we've compiled doesn't work?

Cronosus commented 8 years ago

problem was here https://github.com/PC-Logix/LanteaCraft/blob/lc-1.7.10/src/main/java/lc/common/network/LCNetworkController.java#L106

actual version looks like this: https://github.com/PC-Logix/LanteaCraft/blob/master/src/main/java/lc/common/network/LCNetworkController.java#L94

these crashes i already deleted with server, then i can not show it

AfterLifeLochie commented 8 years ago

The actual version you're looking at is the HEAD, which is currently set for the update to 1.8. The current code which we're building is the lc-1.7.0 branch.

The reason the bug exists is because LCNetworkController#players might not contain the player being provided to it. In the version you describe as the "actual version" you're seeing a bug; the network player we create must be .shutdown(player); if it exists. The actual version doesn't do this, which leaves our networking active (though not connected to any actual player!).

A simple call to containsKey would fix the problem, but, I don't understand why a network player wouldn't have been created since playerConnected should always guarantee this from Forge.

The reason I'm not sure what is going on in your environment is because:

If you can provide fully detailed logs I can probably figure out what is going on and modify LanteaCraft to handle the situation more gracefully (since this isn't a situation I had considered when designing the networking engine), but in no way am I condoning using pirated copies of the game.

Cronosus commented 8 years ago

ah,.. found it http://cronos.wz.cz/mc/crash-2016-04-01_19.59.52-server.txt ad. server was in Online mode, warez player just tried to login, server crash when was kicked and as i see, sometimes happened with online to,... http://cronos.wz.cz/mc/2016-04-01-4.log

AfterLifeLochie commented 8 years ago

I'm not sure why the player is being disconnected, but the issue looks purely tied to the case where the player disconnects before PlayerLoggedInEvent can fire for some reason.

Cronosus commented 8 years ago

yes.. as i say, it was later on server caused, when warez tried to join, but server kicked him before logged