Exponential explosion of escape characters in serialized operators
Alront opened this issue ยท 1 comments
Issue type:
- ๐ Bug
Short description:
Nesting many operators will cause an error when evaluating (serializing) them, because the NBT data in which they are stored will be repeatedly serialized. In doing so, minecraft will add '\' to escape existing '\' every time, causing an exponential explosion of backslashes in the serialized string. Each level that you go deeper will have it's amount of '\' doubled. This eventually means that the maximum packet length will be exceeded, and the operator will error with no error message.
Steps to reproduce the problem:
- Pipe a pipe operator into a pipe operator.
- Pipe that operator into a pipe operator.
- Repeat about 10-15 times. (with a config setting of 20 000 bytes for data packets)
[This problem actually happend in real gameplay, while simply building a complicated operator. It occurs not only for pipe operators but also with anything else that has operators as arguments.]
Expected behaviour:
Not an error, or at least one with an error messsage.
Versions:
- This mod: 1.1.0
- Minecraft: 1.12.2
- Forge: 14.23.5.2768
Yes, I'm aware of this problem. It's a flaw in my current implementation.
There's not much I can do about it in 1.12 without breaking existing worlds, so this is something I aim to rewrite in 1.14. See #677.