Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-88349

Client Memory leak: Map data does not get garbage-collected


    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 15w37a
    • Minecraft 1.8.8
    • Unconfirmed

      When I say maps, I mean the maps you can hold in your hands, the item.
      When a client joins a multiplayer server, map data seems to not get garbage collected.

      After leaving the server the map data seems to stay in memory. Its probably about 1 gb of data in that case, that does not get garbage collected even after visualvm forced garbage collection.
      VisualVM Visual GC plugin says the memory increase is in the old gen (and the number of collections increaes after gc-forcing).
      The memory sampler says the memory usage is in int arrays (int[]).

      Here is the link to a heap dump after leaving the server and joining and leaving a singleplayer world afterwards (vanilla 1.8.8 Minecraft client): https://www.dropbox.com/s/tec777ijdd0e1mi/heapdump-1441868645031-minecraft-map-memleak-without-optifine.7z?dl=0

      After joining and leaving a singleplayer world (joining another multiplayer does not change anything), the memory usage decreases about 200mb (works only once).

      Rejoining the same server with so many map data sent to the client causes the client to use up another gb of ram.

      Default texture pack used.

      Things I used, maybe irrelevant:
      The server I am joining on is running spigot 1.8.8 behind bungeecord. The server uses the plugin AnimatedFrames where I included a gif with about 800 frames, the plugin says its about 12270 maps (as its displayed on 15 frames, 5x3). The gif I used is this one (strechted by the plugin to 640x384): http://bit.ly/1Niy1EL

            grum [Mojang] Grum (Erik Broes)
            janmm14 Janmm14
            0 Vote for this issue
            3 Start watching this issue