Hex Casting

Hex Casting

6M Downloads

Payload too large with large stack

natedogith1 opened this issue ยท 7 comments

commented

Reproduction steps:

  1. Create a list of 1000 entries (Gemini Gambit + Flock's Gambit)
  2. Duplicate the list 1000 times (Gemini Gambit)

Error is in server console:

java.lang.IllegalArgumentException: Payload may not be larger than 1048576 bytes
        at net.minecraft.network.protocol.game.ClientboundCustomPayloadPacket.<init>(ClientboundCustomPayloadPacket.java:35) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:classloading}
        at net.minecraftforge.network.NetworkDirection.lambda$static$1(NetworkDirection.java:28) ~[forge-1.19.2-43.2.11-universal.jar%23698!/:?] {re:classloading}
        at net.minecraftforge.network.NetworkDirection.buildPacket(NetworkDirection.java:79) ~[forge-1.19.2-43.2.11-universal.jar%23698!/:?] {re:classloading}
        at net.minecraftforge.network.simple.SimpleChannel.toVanillaPacket(SimpleChannel.java:112) ~[forge-1.19.2-43.2.11-universal.jar%23698!/:?] {re:classloading,re:mixin}
        at net.minecraftforge.network.simple.SimpleChannel.send(SimpleChannel.java:107) ~[forge-1.19.2-43.2.11-universal.jar%23698!/:?] {re:classloading,re:mixin}
        at at.petrak.hexcasting.forge.xplat.ForgeXplatImpl.sendPacketToPlayer(ForgeXplatImpl.java:307) ~[hexcasting-forge-1.19.2-0.10.3.jar%23537!/:0.10.3] {re:classloading}
        at at.petrak.hexcasting.common.network.MsgNewSpellPatternSyn.lambda$handle$0(MsgNewSpellPatternSyn.java:106) ~[hexcasting-forge-1.19.2-0.10.3.jar%23537!/:0.10.3] {re:classloading}
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:classloading,re:mixin}
        at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,re:computing_frames,re:classloading}
        at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:763) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:157) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A}
        at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:746) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:740) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A}
        at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:140) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:726) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:658) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[server-1.19.2-20220805.130853-srg.jar%23693!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A}
        at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin}
commented

doesn't this just affect the player who does that? the caster basically bans themselves doing that

commented

sure, but that doesn't mean we shouldn't fix it.

commented

That says it increases the limit by 1000x. Duplicating everything with another Flock's Gambit and Gemini Gambit should still cause the issue in that case.

commented

i believe there are mods that can increase the packet size limit, not sure what they are on forge off the top of my head

commented

We should check if this is fixed by #721.

commented

Appears to be fixed - tested on build 657.