![ServerSync](https://media.forgecdn.net/avatars/thumbnails/254/696/256/256/637199290945083080.png)
Extreme Console Spam Cannot Upload to Gist Please help @.@
P3rf3ctXZer0 opened this issue ยท 8 comments
Okay so same issues that you thought caused sanity check fails may also be causing this (I have no idea what a sanity check is.) At any rate when this happens the server hangs and must be killed not closed.
Sanity checks are pieces of logic that should never need to be executed, things like:
- load a file
- check if file is a file (shouldn't happen as you just loaded a file)
Interesting the log highlights a totally separate problem, language checks are not handling lowercase versions of the codes (en_us != en_US)
[STDOUT/com.superzanti.serversync]: [com.superzanti.serversync.ServerSetup:run:140]: socket alredy bound at: 38067
Potentially relevant line (Ignore my rambling if you like, am using it to keep track of information mostly)
Seems to be hitting a null pointer inside a loop, creates an endless lock of attempting to access a non-existent resource
ServerSetup.java
while (true) {
try {
Socket socket = server.accept();
ServerWorker sc = new ServerWorker(socket, server, generateServerMessages());;
Thread clientThread = new Thread(sc);
clientThread.setName("ClientThread - " + socket.getInetAddress());
clientThread.start();
} catch (Exception e) {
e.printStackTrace();
}
}
Presumably server is null here for some reason, probably related to the socket binding.
This chunk of code really needs an update regardless, pretty dangerous to just globally catch generic exceptions.