It only happens on multiplayer servers.
/particle dust 0 0 0 0 ~ ~ ~ 0 0 0 0 0
The kick message is:
Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet 0/35 (qk) was larger than I expected, found 12 bytes extra whilst reading packet 35
Code analysis by KennyTV can be found in this comment.
Dust particles kick clients on servers
Dust Particles with /particle on a server crash the game