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
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.
- Locate your .minecraft folder, and open the "versions" folder.
- Select the version you want to test this with and duplicate its folder.
- 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.
- Open the .json file found in the folder.
- Find the "id" tag and change its value to the exact same name you used in step 3.
- Find the "assetIndex" tag and delete it, so the launcher won't download the vanilla asset index.
- 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.
- Save the file.
- Go back to the main .minecraft folder and open the "assets" folder.
- Go to the "objects" folder, and find "de".
- Paste the attached de72b2154ed663a6f2fb8485eeca928e88a451e4.json file in the "de" folder, after removing its file extension.
- Go back to the "assets" folder, and open "indexes".
- 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).
- 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.
- Save the file.
- Open the Minecraft launcher and create a new installation with the version you made in steps 1-8.
- Launch the version.
- 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.
- 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.
Created Issue:
Game crashes if there is no en_pt language and "excitedze" is typed in the search bar in the recipe book
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.
- Locate your .minecraft folder, and open the "versions" folder.
- Select the version you want to test this with and duplicate its folder.
- 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.
- Open the .json file found in the folder.
- Find the "id" tag and change its value to the exact same name you used in step 3.
- Find the "assetIndex" tag and delete it, so the launcher won't download the vanilla asset index.
- 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.
- Save the file.
- Go back to the main .minecraft folder and open the "assets" folder.
- Go to the "objects" folder, and find "de".
- Paste the attached de72b2154ed663a6f2fb8485eeca928e88a451e4.json file in the "de" folder, after removing its file extension.
- Go back to the "assets" folder, and open "indexes".
- 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).
- 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.
- Save the file.
- Open the Minecraft launcher and create a new installation with the version you made in steps 1-8.
- Launch the version.
- 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.
- 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.
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.
- Locate your .minecraft folder, and open the "versions" folder.
- Select the version you want to test this with and duplicate its folder.
- 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.
- Open the .json file found in the folder.
- Find the "id" tag and change its value to the exact same name you used in step 3.
- Find the "assetIndex" tag and delete it, so the launcher won't download the vanilla asset index.
- 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.
- Save the file.
- Go back to the main .minecraft folder and open the "assets" folder.
- Go to the "objects" folder, and find "de".
- Paste the attached de72b2154ed663a6f2fb8485eeca928e88a451e4.json file in the "de" folder, after removing its file extension.
- Go back to the "assets" folder, and open "indexes".
- 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).
- 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.
- Save the file.
- Open the Minecraft launcher and create a new installation with the version you made in steps 1-8.
- Launch the version.
- 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.
- 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.
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
Hello, thanks for the report! Unfortunately, your reproduction steps require modifying the game, and modified versions of the game are not supported on the bug tracker. Do you know if it is possible to reproduce the issue without modifying the game?
No, but I checked the code and it says that when excitedze is typed into the search bar in the recipe book, it changes the language to en_pt, without checking if such language exists. As the British would say, that code is a bodge. Mojang is eliminating the weirdest crashes out of the game, and this technically is one of them.
Think about the "death.attack.dryout" death message. Before 1.17.1, it was technically possible to get it, since there was code for a "dryout" damage type since 1.13. That one should also have been fixed earlier than 1.17.1, but I never reported it since I thought someone would say the exact same thing: "there is no way to see that without modding."
Sorry if this comment sounds angry, I am not angry, just passionate about my opinion.
Personally, I don't think these reproduction steps are modding. The game itself, when launched, does not say "Modded", because I didn't change anything in the client.jar file. Changing the asset index is not modding for me. Mojang does it every single snapshot, and every change they make to the asset index is retroactively applied to all previous snapshots for the same update. Running 21w37a for example will be different now than what it was when it was released, even though Mojang didn't reupload it or change it or anything. It just happens because it checks the same asset index that the latest snapshot does, which changes every time a snapshot is released.
If you have a counterargument, I will seriously consider it while rethinking if this is a valid issue. Please post your thoughts if you have any.
This is a modified game