Crash while rendering electric quarry
JustinHuPrime opened this issue ยท 4 comments
I encountered a null pointer exception, apparently in code trying to render an electric quarry - it was querying if I was holding a wrench; I can't recall what the exact circumstances around it were, but I wasn't interacting with the machine, and I might have scrolled past the wrench, but I'm not certain.
I've attached the relevant log file - 2022-11-26-5.log - and the relevant crash report - crash-2022-11-26_23.44.54-client.txt
The log file points at these lines, and after remapping the crash report's names, it looks like player.getMainHandItem()
may return null.
Sadly this is still an issue, but a modder reported it to Mojang: https://bugs.mojang.com/projects/MC/issues/MC-258939?filter=allopenissues. Depending on how long they take to fix it, I'll PR a fix to Fabric API otherwise.
I have the same issue on 1.17.1
, Fabric API: 0.46.1
, Fabric loader: 0.14.19
Crash log
---- Minecraft Crash Report ----
// I blame Dinnerbone.
Time: 4/10/23, 7:42 PM
Description: Rendering screen
java.lang.ClassCastException: class aztech.modern_industrialization.items.diesel_tools.DieselToolItem cannot be cast to class net.minecraft.class_1831 (aztech.modern_industrialization.items.diesel_tools.DieselToolItem and net.minecraft.class_1831 are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @de3a06f)
at net.minecraft.class_1799.handler$bpg000$levelz$getTooltipMixin(class_1799.java:4842)
at net.minecraft.class_1799.method_7950(class_1799.java:677)
at net.minecraft.class_437.method_25408(class_437.java:181)
at net.minecraft.class_437.method_25409(class_437.java:168)
at net.minecraft.class_481.method_25409(class_481.java:742)
at net.minecraft.class_465.method_2380(class_465.java:190)
at net.minecraft.class_481.method_25394(class_481.java:703)
at net.minecraft.class_757.method_3192(class_757.java:874)
at net.minecraft.class_310.method_1523(class_310.java:1112)
at net.minecraft.class_310.method_1514(class_310.java:728)
at net.minecraft.client.main.Main.main(Main.java:217)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:462)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Render thread
Stacktrace:
at net.minecraft.class_1799.handler$bpg000$levelz$getTooltipMixin(class_1799.java:4842)
at net.minecraft.class_1799.method_7950(class_1799.java:677)
at net.minecraft.class_437.method_25408(class_437.java:181)
at net.minecraft.class_437.method_25409(class_437.java:168)
at net.minecraft.class_481.method_25409(class_481.java:742)
at net.minecraft.class_465.method_2380(class_465.java:190)
at net.minecraft.class_481.method_25394(class_481.java:703)
Mixins in Stacktrace:
net.minecraft.class_1799:
net.fabricmc.fabric.mixin.item.client.ItemStackMixin (fabric-item-api-v1.mixins.json)
com.nhoryzon.mc.farmersdelight.mixin.LivingEntityOnUseItemFinishMixin (farmersdelight.mixins.json)
net.levelz.mixin.item.ItemStackServerMixin (levelz.mixins.json)
net.levelz.mixin.item.ItemStackClientMixin (levelz.mixins.json)
aztech.modern_industrialization.mixin.ItemStackMixin (modern_industrialization.mixins.json)
dev.onyxstudios.cca.mixin.item.common.MixinItemStack (mixins.cardinal_components_item.json)
net.fabricmc.fabric.mixin.tool.attribute.MixinItemStack (fabric-tool-attribute-api-v1.mixins.json)
ru.betterend.mixin.client.ItemStackMixin (betterend.mixins.client.json)
dev.emi.trinkets.mixin.ItemStackMixin (trinkets.mixins.json)
net.fabricmc.fabric.mixin.item.ItemStackMixin (fabric-item-api-v1.mixins.json)
net.devtech.stacc.mixin.SerializationFixin (stacc.mixins.json)
net.minecraft.class_437:
dev.itsmeow.betteranimalsplus.mixin.fabric.ScreenMixin (betteranimalsplus-fabric.mixins.json)
vazkii.patchouli.mixin.client.AccessorScreen (patchouli.mixins.json)
net.fabricmc.fabric.mixin.client.rendering.ScreenMixin (fabric-rendering-v1.mixins.json)
vazkii.patchouli.mixin.client.MixinScreen (patchouli.mixins.json)
dev.architectury.mixin.fabric.client.MixinScreen (architectury.mixins.json)
dan200.computercraft.fabric.mixin.MixinScreen (computercraft.mixins.json)
net.fabricmc.fabric.mixin.screen.ScreenAccessor (fabric-screen-api-v1.mixins.json)
me.shedaniel.rei.mixin.fabric.MixinScreen (rei.mixins.json)
net.fabricmc.fabric.mixin.screen.ScreenMixin (fabric-screen-api-v1.mixins.json)
net.minecraft.class_481:
dev.emi.trinkets.mixin.CreativeInventoryScreenMixin (trinkets.mixins.json)
net.fabricmc.fabric.mixin.item.group.client.MixinCreativePlayerInventoryGui (fabric-item-groups-v0.mixins.json)
com.glisco.owo.mixin.CreativeInventoryScreenMixin (owo.mixins.json)
net.minecraft.class_465:
aztech.modern_industrialization.mixin.client.HandledScreenAccessor (modern_industrialization.mixins.json)
dev.emi.trinkets.mixin.HandledScreenMixin (trinkets.mixins.json)
-- Screen render details --
Details:
Screen name: net.minecraft.class_481
Mouse location: Scaled: (217, 116). Absolute: (869.000000, 467.000000)
Screen size: Scaled: (480, 300). Absolute: (1920, 1200). Scale factor of 4.000000
-- Affected level --
Details:
All players: 1 total; [class_746['jiriks74'/204, l='ClientLevel', x=101.74, y=63.00, z=-6.79]]
Chunk stats: 2809, 2209
Level dimension: minecraft:overworld
Level spawn location: World: (1,68,10), Section: (at 1,4,10 in 0,4,0; chunk contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 15648 game time, 15648 day time
Server brand: fabric
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.class_638.method_8538(class_638.java:370)
at net.minecraft.class_310.method_1587(class_310.java:2399)
at net.minecraft.class_310.method_1514(class_310.java:747)
at net.minecraft.client.main.Main.main(Main.java:217)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:462)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Mixins in Stacktrace:
net.minecraft.class_638:
dev.architectury.mixin.fabric.client.MixinClientLevel (architectury.mixins.json)
dev.onyxstudios.cca.mixin.entity.client.MixinClientWorld (mixins.cardinal_components_entity.json)
net.fabricmc.fabric.mixin.event.lifecycle.client.ClientWorldMixin (fabric-lifecycle-events-v1.mixins.json)
dev.onyxstudios.cca.mixin.world.client.MixinClientWorld (mixins.cardinal_components_world.json)
net.minecraft.class_310:
net.fabricmc.fabric.mixin.event.lifecycle.client.MinecraftClientMixin (fabric-lifecycle-events-v1.mixins.json)
ca.fxco.memoryleakfix.mixin.hugeScreenshotLeak.Minecraft_screenshotMixin (memoryleakfix.mixins.json)
vazkii.patchouli.mixin.client.MixinMinecraft (patchouli.mixins.json)
hunternif.mc.impl.atlas.mixin.MixinMinecraftClient (antiqueatlas.mixins.json)
net.fabricmc.fabric.mixin.command.client.MinecraftClientMixin (fabric-command-api-v1.mixins.json)
ru.betterend.mixin.client.MinecraftClientMixin (betterend.mixins.client.json)
net.fabricmc.fabric.mixin.networking.accessor.MinecraftClientAccessor (fabric-networking-api-v1.mixins.json)
net.fabricmc.fabric.mixin.registry.sync.client.MixinMinecraftClient (fabric-registry-sync-v0.mixins.json)
io.github.coolmineman.bitsandchisels.mixin.MinecraftClientMixin (bitsandchisels.mixins.json)
net.voidz.mixin.MinecraftClientMixin (voidz.mixins.json)
dev.architectury.mixin.fabric.client.MixinMinecraft (architectury.mixins.json)
ca.fxco.memoryleakfix.mixin.spongePoweredLeak.Minecraft_clientLoadedMixin (memoryleakfix-fabric.mixins.json)
com.rdvdev2.disablecustomworldsadvice.mixin.MixinMinecraftClient (disable_custom_worlds_advice.mixins.json)
dan200.computercraft.fabric.mixin.MixinMinecraft (computercraft.mixins.json)
ru.bclib.mixin.client.MinecraftMixin (bclib.mixins.client.json)
net.fabricmc.fabric.mixin.screen.MinecraftClientMixin (fabric-screen-api-v1.mixins.json)
net.hat.gt.mixin.MinecraftMixin (GobTFabric.mixins.json)
ca.fxco.memoryleakfix.mixin.targetEntityLeak.Minecraft_targetClearMixin (memoryleakfix.mixins.json)
paulevs.betternether.mixin.client.MinecraftClientMixin (betternether.mixins.client.json)
net.fabricmc.fabric.mixin.event.interaction.MixinMinecraftClient (fabric-events-interaction-v0.mixins.json)
de.maxhenkel.voicechat.mixin.MinecraftMixin (voicechat.mixins.json)
ca.fxco.memoryleakfix.mixin.customPayloadLeak.Minecraft_freeBufferMixin (memoryleakfix-fabric.mixins.json)
I guess that it won't be fixed on 1.17.1?
I don't think it's going to be fixed for older versions, since it's a vanilla bug that requires a Fabric bugfix, and as far as I can tell, Fabric does not tend to backport to older versions.
@JustinHuPrime Yeah, I figured...
BUT there are good news!
It crashes while going over the items only in creative mode as far as I can tell. So my survival server should be alright! hopefully...
REI/JEI seems fine as well.