Better Advancements

Better Advancements

142M Downloads

GUI crash - IllegalStateException

tlitookilakin opened this issue ยท 2 comments

commented

Opening the advancement GUI causes the game to crash with the error java.lang.IllegalStateException: Not a JSON Object: null.
Looking through the trace, it's coming from this block not catching IllegalStateExceptions. I'm aware that 1.12 is probably not supported any more (and I don't expect any fixes for it), but this code is also present in the master branch, and this could still be an issue in current versions.

Crash log here.

Thank you for your consideration and hard work.

commented

Update: I've found the root cause- any zero-length advancement .json file will cause this crash. So while it's possible to catch the IllegalStateException itself, the error could also be caught by just checking to see if the file is empty before trying to parse it.

commented

Closing as 1.12 is no longer supported