mojira.dev
MC-87037

All Players Near Spawn Kicked, Malformed JSON

Was loading commandblocks in redstone chunks, loaded a particularly large command, but below the maximum limit. Each time I edited the command(s), there were several very large ones) it would kick me, AND OTHER PLAYERS within the redstone chunks off the server. I continued adding large commandblocks. At a certain point, maybe 10 large ones, I stopped being able to log in entirely as I would just keep getting kicked every "tick" with the following error: "Malformed JSON at line 1 column 1". There is no powered redstone. None of these are repeating. I just get kicked when the chunk loads after login.

At the time, I was using a bunch of "1 block installers". On retrospection, perhaps commandblock minecarts loaded with large commands (but several characters below the limit!) may be to blame? I'll have to try to recreate the scenario on a fresh backup of the map.

Researching further, I upgraded the "corrupted" map to the 34d snapshot, and the corruption still kicked me. We ran an kill @e[type=MinecartCommandBlock] , and were able to log back in no problems. So it must have something to do with the minecarts.

Additionally, running the one-block installers in singleplayer creative mode in 34D I was unable to recreate the problem.

When upgrading the online server to 34d, and attempting to edit the large commandblocks again, I now get the FOLLOWING NEW ERROR

Internal exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(1) + length(1) exceeds writerIndex(1): UnpooledHeapByteBuf(ridx: 1, widx: 1, cap: 1)

Comments 7

This looks like MC-86845, that one kicked players for JSON from Command Block Minecarts. It only kicked players on servers, not singleplayer.

They're probably no longer below the limit once the upgrade path code does its thing to them. While they should probably try to prevent it from kicking you, you could try cleaning up the commands to make them conform to the strict JSON standard, so that the upgrade path code won't have to touch it.

This started in 15w33c. "Malformed JSON at line 1 column 1" has nothing to do with character count of the command block as "summon MinecartCommandBlock ~ ~.5 ~ {Command:say 1,Riding:{id:MinecartCommandBlock,Command:say 2}}" produces the same message. Something is fundamenatlly broken with stacked minecart command blocks.

in singleplayer shared on lan, i think this issue kicks the player using it, but me as the host was fine

Is this still an issue in 15w44b? If so, please explain the issue in detail and provide steps to reproduce it.

Pasting a command with maximum character count (32,500) into a command block in 15w45a no longer causes disconnects and minecart command blocks no longer cause a crash.

Fixed somewhere between 15w34d and 15w45a.

Chad Schaefer

(Unassigned)

Unconfirmed

Minecraft 15w34b, Minecraft 15w34d

Minecraft 15w45a

Retrieved