Mojira Archive
MC-155611

ConcurrentModificationException when listing LAN servers

When I manually send 'falsified' unique LAN server announcements packets at a rate of 100 per second, any minecraft instance running on my home network starts listing them in the multiplayer menu and after ~2 to 50 seconds depending on the machine, the game throws a ConcurrentModificationException and crashes.

The packets are sent on 224.0.2.60:4445 using UDP and each of them is 1024 bytes long with a 10 character long port number to make it appear unique to other Minecraft instances, and the rest of the packet is used by the MOTD and the delimiters. ([MOTD], [AD], ...).

I created a GitHub repository with a Python and PureBasic example:
https://github.com/aziascreations/MC-155611-Bug-Demonstration

Update: After more tests, I noticed that if you lower the delay between each packet to 1ms, and emit them from the machine the game is running on, the crash is nearly instantaneous.

Description: Ticking screen

java.util.ConcurrentModificationException
	at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
	at java.util.ArrayList$Itr.next(ArrayList.java:851)
	at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
	at dcd.a(SourceFile:101)
	at dcc.tick(SourceFile:121)
	at cvo.aP(SourceFile:1402)
	at cvo$$Lambda$1667/1398063054.run(Unknown Source)
	at czx.wrapScreenError(SourceFile:441)
	at cvo.m(SourceFile:1402)
	at cvo.e(SourceFile:925)
	at cvo.b(SourceFile:411)
	at net.minecraft.client.main.Main.main(SourceFile:154)

Fixed

Herwin Bozet

2019-06-29, 08:03 PM

2023-05-29, 07:13 PM

2023-05-29, 07:13 PM

1

3

Community Consensus

Important

Crash

Minecraft 1.14.3 - 21w37aMinecraft 1.14.3, 1.14.4, 1.16.3, 1.17.1, 21w37a

22w42a