Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-126302

Game freezes if splash text 231 is the only one in splashes.txt

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 19w06a
    • Minecraft 1.12.2, Minecraft 18w08b, Minecraft 18w09a, Minecraft 18w10c, Minecraft 18w10d, Minecraft 18w11a, Minecraft 18w16a, Minecraft 1.13-pre1, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.1
    • None
    • Microsoft Windows [Version 10.0.15063]
      Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz, 3.40 GHz
      64-bit operating system, x64-based processor; 8.00 GB RAM
      NVIDIA GeForce GT 630; GeForce Game Ready Driver Version 385.28
      Java 1.8.0_25 (64-bit)
    • Confirmed

      The bug

      The game freezes because of being caught in an endless loop if splash text 231 (This message will never appear on the splash screen, isn't that weird?) is the only splash text in the splashes.txt file.

      How to reproduce

      1. Download the attached resource pack
      2. Put the resource pack into the resource pack folder of Minecraft
      3. Start up Minecraft and activate the resource pack
      4. Restart Minecraft; the game will freeze as soon as it tries to load into the main menu

      (Simply remove the resource pack from the resource pack folder to get Minecraft to work again)

      Code analysis

      The following code analysis is based on a decompiled version of Minecraft 1.12.2 using MCP 9.40pre-1 with new mappings.

      Bemoty: The constructor of net.minecraft.client.gui.GuiMainMenu simply picks a random splash from the splashes.txt file until it finds one which doesn't have the Java hashCode() "125780783". So, if there is only one splash text in the splashes file and it has this hash code, the game will stay in a while(true)-loop forever. (or until the JVM process is killed, heh)

      Suggested fix

      Splash texts which should be ignored (like the one with hash code 125780783) should already be skipped when filling the list of splash texts from the text file. Then there is no loop needed when randomly picking a text from this list.

        1. whatishang_24_02_2018_15_50_48.txt
          198 kB
          [Mod] bemoty

            dinnerbone [Mojang] Nathan Adams
            bemoty [Mod] bemoty
            Votes:
            8 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: