On my server the join and leave messages contain a player head, and every so often some players get kicked to the crash screen when someone connects.
It's maybe 1 in 10-15 joins, and it only hits a few clients at a time rather than everyone, which is what made me look at threading.
The crash is a ConcurrentModificationException coming out of the profile lookup for the head. As far as I can tell from the stack trace, the head profile is resolved on a worker thread: ResolvableProfile$Dynamic#resolveProfile runs inside a CompletableFuture. When the profile is given by name, ProfileResolver#fetchByNameOrId goes down the Either.left branch to LocalPlayerResolver#fetchByName, which ends up in ClientPacketListener#getPlayerInfoIgnoreCase.
That last method walks the player info map with a for-each, because it has to compare names case-insensitively. Meanwhile the main thread is adding and removing entries in that same map as player info packets arrive. If someone joins or leaves at the wrong moment, the iterator throws and the client dies.
Linked issues
is duplicated by 1
Comments 4
Description: Render Frame
java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1606)
at java.base/java.util.HashMap$ValueIterator.next(HashMap.java:1634)
at net.minecraft.client.multiplayer.ClientPacketListener.getPlayerInfoIgnoreCase(ClientPacketListener.java:2562)
at net.minecraft.client.player.LocalPlayerResolver.fetchByName(LocalPlayerResolver.java:28)
at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
at net.minecraft.server.players.ProfileResolver.fetchByNameOrId(ProfileResolver.java:25)
at net.minecraft.world.item.component.ResolvableProfile$Dynamic.lambda$resolveProfile$0(ResolvableProfile.java:225)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1789)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.base/java.lang.Thread.run(Thread.java:1474)Players regularly get crashed on our server, where we have frequent tab list additions, and send unresolved profiles in chat and in player head items.
We do not have enough information to reproduce this issue.
Please include the following information to help us understand your problem:
Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.
Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.
Please attach the crash report found in
minecraft/crash-reports/crash-<DATE>-client.txthere.If you cannot find a crash report, please attach the full launcher log found in
minecraft/launcher_log.txt.This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki