Locales with non-arabic numerals cause crashes
Minecraft Version: 1.20.1
Forge Version: 47.4.0
Logs: https://gist.github.com/Nik-mmzd/2477df2a2a1060b043ac191ad48d5081
Steps to Reproduce:
- Set any Regional format with non-arabic numerals
- Forge will crash on early window. Disable it in config
- Mods (e.g. Quark) trying to load resources with numerals will crash with
net.minecraft.ResourceLocationException
Description of issue: I'm just describing the issue, I'm not the one who got this crash
User came to me with the following issue: Forge was acting weird. The problem was solved by changing Region Settings in Windows to English, and seems to be caused by non-"default" numerals used by user locale:
[10Apr2025 23:21:48.573] [Worker-Main-9/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/]: Exception caught during firing event: net.minecraft.ResourceLocationException: Non [a-z0-9/._-] character in path of location: quark:textures/model/entity/variants/cow\u0661.png
quark:textures/model/entity/variants/cow\u0661.png is actually quark:textures/model/entity/variants/cow1.png, but with Arabic-Indic Digit One.
Also, for some reason Early Loading Window was not working at all with Arabic regional settings, but started when it was changed to English.
Ya this doesn't seem to be a bug in Forge itself. As its an issue with vanilla/java encoding of String.format. Best bet is to have Quark fix it by using the Local variant of String.format
If there is an issue on Forge's end for the early lading screen, feel free to report that log. But this is on Quarks end. There isnt a way for us to decode local issues like this on the MC Code side.
First crash log in Gist is actually for Early Loading Screen, and it somehow seemed to be resolved by changing locale to English. I'll ask user for more feedback if possible or will try to reproduce the issue myself
Update: I just got confirmation from the user that Early Loading Screen crashes with Arabic locale, but works fine with English one, with the same setup (the only difference is locale)
Oh interesting, I must of skipped over that log file. Anyways it seems to be erroring on this line
Would have to look into how to get unlocalized version info from lwjgl
What particular locale does this happen with?
Arabic (Egypt), for example.
Related to https://github.com/LWJGL/lwjgl3/issues/779 then, upstream LWJGL3 bug.
The fix: https://github.com/LWJGL/lwjgl3/commit/40f18a7f98f322fce8a7fb6c3aaf49b9b6cf818b#diff-2397f45c6e4ee297fc4d54fdad3f2b76ec211e4483a5573ab3cc946ba8e9e1e1
Was included in the LWJGL3 stable release 3.3.2
As a workaround for pre-LWJGL-3.3.2-versions Forge can auto-disable Early Window automatically for specific locales... Or patch LWJGL 🤷
The workaround would be to disable the early loading window in your FML config. It might be possible to do a local check, though @basdxz would have to check that.
As a workaround for pre-LWJGL-3.3.2-versions Forge can auto-disable Early Window automatically for specific locales... Or patch LWJGL 🤷
Does disabling it fix the issue?
Does disabling it fix the issue?
Yes, Forge is able to load when Early Window is disabled (look at mods count for locale proof):