mojira.dev
MC-121693

Crash when typing empty selector "[x_rotation=]" or "[y_rotation=]"

How to reproduce:
Type the following command in chat:

/tp @p[x_rotation]

or

/tp @p[x_rotation=

By completing the selector with a "=" or "}":

/tp @e [x_rotation=]

, it will crash the game.

Crash message:

The game crashed whilst chartyped event handler
Error: java.lang.NullPointerException: charTyped event handler

Crash report included.

Linked issues

Attachments

Comments 2

Edit2: Nvm, distance also has floating point and ranges and does not crash.

My very wild guess would be, it has something to do with the fact, that x_rotation supports floating point values and supports value ranges, which both uses points "." to specify. This might confuse the parser and Jeb Dinnerbone didn't test it thoroughly enough yet.

x_rotation=1.2..3.4

Edit: Even though it crashes on certain occasions while typing, if you just paste a valid command it does what you would expect it to.

Jeb is not the one who worked on the new command format, and if it was because of decimal and ranges, distance= would also be affected.

Roy Sajima

Nathan Adams

Confirmed

Minecraft 17w45a

Minecraft 17w47a

Retrieved