BetterAdvancements icon indicating copy to clipboard operation
BetterAdvancements copied to clipboard

GUI crash - IllegalStateException

Open tlitookilakin opened this issue 2 years ago • 1 comments

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.

tlitookilakin avatar Apr 05 '23 19:04 tlitookilakin

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.

tlitookilakin avatar Apr 20 '23 23:04 tlitookilakin

Closing as 1.12 is no longer supported

way2muchnoise avatar Oct 27 '24 11:10 way2muchnoise