Mojira Archive
MC-65587

Lag spike while loading player head textures/player skins

There is a massive lagspike while the game tries to load a player head texture. This can even lead to the game completely freezing if the game is in offline mode or the player the skin is supposed to be loaded from doesn't exist.

To reproduce

Existing player

  1. Delete the skin cache in .minecraft/assets/skins
  2. Run
    /give @s minecraft:player_head{SkullOwner:jeb_}

    If you're offline, your game will freeze completely, otherwise it will take a second or two before the skin is loaded and the game continues.

Non-existing player

(from MC-216347)

  1. Run
    /give @s minecraft:player_head{"SkullOwner":{"Name":"Notarealplayersnameplsfixthismojang","Properties":{"textures":[{"Value":"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmQzNGIzZTI3YTNmZTUzODI3YjM3YWQ1OTU2YWNjYTA4ZjI4NjNjNjkyNmNjOTcxMTZkZGEzMzQ4Njk3YTVhOSJ9fX0"}]}}}
  2. Place the player head down
    The game freezes

Note

For some more detailed explanation read the content of the duplicate MC-132437.

Code analysis

A code analysis by Sollace with further explanation of this bug can be found in MC-216347.