mojira.dev
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 @unknown with further explanation of this bug can be found in MC-216347.

Linked issues

Attachments

Comments

galaxy_2alex

Probably intended, since the skin downloading is not instant.

kumasasa

Where's the differenct to MC-52653 ? Edit: Removed loop in the space-time-continuum

@unknown wrote there today

Fixed in 14w32b.

[Mod] redstonehelper

You linked the wrong bug, I think. Anyway, the difference to that one is my reported bug only happens when initially❓ giving a player head, the other bug happens anytime when placing any player head.

edit: You meant to link MC-52653.

kumasasa

Ok.

marcono1234

Confirmed for

  • 1.8 Probably everytime the game loads skulls (also when old worlds with skulls gets opened in newer versions)

  • 1.8.3

marcono1234

How is this a duplicate?
The problem in MC-79439 is that it tests for every skull if there is an internet connection even though there is no.

This bug here happens also in Online Mode!!

galaxy_2alex

Reopened

[Mod] redstonehelper

Reopening, updating description to 15w46a.

Thomas Hall

Bug persists in 1.9.2, also applies when spawning mobs with skulls on their heads or in hands.

mezz

Confirmed in snapshot 16w50a

Thomas Hall

confirmed for 18w07c

Mad Cat

As updated in the description, I've possibly found the cause for this lag spike in MC-132437.

To summarize, this has to do with a call to the profile service that seems to be handled poorly.

Kraif

Confirmed for 1.13.1. Please, update the command in the description:

/give @p minecraft:player_head{SkullOwner:jeb_}
ic22487

Confirmed for 1.14.3 (i dont visit the snapshots very often but i havent seen it in the bugs fixed section so its probably still there) also the case here is the player heads have been placed down and are causing more lag than the 450+ item frames that they took the place of. Each one is different than the rest. Hope this gets resolved soon!

Quipsi Quips

This bug still in 1.16.1!

And also include player_heads on an armor stand.

izyiac

I can also confirm in 1.16.1 - On my server I had 15 heads that had been generated poorly by an outdated data pack, and they caused lag spikes of 1-3 seconds whenever they were loaded. Mining the heads and storing them in a chest fixed the issue.

Edit: clarity

liach

At least by 20w27a, the player head block entity attempts to load skin information on the server thread with a call to MinecraftSessionService.fillProfileProperties (with a true parameter) (usually implemented by yggdrasil) which will effectively block ticking on the server thread until the Minecraft server receives a response from the authentication server.

Most other calls to this fill profile properties are made on non-ticking threads, such as in executors on the client. This may be addressed like lighting where the block entity information is updated when the fetching of data completes asynchrously; however, it would potentially break commands expecting skull information to stay constant after generation from a command (such as setblock)

nathanv

Can confirm for Minecraft 1.16.3

[Mod] markderickson

Can confirm in 20w51a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 21w05b.

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w07a.

MisteryGates

To me it is even more weird. The skins of mob heads do not load in.

Avoma

Can confirm in 21w11a.

Brevort

Can this be reproduced twice in a row with the same skull? And is it 100% consistent? (If the answer is no to both this bug seems similar to a few other bugs, one of which may have caused this one)

Noah Feustel

Is still present in newest release Verison; doesn't seem to be fixed.

[Mod] redstonehelper

slicedlime

Confirmed

Important

Performance, Textures and models

freeze, give, giving, head, mojang_internal_1, player, skull, skullowner, texture

Minecraft 14w32a, Minecraft 14w32b, Minecraft 14w32d, Minecraft 14w33a, Minecraft 14w33b, ..., 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a

1.17 Pre-release 1

Retrieved