"TOO LONG" errors and long operator chains
GreyMario opened this issue ยท 4 comments
Issue type:
- ๐ Bug
Short description:
"TOO LONG"
errors when chaining operators can cause enormous amounts of log spam or crash clients entirely
Reproducing:
To crash Minecraft:
With a long enough operator chain (building a large function to heavily process one input), attempt to materialize it to recycle previous cards. Client will crash immediately upon rendering item with error below (details in attached crash log):
java.lang.IllegalArgumentException: Value "TOO LONG" could not be parsed to an operator.
at org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeOperator.deserialize(ValueTypeOperator.java:61)
To flood log, potentially serverside, with potentially gigabytes of data:
With a long enough operator chain, users may continue to check their current signature using a Display Panel. When the operator chain gets "TOO LONG"
, the Display Panel will error and the log will be flooded, per work tick, with the below:
[17:30:16] [main/ERROR] [Integrated Dynamics]: The input "TOO LONG" could not be parsed for this value type.
I recently created a build which exhibits this particular behavior near the very end and posted creation instructions in the Integrated Discord channel, found by searching Deck of Cards: Compare a victim Bee to your owned GenDustry Gene Samples
Versions:
- Integrated Dynamics:
0.11.18
- Minecraft:
1.12.2
- Forge:
14.23.5.2776
Does your planned change also solve the crash on rendering offending materialized variable cards?
So, it looks like I added in a maxValueByteSize
config option a long time ago. This makes it so that packets can not exceed the configured size, as that would cause network issues.
Increasing that value a bit may fix your issue. But don't make it too large, otherwise you'll have nasty networking issue.
Unfortunately, the actual fix won't be very easy. I plan to improve the serialization of ID values in the MC 1.13 update (#677). I won't do this now yet as this will break existing worlds. Until that is fixed, I will make a change to resolve the console logging issue. But the consequence of this is that very large values won't be displayable in the display panel, as they are too large to send to the client.