mojira.dev
MC-95900

Crash on Invalid playsound Source

Using /playsound with an invalid <source> causes the client to drop out of the world with the following message:

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

One can immediately rejoin the world.

The following command WORKS:
/playsound minecraft:entity.cow.ambient master @p ~ ~ ~

The following command CRASHES:
/playsound minecraft:entity.cow.ambient mastr @p ~ ~ ~

This happens both if the command is entered in chat and if the command is run via command block.

–

Additionally, the old style commands do not crash, but there is one related problem. Running /playsound minecraft:entity.cow.ambient @p returns the following in chat...

An unknown error occurred while attempting to perform this command.

There is no crash. Meanwhile, /playsound minecraft:entity.cow.ambient @p ~ ~ ~ fails with the expected

That player cannot be found.

Environment

Server on Ubuntu 14.04; Client on Ubuntu 15.04.

java -showversion:
OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

Linked issues

Comments 2

Actually this one was posted earlier, but since MC-95982 is a lot more active AND up-to-date, I suggest resolving this as duplicate due to less activity

migrated

(Unassigned)

Unconfirmed

Minecraft 16w02a, Minecraft 16w03a, Minecraft 16w04a

Retrieved