Originally Posted by
Kris
Pretty much sums it up. That's what you get for hard-coding the client so badly. Obviously got no clue as to what may cause this but I suggest you use some tools (JProfiler for example) to find memory leaks in the client, after which I suppose you can attempt to resolve them.
Ended up not even being a memory leak lol, I used j profiler for a few weeks just to see any leaks and I never went over 300mb. It was actually server sided in the player.java file
Code:
@Override
public void process() throws Exception {
if (Math.abs(World.getCycles() - client.getLastPacketTime()) >= 9) {
if (getCombat().inCombat() && !getCombat().getLastAttackedBy().isNpc()) {
if (timeout == 0) {
timeout = System.currentTimeMillis() + 180000;
} else if (timeout <= System.currentTimeMillis() || !getCombat().inCombat()) {
// logout(false);
System.out.println("Player timed out: " + getUsername());
}
} else {
System.out.println("Player timed out: " + getUsername());
// logout(false);
}
}
Right there to be exact.
Originally Posted by
i dds you
Have to say I kind of notice this, When some players go to vote etc... but with a decent PC they're usually fine.
Would love if you could share a fix, if found
Code:
@Override
public void process() throws Exception {
if (Math.abs(World.getCycles() - client.getLastPacketTime()) >= 9) {
if (getCombat().inCombat() && !getCombat().getLastAttackedBy().isNpc()) {
if (timeout == 0) {
timeout = System.currentTimeMillis() + 180000;
} else if (timeout <= System.currentTimeMillis() || !getCombat().inCombat()) {
// logout(false);
System.out.println("Player timed out: " + getUsername());
}
} else {
System.out.println("Player timed out: " + getUsername());
// logout(false);
}
}
In player.java
Just commented out the logout(false); to debug and it fixed it. Not sure what bugs this would cause, I've been testing them ingame and nothing wrong so far. I have noticed the message when looking at the terminal so it's confirmed the thing that was kicking players when doing background stuff