Minecraft can crash in race certain conditions in multiplayer mode
Description: The debug-screen entry list is exposed by reference and iterated with a fail-fast iterator while it can be structurally rebuilt at the same time.
DebugScreenEntryList#getCurrentlyEnabled()returns the internalArrayListdirectly (no defensive copy).DebugScreenOverlay#extractRenderState()iterates that list with a for-each during render-state extraction.DebugScreenEntryList#rebuildCurrentList()doesclear()+add()+sort()on the same list. It is triggered by toggling the overlay (F3 / the F3 chart shortcuts), the reducedDebugInfo option, andLocalPlayer#setReducedDebugInfo()from server packets (login/abilities). When a rebuild lands during the extract iteration, the iterator throwsConcurrentModificationExceptionand the client crashes.
Thank you for helping us improve Minecraft! We saved your files: