Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking a lectern crashes server #1667

Open
Twisted-Code opened this issue Dec 16, 2018 · 4 comments
Open

breaking a lectern crashes server #1667

Twisted-Code opened this issue Dec 16, 2018 · 4 comments

Comments

@Twisted-Code
Copy link

Twisted-Code commented Dec 16, 2018

Not sure if this is on your side of the fence or @CovertJaguar's, but apparently if someone is standing on a crafting altar's lectern and tries to break it, it tries to cast his TileHidden to your TileEntityLectern, at which point everyone loses because both the server and nearby clients crash. I discovered this problem this morning when someone messaged me at 3 AM to tell me the server crashed, and then I managed to track it down and reproduce it about half an hour ago with the help of a friend who was in game at the time. Reproduction steps are as follows:

  1. set up a crafting altar
  2. stand on the lectern
  3. break it
  4. ????
  5. PROFIT! By which I mean crash everything

server crash report

I really hope this helps, because as I warned my players: "Please do not stand on crafting altar lecterns while trying to break them. If you do, I will know, I will find you, and I will slap you repeatedly with a diamond sword while in creative mode."

@CovertJaguar
Copy link

Quite an old version you are playing with there.

As for ArsMagicka, you should always type check your tile entities before using them. Minecraft is a little loose about making sure the block add/remove functions are atomic.

@TheIcyOne
Copy link
Contributor

Yeah, this is on AM2's side, most likely will not be fixed as this version has been out of development for 2-3 years now, unfortunately. The only workaround I can think of for you other than just warning players not to do it is to disable the trackman's goggles functionality in railcraft's configs, but then you do lose out on a pretty fun part of the mod.

@TheIcyOne
Copy link
Contributor

If you are willing to compile your own build of the mod, you could add the following line
if (!worldObj.getTileEntity(xCoord + podiumLocation.getX(), yCoord + podiumLocation.getY(), zCoord + podiumLocation.getZ()) instanceof TileEntityLectern return; between lines 515 and 516 of https://github.com/Mithion/ArsMagica2/blob/master/src/main/java/am2/blocks/tileentities/TileEntityCraftingAltar.java#L515-516.
If that is built using the same version information as your current version, I believe you could drop it into your server and isolate the crashing to clients only. Or it'd just refuse connection. To be honest I remember nothing of how the old versions handled that.

@Twisted-Code
Copy link
Author

Twisted-Code commented Dec 21, 2018

Fair enough. Honestly, I figured I would be getting a lot of "this version is not supported" responses given my choice to use this version "because I can". Like covert said: it's quite an old version. Nonetheless, I felt compelled to report the problem anyway since I figured out what was happening and it wasn't already documented. Thanks for letting me know what try to fix it in a custom build @TheIcyOne; I'll keep that in mind in case it becomes a more serious problem. Thankfully, it seems my warning has been heeded. I guess people don't like dying repeatedly to an angry admin ;-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants