EvilCraft

EvilCraft

19M Downloads

Exalted crafter exploit

LemADEC opened this issue ยท 4 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

Exalted crafter can be used to dup items, player using will corrupt other items, eventually leading to stack overflow on save.

Steps to reproduce the problem:

  1. put an item in the crafter
  2. hold your mouse above said item
  3. on your keyboard, press the number corresponding to the slot of the exalted crafter

Expected behaviour:

  1. Cancel hotbar shortcut keys while crafter is open
  2. Delete all crafters from inventory when trying to save NBT on an invalid item (player is cheating at that time, we might as well delete the crafter)

Versions:

  • This mod: 1.12.2-0.10.62
  • Minecraft: 1.12.2
  • Forge: 14.23.4.2756

Log file:

not applicable

commented

Thanks for reporting.

eventually leading to stack overflow on save.

Can you share the logfile?

commented

Sadly, Java fails to report the beginning of the stack, so it's pretty much useless:

java.lang.StackOverflowError
    at java.io.DataOutputStream.write(DataOutputStream.java:107)
    at java.io.DataOutputStream.writeUTF(DataOutputStream.java:401)
    at java.io.DataOutputStream.writeUTF(DataOutputStream.java:323)
    at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:473)
    at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:35)
    at net.minecraft.nbt.NBTTagList.write(NBTTagList.java:34)
    at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:474)
    at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:35)
    at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:474)
    at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:35)
    at net.minecraft.nbt.NBTTagList.write(NBTTagList.java:34)
    at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:474)
    at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:35)
    at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:474)
    at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:35)
    at net.minecraft.nbt.NBTTagList.write(NBTTagList.java:34)
...
    at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:35)
    at net.minecraft.nbt.NBTTagList.write(NBTTagList.java:34)
    at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:474)
    at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:35)
    at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:474)
    at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:35)
    at net.minecraft.nbt.NBTTagList.write(NBTTagList.java:34)
    at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:474)
    at net.minecraft.nbt.NBTTagCompound.write(NBTTagCompound.java:35)
    at net.minecraft.nbt.NBTTagCompound.writeEntry(NBTTagCompound.java:474)

Looks like the stack overflow is systematic unlike on previous version. Here's a full log in single with just EvilCraft:
https://gist.github.com/LemADEC/16371b603cfc205397d7c45872d7d925

commented

That definitely helps, at least I know that the problem is because of a recursive NBT tag somewhere :-)

commented

In my mind, the root problem is that you can move an ingredient item in place of the exalted crafter.