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

Game crashes if there is no en_pt language and "excitedze" is typed in the search bar in the recipe book / java.lang.NullPointerException: Cannot read field "a" because "$$0" is null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.17.1, 1.18 Pre-release 6
    • None
    • Confirmed
    • Crash

      I mean, even the most obscure crash cases in the game need to be fixed, right?

      If the asset index the game is provided with does not contain the en_pt language, and no loaded resource pack contains it either, then typing "excitedze" in the search bar in the recipe book causes the game to crash.

      I have attached a crash report from 1.17.1 and one from 1.18-pre6.

      How to reproduce:

      You'll probably think that this is basically modding the game, but no client.jar will be harmed during this reproduction process. We're just changing what assets the game loads with.

      1. Locate your .minecraft folder, and open the "versions" folder.
      2. Select the version you want to test this with and duplicate its folder.
      3. Rename the folder and all the files in it to a name of your choice, but the folder and the files have to be named exactly the same.
      4. Open the .json file found in the folder.
      5. Find the "id" tag and change its value to the exact same name you used in step 3.
      6. Find the "assetIndex" tag and delete it, so the launcher won't download the vanilla asset index.
      7. Find the "assets" tag and change its value to something different to what it already is. Note down this value somewhere, because it is also needed somewhere else.
      8. Save the file.
      9. Go back to the main .minecraft folder and open the "assets" folder.
      10. Go to the "objects" folder, and find "de".
      11. Paste the attached de72b2154ed663a6f2fb8485eeca928e88a451e4.json file in the "de" folder, after removing its file extension.
      12. Go back to the "assets" folder, and open "indexes".
      13. Duplicate the .json file with the same name as what the value of "assets" from step 7 was, and rename the copy to the value you set it to (the one you noted down).
      14. Open this copy and find the "pack.mcmeta" tag. Change the value of its "hash" to de72b2154ed663a6f2fb8485eeca928e88a451e4, and the value of its "size" to 106.
      15. Save the file.
      16. Open the Minecraft launcher and create a new installation with the version you made in steps 1-8.
      17. Launch the version.
      18. Go to the languages menu. If you see no languages, you have done all the steps correctly. If you see a lot of languages, you did something wrong.
      19. Go to a world, place down a crafting table, open the recipe book and type "excitedze" in the search bar.

      What I expected to happen was:

      Nothing. I thought the language wouldn't try to change to en_pt and everything would stay the same.

      What actually happened was:

      The game crashed.

            Unassigned Unassigned
            ManosSef [Mod] ManosSef
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: