Just Enough Items (JEI)

Just Enough Items (JEI)

392M Downloads

[1.16.5] JEI 137 hangs using 100% of CPU

jeremiahwinsley opened this issue ยท 3 comments

commented

Not sure yet how to reliably reproduce this, but I have gotten this after closing and reopening a world, and after running /reload.

Modpack ATM6 (dev version), JEI version 7.7.1.137

Thread dump: https://gist.github.com/jeremiahwinsley/2493b914b6f513965ec7a2ca980a00b7

Sampler run: 2021-12-02_jei_threads.zip

Let me know what other information would be helpful.

commented

@mezz This is due to this:

https://github.com/mezz/JustEnoughItems/blob/1.18/src/main/java/mezz/jei/plugins/vanilla/crafting/VanillaRecipes.java#L40

It'll ultimately make use of this map, which isn't synchronized or thread-safe, and Java Maps can run into infinite loops if modified concurrently:

https://github.com/mezz/JustEnoughItems/blob/1.18/src/main/java/mezz/jei/recipes/ExtendableRecipeCategoryHelper.java#L25

commented

Nice find @shartte, thanks.

commented

Fixed in 1.16, 1.17, and 1.18 versions of JEI by making it a regular stream().