[1.19.2] Crash on recipe lookup
JaisDK opened this issue ยท 2 comments
Minecraft Version
1.19.x
Version
1.101.2
Details
This line in the TurtleUpgradeRecipe class evaluates to true if the turtleItem is empty and the two upgrades items are not and it causes a crash later when the turtleItem is cast.
---- Minecraft Crash Report ----
// Who set us up the TNT?
Time: 2023-06-11 11:33:11
Description: Rendering screen
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassCastException
at shadows.fastsuite.StreamUtils.executeUntil(StreamUtils.java:113) ~[FastSuite-1.19.2-4.1.0.jar%23952!/:4.1.0] {re:classloading}
at shadows.fastsuite.AuxRecipeManager.m_44015_(AuxRecipeManager.java:42) ~[FastSuite-1.19.2-4.1.0.jar%23952!/:4.1.0] {re:mixin,re:classloading,pl:mixin:A}
at mcjty.rftoolsstorage.craftinggrid.RFCraftingRecipe.findRecipe(RFCraftingRecipe.java:55) ~[rftoolsstorage-1.19-4.1.2.jar%231188!/:1.19-4.1.2] {re:classloading}
at mcjty.rftoolsstorage.craftinggrid.GuiCraftingGrid.testRecipe(GuiCraftingGrid.java:220) ~[rftoolsstorage-1.19-4.1.2.jar%231188!/:1.19-4.1.2] {re:classloading}
at mcjty.rftoolsstorage.craftinggrid.GuiCraftingGrid.draw(GuiCraftingGrid.java:158) ~[rftoolsstorage-1.19-4.1.2.jar%231188!/:1.19-4.1.2] {re:classloading}
at mcjty.rftoolsstorage.modules.scanner.client.GuiStorageScanner.drawWindow(GuiStorageScanner.java:701) ~[rftoolsstorage-1.19-4.1.2.jar%231188!/:1.19-4.1.2] {re:classloading}
at mcjty.rftoolsstorage.modules.scanner.client.GuiStorageScanner.m_7286_(GuiStorageScanner.java:648) ~[rftoolsstorage-1.19-4.1.2.jar%231188!/:1.19-4.1.2] {re:classloading}
at net.minecraft.client.gui.screens.inventory.AbstractContainerScreen.m_6305_(AbstractContainerScreen.java:92) ~[client-1.19.2-20220805.130853-srg.jar%231335!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:botania_xplat.mixins.json:client.AbstractContainerScreenAccessor,pl:mixin:APP:highlighter.mixins.json:AbstractContainerScreenMixin,pl:mixin:APP:ae2.mixins.json:AbstractContainerScreenMixin,pl:mixin:APP:ae2.mixins.json:ResizableSlotHighlightMixin,pl:mixin:APP:findme-common.mixins.json:MixinSlotRenderer,pl:mixin:APP:mixins.ipnext.json:MixinAbstractContainerScreen,pl:mixin:APP:whats_that_slot.mixins.json:AbstractContainerScreenAccess,pl:mixin:APP:whats_that_slot.mixins.json:AbstractContainerScreenMixin,pl:mixin:APP:balm.mixins.json:AbstractContainerScreenAccessor,pl:mixin:APP:mousetweaks.mixins.json:AbstractContainerScreenAccessor,pl:mixin:APP:dankstorage.mixins.json:AbstractContainerScreenMixin,pl:mixin:APP:quark.mixins.json:client.ContainerScreenMixin,pl:mixin:A,pl:runtimedistcleaner:A}
at mcjty.lib.gui.GenericGuiContainer.m_6305_(GenericGuiContainer.java:264) ~[mcjtylib-1.19-7.2.5.jar%231071!/:1.19-7.2.5] {re:classloading}
at net.minecraftforge.client.ForgeHooksClient.drawScreenInternal(ForgeHooksClient.java:441) ~[forge-1.19.2-43.2.8-universal.jar%231340!/:?] {re:mixin,re:classloading,pl:mixin:A}
at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:434) ~[forge-1.19.2-43.2.8-universal.jar%231340!/:?] {re:mixin,re:classloading,pl:mixin:A}
at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:896) ~[client-1.19.2-20220805.130853-srg.jar%231335!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1115) ~[client-1.19.2-20220805.130853-srg.jar%231335!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:immediatelyfast.mixins.json:hud_batching.MixinMinecraftClient,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:mixins.hammerlib.json:client.MinecraftMixin,pl:mixin:APP:modernfix-common.mixins.json:bugfix.concurrency.MinecraftMixin,pl:mixin:APP:modernfix-common.mixins.json:feature.measure_time.MinecraftMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.blast_search_trees.MinecraftMixin,pl:mixin:APP:modernfix-forge.mixins.json:feature.measure_time.MinecraftMixin_Forge,pl:mixin:APP:packages.forge.mixins.json:MixinMinecraft,pl:mixin:APP:mixin.cleancut.json:MinecraftMixin,pl:mixin:APP:botania_xplat.mixins.json:client.MinecraftAccessor,pl:mixin:APP:the_bumblezone.mixins.json:client.MinecraftMixin,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:ding.mixins.json:MinecraftMixin,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:sodium-extra.mixins.json:gui.MinecraftClientAccessor,pl:mixin:APP:oauth.mixins.json:MinecraftMixin,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:konkrete.mixin.json:MixinMinecraft,pl:mixin:APP:mixins.ipnext.json:MixinMinecraftClient,pl:mixin:APP:fancymenu.general.mixin.json:MixinMinecraft,pl:mixin:APP:fancymenu.general.mixin.json:IMixinMinecraft,pl:mixin:APP:quartz.mixins.json:MinecraftShutdownMixin,pl:mixin:APP:rubidium.mixins.json:core.MixinMinecraftClient,pl:mixin:APP:tcdcommons.client.mixins.json:MixinMinecraftClient,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:ars_nouveau.mixins.json:light.ClientMixin,pl:mixin:APP:drippyloadingscreen.mixin.json:MixinMinecraft,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:byg_forge.mixins.json:client.MixinMinecraft,pl:mixin:APP:hexerei.mixin.json:light.HexereiClientMixin,pl:mixin:APP:dankstorage.mixins.json:MinecraftClientAccessor,pl:mixin:APP:betterthirdperson.mixins.json:MinecraftMixin,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:blueprint.mixins.json:client.MinecraftMixin,pl:mixin:APP:iceberg.mixins.json:MinecraftMixin,pl:mixin:APP:quark.mixins.json:client.MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:ars_nouveau.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%231335!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:immediatelyfast.mixins.json:hud_batching.MixinMinecraftClient,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:mixins.hammerlib.json:client.MinecraftMixin,pl:mixin:APP:modernfix-common.mixins.json:bugfix.concurrency.MinecraftMixin,pl:mixin:APP:modernfix-common.mixins.json:feature.measure_time.MinecraftMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.blast_search_trees.MinecraftMixin,pl:mixin:APP:modernfix-forge.mixins.json:feature.measure_time.MinecraftMixin_Forge,pl:mixin:APP:packages.forge.mixins.json:MixinMinecraft,pl:mixin:APP:mixin.cleancut.json:MinecraftMixin,pl:mixin:APP:botania_xplat.mixins.json:client.MinecraftAccessor,pl:mixin:APP:the_bumblezone.mixins.json:client.MinecraftMixin,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:ding.mixins.json:MinecraftMixin,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:sodium-extra.mixins.json:gui.MinecraftClientAccessor,pl:mixin:APP:oauth.mixins.json:MinecraftMixin,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:konkrete.mixin.json:MixinMinecraft,pl:mixin:APP:mixins.ipnext.json:MixinMinecraftClient,pl:mixin:APP:fancymenu.general.mixin.json:MixinMinecraft,pl:mixin:APP:fancymenu.general.mixin.json:IMixinMinecraft,pl:mixin:APP:quartz.mixins.json:MinecraftShutdownMixin,pl:mixin:APP:rubidium.mixins.json:core.MixinMinecraftClient,pl:mixin:APP:tcdcommons.client.mixins.json:MixinMinecraftClient,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:ars_nouveau.mixins.json:light.ClientMixin,pl:mixin:APP:drippyloadingscreen.mixin.json:MixinMinecraft,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:byg_forge.mixins.json:client.MixinMinecraft,pl:mixin:APP:hexerei.mixin.json:light.HexereiClientMixin,pl:mixin:APP:dankstorage.mixins.json:MinecraftClientAccessor,pl:mixin:APP:betterthirdperson.mixins.json:MinecraftMixin,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:blueprint.mixins.json:client.MinecraftMixin,pl:mixin:APP:iceberg.mixins.json:MinecraftMixin,pl:mixin:APP:quark.mixins.json:client.MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:ars_nouveau.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%231335!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%231335!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.2.8.jar%23101!/:?] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2388!/:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2388!/:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2388!/:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2388!/:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2388!/:?] {}
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2388!/:?] {}
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2388!/:?] {}
at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassCastException
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}
at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:562) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.reportExecutionException(ForkJoinTask.java:604) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1004) ~[?:?] {}
at shadows.fastsuite.StreamUtils.executeUntil(StreamUtils.java:104) ~[FastSuite-1.19.2-4.1.0.jar%23952!/:4.1.0] {re:classloading}
... 28 more
Caused by: java.lang.RuntimeException: java.lang.ClassCastException
at shadows.fastsuite.StreamUtils$CallableExecuteAction.exec(StreamUtils.java:171) ~[FastSuite-1.19.2-4.1.0.jar%23952!/:4.1.0] {re:classloading}
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:mixin,re:computing_frames}
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:mixin,re:computing_frames}
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {re:mixin}
Caused by: java.lang.ClassCastException
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}
at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:564) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:591) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:689) ~[?:?] {}
at java.util.stream.FindOps$FindOp.evaluateParallel(FindOps.java:160) ~[?:?] {}
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:?] {}
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647) ~[?:?] {}
at shadows.fastsuite.AuxRecipeManager.lambda$getRecipeFor$1(AuxRecipeManager.java:45) ~[FastSuite-1.19.2-4.1.0.jar%23952!/:4.1.0] {re:mixin,re:classloading,pl:mixin:A}
at shadows.fastsuite.StreamUtils$CallableExecuteAction.exec(StreamUtils.java:169) ~[FastSuite-1.19.2-4.1.0.jar%23952!/:4.1.0] {re:classloading}
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:mixin,re:computing_frames}
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:mixin,re:computing_frames}
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {re:mixin}
Caused by: java.lang.ClassCastException: class net.minecraft.world.item.AirItem cannot be cast to class dan200.computercraft.shared.turtle.items.ITurtleItem (net.minecraft.world.item.AirItem is in module [email protected] of loader 'TRANSFORMER' @f348e10; dan200.computercraft.shared.turtle.items.ITurtleItem is in module [email protected] of loader 'TRANSFORMER' @f348e10)
at dan200.computercraft.shared.turtle.recipes.TurtleUpgradeRecipe.assemble(TurtleUpgradeRecipe.java:142) ~[cc-tweaked-1.19.2-1.101.2.jar%23823!/:1.101.2] {re:classloading}
at dan200.computercraft.shared.turtle.recipes.TurtleUpgradeRecipe.matches(TurtleUpgradeRecipe.java:47) ~[cc-tweaked-1.19.2-1.101.2.jar%23823!/:1.101.2] {re:classloading}
at dan200.computercraft.shared.turtle.recipes.TurtleUpgradeRecipe.m_5818_(TurtleUpgradeRecipe.java:24) ~[cc-tweaked-1.19.2-1.101.2.jar%23823!/:1.101.2] {re:classloading}
at shadows.fastsuite.AuxRecipeManager.lambda$getRecipeFor$0(AuxRecipeManager.java:44) ~[FastSuite-1.19.2-4.1.0.jar%23952!/:4.1.0] {re:mixin,re:classloading,pl:mixin:A}
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) ~[?:?] {}
at java.util.HashMap$ValueSpliterator.tryAdvance(HashMap.java:1800) ~[?:?] {}
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?] {}
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?] {}
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?] {}
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] {}
at java.util.stream.FindOps$FindTask.doLeaf(FindOps.java:319) ~[?:?] {}
at java.util.stream.AbstractShortCircuitTask.compute(AbstractShortCircuitTask.java:115) ~[?:?] {}
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:mixin,re:computing_frames}
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:mixin,re:computing_frames}
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {re:mixin}
I've double checked the logic here, and I'm fairly confident the current behaviour is correct. This crash should never happen in normal circumstances.
I'm not quite sure where the real issue is here. There is an issue report at Shadows-of-Fire/FastSuite#23, which I think it's worth commenting on, but I suspect the root cause is a nasty interaction between FastSuite and a mod mutating a recipe input stack.