ModernFix

ModernFix

72M Downloads

Incompatible with JEA

Kasualix opened this issue ยท 15 comments

commented

Drink Beer GitHub
Drink Beer JEI addon - Just Enough Keg Github

java version 11.0.15.1 by Oracle Corporation
forge version 36.2.39
test env: launched my game, create a new world, waited to log in, opened my inventory, and finally saw crash or not.

With ModernFix (crash):
latest.log: https://pastebin.ubuntu.com/p/Hkv3x3KjJn/
Main fatal part: https://pastebin.ubuntu.com/p/9tr9RgQNXD/

Without ModernFix (didn't crash):
latest.log: https://pastebin.ubuntu.com/p/M8J4KdjnCs/

commented

Unfortunately I don't think the exception shown in the log is actually the reason for your crash. I did make a few improvements to how JEI reloading works which should hopefully make this easier to track down. Please try this new version, and send both the latest.log file and whatever crash report Forge generates.

newversion.zip

commented

mixin.perf.async_jei=true - Starting JEI took 3.643 min (already joined the world)
debug.log
latest.log - Time from main menu to in-game was 59.723858 seconds

mixin.perf.async_jei=false - Starting JEI took 26.80 s (when joining the world)
debug.log
latest.log - Time from main menu to in-game was 77.92177 seconds

commented

Forge didn't generate any crash report. My game just froze, and log says, "server closed".
I removed Just Enough Keg and Drink Beer, but it still crashed.
latst.log: https://pastebin.ubuntu.com/p/4ZCBWnhZv6/
Main error part begins at line 4573.

commented

Unfortunately, there are far too many mods to realistically narrow down the issue. It would be great if you could determine the minimum set of mods necessary to reproduce this (as it seems to be a specific incompatibility with one of your mods).

Otherwise, if you don't have time or interest to do that, you can add mixin.perf.async_jei=false to config/modernfix-mixins.properties, and this should work around the problem, at the cost of disabling the JEI optimization.

commented

Oh 1.3.1 maybe break jei compat, it takes 4min after I joined the world for jei to load.

commented

Is there anything unusual in the log? It's worth testing how long JEI startup takes with the option I mentioned above disabled. It is expected to take slightly longer than default since it shares processing time with the rest of the game.

commented

@wasdspace Could you try running a Spark profile once you join the world with async_jei enabled? Run /spark profiler --thread * once you are in the world and /spark profiler --stop once JEI finishes loading. Then send the link it gives you here.

commented

I'm so sorry my internet speed is so bad that my spark link export never works. I've tried so many times.
Is there any other way I can get the sparkprofile file to you?

commented

Sorry, I missed your previous message. Thanks! It seems to be some strange interaction with Modern UI. I will look into a fix.

commented

After some investigation, it is possible to fix this, but it requires forcing part of the JEI loading process to again block the rest of the game, which causes a freeze for at least 10 or 15 seconds on my machine. I am not eager to implement that fix as it will defeat the point of the optimization.

There are three solutions I can propose:

  • Set TooltipSearchMode to DISABLED in jei-client.toml. This should prevent the laggy tooltip computation from running and JEI should start much faster. As a bonus, tooltips used to consume quite a bit of RAM in older versions of JEI, and if this is still the case you can probably save some RAM this way.
  • Disable async JEI loading using what I suggested above, then you can still search with tooltips but at the cost of waiting 30 extra seconds to join worlds/servers.
  • Do nothing and accept that JEI isn't available for 4 minutes (not ideal).
commented

That's fine, I can disable whatever features to achieve optimization lol.
Hopefully this will also solve Kasualix's problem.
Thanks for your patience in replying, and look forward to the subsequent updates.
Oh I just saw you updated on Curseforge. Nice.

commented

It would be great if you could determine the minimum set of mods necessary to reproduce this (as it seems to be a specific incompatibility with one of your mods).

I found it:
LibX-1.16.3-1.0.76.jar
JustEnoughAdvancements-1.16.5-1.0.2.jar
modernfix-mc1.16.5-1.4.1.jar
jei-1.16.5-7.7.1.153.jar
forge-1.16.5-36.2.39-universal.jar

latest.log: https://pastebin.ubuntu.com/p/3hQbcYQKMB/
Main error part at Line 378
It didn't crash, but it caused that jei disappeared and java.lang.NoClassDefFoundError: mezz/jei/plugins/vanilla/ingredients/item/ItemStackHelper (just like the former crash and freeze)

commented

Thank you very much! I will look into it.

commented

I think I have finally fixed it in 1.4.2. Let me know if it still doesn't work and I will reopen.