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

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 18w50a, Minecraft 19w02a
    • Fix Version/s: Minecraft 19w03a
    • Labels:
      None
    • Confirmation Status:
      Confirmed

      Description

      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)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                boq [Mojang] Bartosz Bok
                Reporter:
                SailorDoge Random Guyson
              • Votes:
                8 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: