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

Game crashes when shift-clicking a newly named item out of an anvil

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 19w03a
    • Minecraft 18w50a, Minecraft 19w02a
    • None
    • Confirmed

      The bug

      When naming a previously unnamed item of any type, when I attempt to shift-click it out of the anvil, the game crashes. This happens more often when the item name is very long or contains non-letter characters, such as - or +.

      How to reproduce

      1. Get an anvil and a diamond sword.
      2. Give yourself some xp.
        /xp add @s 500
        
      3. Put the diamond sword into the anvil, and rename the sword to:
        ABC123456789101112
        

        Your game crashes.

      Crash report

      Description: Rendering screen
      
      java.lang.StringIndexOutOfBoundsException: String index out of range: -16
      	at java.lang.String.substring(String.java:1919)
      	at cqm.a(SourceFile:405)
      	at cum.a(SourceFile:133)
      	at dea.a(SourceFile:794)
      	at cpk.d(SourceFile:910)
      	at cpk.b(SourceFile:394)
      	at net.minecraft.client.main.Main.main(SourceFile:154)
      

            boq [Mojang] Bartosz Bok
            SailorDoge Random Guyson
            Votes:
            8 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: