-
Bug
-
Resolution: Fixed
-
Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47a, Minecraft 17w47b, Minecraft 17w48a, Minecraft 17w49a, Minecraft 17w49b, Minecraft 17w50a, Minecraft 18w01a
-
Confirmed
If a command has an unhandled exception, the exception's message is simply dumped into chat (e.g. java.util.NoSuchElementException) without any context, and no stacktrace is printed in the server console. In prior versions, it would output An unknown error occurred while attempting to perform this command (commands.generic.exception).
This is problematic for 2 reasons:
- It's not clear to the user what went wrong - just that an exception of some sort was thrown (this is fine if the exception has a user-friendly message, but in these cases it doesn't since they're unexpected)
The lack of a stacktrace means that it's basically impossible to debug. No stacktrace on command-specific syntax exceptions is fine, but for other unexpected exceptions it's not (e.g. a NullPointerException - not knowing the line it occurred on makes it pretty much useless)
Reproduction is hard - but right now this can be reproduced through MC-121661 (running /help asdfasdfasdf), or through MC-106551 (how I first encountered it – not recommended for general testing though)
As of 17w45b, a stacktrace is now printed at level ERROR. However, this also isn't ideal, since this happens for brigadier exceptions too (which have the stacktrace disabled, but it implies something went wrong at a deeper level).
- blocks
-
MC-110532 Use "/locate Stronghold" output "An unexpected error occurred trying to execute that command"
- Resolved
- discovered while testing
-
MC-106551 Concurrency Issue in ThreadedAnvilChunkStorage / crash when using "/save-all flush"
- Resolved
-
MC-121661 Typing /help + unavailable command returns "unexpected error" message
- Resolved
- relates to
-
MC-101234 Stack trace is not printed in log when exception occurs while running command
- Resolved
-
MC-121810 Command errors in chat are not red anymore
- Resolved
-
MC-121913 Log files are HUGE (5GB) because Brigadier also logs errors continuously.
- Resolved
-
MC-124493 Stacktrace is not written to log when exception occurs while running command
- Resolved