broese / mcbuild

A custom Minecraft client with advanced auto-building capabilities
26 stars 11 forks source link

high memory use? #8

Closed syrianrue closed 7 years ago

syrianrue commented 7 years ago

i just updated to the newest version and now it just keep running up the memory usage without stopping. is anyone else having this problem? also im on arch linux and just cloned the git and compiled hoping a fresh copy might help.

broese commented 7 years ago

There has been a change in the Entity metadata format, so it could be I introduced a memory leak when decoding packets containing it. I will check on this issue with valgrind. Do you observe it on any 1.12 servers or just some specific ones?

syrianrue commented 7 years ago

it was 1.11.2 on a mostly vanilla server.

syrianrue commented 7 years ago

update: this does seem to be server specific as it doesnt seem to be happening while im on another server. though i am getting INV ERROR very often. this is a less vanilla server.

broese commented 7 years ago

Sorry for the delay, finally got time to fix it. Looks like the breakage was caused by incorrect mapping of the packet types to the table describing their decoding/encoding/dumping/freeing routines for each supported protocol version. Playing on 1.11 caused memory leaks because the protocol handler could not find the free_packet method for some packets, while 1.12 should have been fine. On some servers, this led to quick memory exhaustion. Please check if you still see this issue.