Crash from reloading JEI while it is already loading
mezz opened this issue ยท 1 comments
Hello!
Reloading JEI can cause it to take a long time at startup in a big mod pack.
There is also an issue with reloading JEI while it is already loading, which causes a crash.
You can see it happen in this stack trace:
[04Oct2021 19:53:50.281] [Render thread/INFO] [de.melanx.jea.JustEnoughAdvancements/]: Collected 2795 advancement criterion recipes.
--
52067 | [04Oct2021 19:53:50.936] [Render thread/ERROR] [mezz.jei.load.PluginCaller/]: Caught an error from mod plugin: class com.lothrazar.cyclic.compat.jei.CyclicPluginJEI cyclic:jei
52068 | java.lang.IllegalArgumentException: Invalid ingredient found. Parameter Name: ingredient Ingredient Info: 1 air minecraft:air
52069 | at mezz.jei.util.ErrorUtil.checkIsValidIngredient(ErrorUtil.java:279) ~[?:**.**.**.**]
52070 | at mezz.jei.load.registration.RecipeRegistration.addIngredientInfo(RecipeRegistration.java:84) ~[?:**.**.**.**]
52071 | at com.lothrazar.cyclic.compat.jei.CyclicPluginJEI.registerRecipes(CyclicPluginJEI.java:80) ~[?:1.16.5-1.4.2]
52072 | at mezz.jei.load.PluginLoader.lambda$new$5(PluginLoader.java:117) ~[?:**.**.**.**]
52073 | at mezz.jei.load.PluginLoader$Lambda$54989/865910643.accept(Unknown Source) ~[?:?]
52074 | at mezz.jei.load.PluginCaller.callOnPlugins(PluginCaller.java:26) [?:**.**.**.**]
52075 | at mezz.jei.load.PluginLoader.<init>(PluginLoader.java:117) [?:**.**.**.**]
52076 | at mezz.jei.startup.JeiStarter.start(JeiStarter.java:69) [?:**.**.**.**]
52077 | at mezz.jei.startup.ClientLifecycleHandler.startJEI(ClientLifecycleHandler.java:147) [?:**.**.**.**]
52078 | at mezz.jei.startup.ClientLifecycleHandler.setupJEI(ClientLifecycleHandler.java:140) [?:**.**.**.**]
52079 | at mezz.jei.startup.ClientLifecycleHandler.lambda$new$3(ClientLifecycleHandler.java:106) [?:**.**.**.**]
52080 | at mezz.jei.startup.ClientLifecycleHandler$Lambda$47404/803437400.accept(Unknown Source) [?:**.**.**.**]
52081 | at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) [eventbus-4.0.0.jar:?]
52082 | at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) [eventbus-4.0.0.jar:?]
52083 | at net.minecraftforge.eventbus.EventBus$Lambda$2840/553839482.invoke(Unknown Source) [eventbus-4.0.0.jar:?]
52084 | at net.minecraftforge.eventbus.EventBus$Lambda$2475/411596890.invoke(Unknown Source) [eventbus-4.0.0.jar:?]
52085 | at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) [eventbus-4.0.0.jar:?]
52086 | at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) [eventbus-4.0.0.jar:?]
52087 | at de.melanx.jea.client.ClientAdvancements.update(ClientAdvancements.java:40) [?:1.16.5-1.0.0]
52088 | at de.melanx.jea.network.AdvancementInfoUpdateHandler.lambda$handle$0(AdvancementInfoUpdateHandler.java:11) [?:1.16.5-1.0.0]
52089 | at de.melanx.jea.network.AdvancementInfoUpdateHandler$Lambda$55217/474522604.run(Unknown Source) [?:1.16.5-1.0.0]
52090 | at net.minecraftforge.fml.network.NetworkEvent$Context.enqueueWork(NetworkEvent.java:215) [?:?]
52091 | at de.melanx.jea.network.AdvancementInfoUpdateHandler.handle(AdvancementInfoUpdateHandler.java:11) [?:1.16.5-1.0.0]
52092 | at de.melanx.jea.network.JustEnoughNetwork$Lambda$39716/966308.accept(Unknown Source) [?:1.16.5-1.0.0]
52093 | at net.minecraftforge.fml.network.simple.IndexedMessageCodec.lambda$tryDecode$3(IndexedMessageCodec.java:128) [?:?]
52094 | at net.minecraftforge.fml.network.simple.IndexedMessageCodec$Lambda$54002/1722394266.accept(Unknown Source) [?:?]
52095 | at java.util.Optional.ifPresent(Optional.java:159) [?:1.8.0_51]
52096 | at net.minecraftforge.fml.network.simple.IndexedMessageCodec.tryDecode(IndexedMessageCodec.java:128) [?:?]
52097 | at net.minecraftforge.fml.network.simple.IndexedMessageCodec.consume(IndexedMessageCodec.java:162) [?:?]
52098 | at net.minecraftforge.fml.network.simple.SimpleChannel.networkEventListener(SimpleChannel.java:80) [?:?]
52099 | at net.minecraftforge.fml.network.simple.SimpleChannel$Lambda$2838/1249366693.accept(Unknown Source) [?:?]
52100 | at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) [eventbus-4.0.0.jar:?]
52101 | at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) [eventbus-4.0.0.jar:?]
52102 | at net.minecraftforge.eventbus.EventBus$Lambda$2840/553839482.invoke(Unknown Source) [eventbus-4.0.0.jar:?]
52103 | at net.minecraftforge.eventbus.EventBus$Lambda$2475/411596890.invoke(Unknown Source) [eventbus-4.0.0.jar:?]
52104 | at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) [eventbus-4.0.0.jar:?]
52105 | at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) [eventbus-4.0.0.jar:?]
52106 | at net.minecraftforge.fml.network.NetworkInstance.dispatch(NetworkInstance.java:86) [?:?]
52107 | at net.minecraftforge.fml.network.NetworkHooks.lambda$onCustomPayload$1(NetworkHooks.java:91) [?:?]
52108 | at net.minecraftforge.fml.network.NetworkHooks$Lambda$53990/1336052067.apply(Unknown Source) [?:?]
52109 | at java.util.Optional.map(Optional.java:215) [?:1.8.0_51]
52110 | at net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(NetworkHooks.java:91) [?:?]
52111 | at net.minecraft.client.network.play.ClientPlayNetHandler.func_147240_a(ClientPlayNetHandler.java:1904) [?:?]
52112 | at net.minecraft.network.play.server.SCustomPayloadPlayPacket.func_148833_a(SCustomPayloadPlayPacket.java:59) [?:?]
52113 | at net.minecraft.network.play.server.SCustomPayloadPlayPacket.func_148833_a(SCustomPayloadPlayPacket.java:11) [?:?]
52114 | at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) [?:?]
52115 | at net.minecraft.network.PacketThreadUtil$Lambda$54395/1368671388.run(Unknown Source) [?:?]
52116 | at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) [?:?]
52117 | at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) [?:?]
52118 | at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) [?:?]
52119 | at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(SourceFile:127) [?:?]
52120 | at com.thenatekirby.jepb.plugin.PiglinBarteringRecipeBuilder.getManager(PiglinBarteringRecipeBuilder.java:79) [?:1.0.0]
52121 | at com.thenatekirby.jepb.plugin.PiglinBarteringRecipeBuilder.getPiglinBarteringRecipes(PiglinBarteringRecipeBuilder.java:41) [?:1.0.0]
52122 | at com.thenatekirby.jepb.plugin.JEPBPlugin.registerRecipes(JEPBPlugin.java:37) [?:1.0.0]
52123 | at mezz.jei.load.PluginLoader.lambda$new$5(PluginLoader.java:117) [?:**.**.**.**]
52124 | at mezz.jei.load.PluginLoader$Lambda$54989/865910643.accept(Unknown Source) [?:**.**.**.**]
52125 | at mezz.jei.load.PluginCaller.callOnPlugins(PluginCaller.java:26) [?:**.**.**.**]
52126 | at mezz.jei.load.PluginLoader.<init>(PluginLoader.java:117) [?:**.**.**.**]
52127 | at mezz.jei.startup.JeiStarter.start(JeiStarter.java:69) [?:**.**.**.**]
52128 | at mezz.jei.startup.ClientLifecycleHandler.startJEI(ClientLifecycleHandler.java:147) [?:**.**.**.**]
52129 | at mezz.jei.startup.ClientLifecycleHandler.setupJEI(ClientLifecycleHandler.java:140) [?:**.**.**.**]
52130 | at mezz.jei.startup.ClientLifecycleHandler.lambda$new$3(ClientLifecycleHandler.java:106) [?:**.**.**.**]
52131 | at mezz.jei.startup.ClientLifecycleHandler$Lambda$47404/803437400.accept(Unknown Source) [?:**.**.**.**]
52132 | at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) [eventbus-4.0.0.jar:?]
52133 | at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) [eventbus-4.0.0.jar:?]
52134 | at net.minecraftforge.eventbus.EventBus$Lambda$2840/553839482.invoke(Unknown Source) [eventbus-4.0.0.jar:?]
52135 | at net.minecraftforge.eventbus.EventBus$Lambda$2475/411596890.invoke(Unknown Source) [eventbus-4.0.0.jar:?]
52136 | at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) [eventbus-4.0.0.jar:?]
52137 | at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) [eventbus-4.0.0.jar:?]
52138 | at net.minecraftforge.client.ForgeHooksClient.onRecipesUpdated(ForgeHooksClient.java:711) [?:?]
52139 | at net.minecraft.client.network.play.ClientPlayNetHandler.func_199525_a(ClientPlayNetHandler.java:1314) [?:?]
52140 | at net.minecraft.network.play.server.SUpdateRecipesPacket.func_148833_a(SourceFile:27) [?:?]
52141 | at net.minecraft.network.play.server.SUpdateRecipesPacket.func_148833_a(SourceFile:15) [?:?]
52142 | at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) [?:?]
52143 | at net.minecraft.network.PacketThreadUtil$Lambda$54395/1368671388.run(Unknown Source) [?:?]
52144 | at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) [?:?]
52145 | at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) [?:?]
52146 | at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) [?:?]
52147 | at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(SourceFile:103) [?:?]
52148 | at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:947) [?:?]
52149 | at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?]
52150 | at net.minecraft.client.main.Main.main(Main.java:184) [?:?]
52151 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
52152 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
52153 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
52154 | at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
52155 | at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.2.6.jar:36.2]
52156 | at net.minecraftforge.fml.loading.FMLClientLaunchProvider$Lambda$491/1768742999.call(Unknown Source) [forge-1.16.5-36.2.6.jar:36.2]
52157 | at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?]
52158 | at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?]
52159 | at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?]
52160 | at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?]
52161 | at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?]
Basically JEI is loading, then some plugin triggers JEA to do some work, and JEA tries to reload JEI, causing a crash.
I think the solution here is to try to find a way to completely load JEA before JEI, so that it never has to reload JEI. No mod should reload JEI really, so far there has always been another way to make it work.
Please feel free to hop into Discord to talk about it and get help, or we can discuss here. Thanks!