
Crash + world corruption due to machine cover
CondoSlime opened this issue ยท 9 comments
Your GTNH Discord Username
CondoSlime
Your Pack Version
2.7.0
Your Server
SP
Java Version
Java 8
Type of Server
Single Player
Your Actions
Placing a machine with an inventory cover attached and quickly opening the machine interface and clicking where the cover button should appear crashes the game. Relogging the world constantly crashes too.
Edit: After messing around with a couple other worlds again, my world seemingly un-broke itself somehow and doesn't crash upon startup anymore.
Crash Report
Final Checklist
- I have searched this issue tracker and there is nothing similar already. Posting on a closed issue saying the crash still exists will prompt us to investigate and reopen it once we confirm your report.
- I can reproduce this crash consistently by following the exact steps I described above.
- I have asked other people and they confirm they also crash by following the exact steps I described above.
Found 1 linked crash report(s)
Primitive Automated Analysis of Crash Report
Stacktrace
java.lang.RuntimeException: Casting data in class gregtech.common.covers.CoverChest, data 7937931 at gregtech.api.util.CoverBehaviorBase.forceCast(CoverBehaviorBase.java:88) at gregtech.api.util.CoverBehaviorBase.getAdditionalTooltip(CoverBehaviorBase.java:826) at gregtech.common.covers.CoverInfo.getAdditionalTooltip(CoverInfo.java:299) at gregtech.api.metatileentity.CoverableTileEntity.getCoverTabTooltip(CoverableTileEntity.java:757) at gregtech.api.metatileentity.CoverableTileEntity.lambda$addCoverTabs$5(CoverableTileEntity.java:721) at gregtech.api.metatileentity.CoverableTileEntity$$Lambda$4639/10014121.get(Unknown Source) at com.gtnewhorizons.modularui.api.widget.Widget.buildTooltip(Widget.java:375) at com.gtnewhorizons.modularui.api.widget.Widget.checkTooltip(Widget.java:638) at com.gtnewhorizons.modularui.api.widget.Widget.hasTooltip(Widget.java:649) at com.gtnewhorizons.modularui.api.widget.Widget.getTooltip(Widget.java:657) at com.gtnewhorizons.modularui.common.internal.wrapper.ModularGui.drawGuiContainerForegroundLayer(ModularGui.java:306) at com.gtnewhorizons.modularui.common.internal.wrapper.ModularGui.drawScreen(ModularGui.java:157) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1061) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1001) at net.minecraft.client.Minecraft.run(Minecraft.java:6110) at net.minecraft.client.main.Main.main(SourceFile:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.ClassCastException: Cannot cast gregtech.api.util.ISerializableObject$LegacyCoverData to gregtech.common.covers.CoverChest$ChestInventory at java.lang.Class.cast(Class.java:3369) at gregtech.api.util.CoverBehaviorBase.forceCast(CoverBehaviorBase.java:86) ... 21 more
can reproduce at 2.7.0, the cover correctly appears (alongside the button in the gui) and will crash the client upon interaction; does not crash the server.
logs: https://mclo.gs/OSK3tFE
@Glease @miozune any idea. Is that an issue with the chest cover and mui integration ?
Unrelated, the actual cause is trying to draw the tooltip of a cover tab.
I believe this will be caused by any cover which doesn't use legacy cover variables. In my testing it crashed with Basic Item Holder
and with Wireless Fluid Detector Cover
, but not with Conveyor Module (LV)
.
In every case I was able to load right back in, I don't think any world corruption is possible here.
If I had to guess I'd say the reason we're seeing this is Allow interacting with machines instantly upon placing #2496
I'm not saying we should go back to having a 2.5s delay before we can interact with a machine. A proper fix would be to either:
- Replace the delay by a hook to make the MTE interactible as soon as the last important bit of state is loaded.
- Allow the UI to dynamically load changes to the state while the MTE is being set up.
There's also a related crash if you shift-rightclick a cover right after the block was placed down but before the cover appears on the block.
As soon as the cover visually appears on the block, neither bug will occur.
That second bug also affects the conveyor module.
[12:06:12] [Client thread/ERROR] [FML/]: SimpleChannelHandlerWrapper exception
java.util.NoSuchElementException: Can't find ISyncedWidget for id 0
at Launch//com.gtnewhorizons.modularui.api.screen.ModularWindow.getSyncedWidget(ModularWindow.java:452) ~[ModularWindow.class:?]
at Launch//com.gtnewhorizons.modularui.api.screen.ModularUIContext.readServerPacket(ModularUIContext.java:415) ~[ModularUIContext.class:?]
at Launch//com.gtnewhorizons.modularui.common.internal.network.SWidgetUpdate.executeClient(SWidgetUpdate.java:44) ~[SWidgetUpdate.class:?]
at Launch//com.gtnewhorizons.modularui.common.internal.network.NetworkHandler.lambda$static$0(NetworkHandler.java:50) ~[NetworkHandler.class:?]
at Launch//cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?]
at Launch//cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?]
at Launch//io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[netty-all-4.0.10.Final.jar:?]
at Launch//io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [netty-all-4.0.10.Final.jar:?]
at Launch//io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [netty-all-4.0.10.Final.jar:?]
at Launch//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-all-4.0.10.Final.jar:?]
at Launch//io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [netty-all-4.0.10.Final.jar:?]
at Launch//io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [netty-all-4.0.10.Final.jar:?]
at Launch//io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [netty-all-4.0.10.Final.jar:?]
at Launch//io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [netty-all-4.0.10.Final.jar:?]
at Launch//io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [netty-all-4.0.10.Final.jar:?]
at Launch//cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?]
at Launch//net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?]
at Launch//net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?]
at Launch//net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) [Minecraft.class:?]
at Launch//net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?]
at Launch//net.minecraft.client.Minecraft.run(Minecraft.java:10654) [Minecraft.class:?]
at Launch//net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at System//net.minecraft.launchwrapper.Launch.rfb$realLaunch(Launch.java:250) [Launch.class:?]
at System//net.minecraft.launchwrapper.Launch.launch(Launch.java:35) [Launch.class:?]
at System//net.minecraft.launchwrapper.Launch.main(Launch.java:60) [Launch.class:?]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at com.gtnewhorizons.retrofuturabootstrap.Main.main(Main.java:207) [lwjgl3ify-2.1.5-forgePatches.jar:?]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at System//net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:99) [mclauncher-1.7.10.jar:?]
at System//GradleStart.main(GradleStart.java:40) [?:?]
@YannickMG does GTNewHorizons/GT5-Unofficial#3873 resolve this issue?