anchor cart crash
bear989 opened this issue ยท 12 comments
crash-2020-07-24_07.09.38-server.txt
opened a anchor cart GUI after changing config to not consume fuel
I have the same issue, opening the Admin Anchor Cart GUI also crashes my game, aswell as a Steve's Carts 2 Minecart.
crash-2020-07-24_23.04.36-server.txt
railcraft.zip
See #1808
My best guess is that this is due to a client/server config desync. Though that doesn't account for the reports of it happening to the Admin Cart.
it was definitely not due to a config dysinc. also, did you test on a server? cause we had this happen on a server, it might not happen on a single player world
Yes, I did test on a server. Never once did it crash or attempt to open the GUI. I have no ideas and haven't even been able to think of a better way to just sidestep the problem.
I will say that I do believe that something is going on here. I'm just not sure what.
Mismatched configs, mismatched entity classes, faulty detection of whether a GUI should be opened, or possibly some other mod attempting to open a GUI on the cart.
I can't tell from the crash logs how the GUI was opened or what GUI was opened, only that a Railcraft GUI was opened. And it crashes because carts that don't require fuel have a zero length inventory.
In theory, I could just not add the slot to the GUI for carts with zero inventory, but I suspect that may still crash if the client and server disagree on the length of the inventory array.
I considered the possibility of always having a single slot inventory and just attempting to control whether something can be placed in it or not, but again that falls foul of the client and server disagreeing on whether the cart needs fuel.
And frankly the real issue is that I have no idea why or how its opening a GUI on it at all. It should be impossible on the Admin cart. The function that opens it is overriden into a null op.
I guess what I could do is add some fail-fast exceptions so that it crashes sooner in the process. That might help shed some light on the why.
I don't know if you have fixed this yet, based on the issue still being open I'm guessing not. The most sure-fire way I have found to crash my server (modpack ftb:revelation for Minecraft version 1.12.2) is to try to interact with a spike cart while in a minecart connected to it. My "train" is as follows: Electric engine, admin spike loader, minecart, minecart, minecart, cargo cart. I would love to have my train loaded as it goes thousands of blocks around the map and needs chunk loading in order to continue on the track while no one is riding it, but I keep accidentally interacting with it and I'm scared that when a random person joins they may do the same not knowing it crashes the server. If you interact with the spike cart while not in a minecart, no crash occurs.