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.

Linked issues

Comments 2

Is a duplicate of MC-95982

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

Jason C. McDonald

(Unassigned)

Unconfirmed

Minecraft 16w02a, Minecraft 16w03a, Minecraft 16w04a

Retrieved