Astral Sorcery

Astral Sorcery

63M Downloads

Crashed caused by bad Data in AstralSorceryData!

StoneLegion opened this issue ยท 4 comments

commented

So I posted this as a bug a few days ago under #973 and I was told this seems to be a EU2 issue not a AS issue.

So what I ended up doing was nuking EU2 and then loading the world up and it ran fine but then I added EU2 back and it crashed...

So I did the same thing with AS and same results....

So I deleted the EU2 Data File and still crashing...

So what I did was renamed EVERY single Region / world in the world folder...

Still Crashed.

So I decided to nuke AS Data folder... And guess what? Server is back online and working just fine.

As much as this was blamed on EU2 the bad data clearly sitting in AS Data folder.

I'm sure deleting AS Data folder is not the best thing ever but what else could I do.. I have a backup for now maybe I can restore it later on once this issue is fixed.

https://pastebin.com/mZQAGc6k

commented

Exu2 issue. Again.
It's an issue in their deserialization. That's it. This is not my fault.

commented

I realize that this is a problem with ExU2's deserialization, but I feel the need to point out that the code block in question in AS is catching the base Exception class and throwing away the exception, which isn't exactly good practice and maybe should have a debug or warning logged? It wouldn't help in this case (wouldn't catch the AbstractMethodError, since that extends from Error and not Exception), but still strikes me as wrong as a Java dev (though not a mod dev).

Just something I noticed earlier before the issue was closed.

commented

Well, to give some (late) context:
Error and Exception are fundamentally different.

Error describes irregularities thrown due to a JVM problem. In this case, a method that no longer exists because a dependency updated and the mod calling that method didn't compile against that new version of the dependency yet, hence why that method is not found by the JVM, hence the JVM error.

Exception describes expected irregularities in code execution which are known or likely to happen even during compile-time and are expected to be handled by developers due to their importance.

RuntimeExceptions - subclasses of Exceptions - are general exceptions which are not known during compile time and are a result of incorrect data access or related during - well, as it says - runtime.

For more exact information on those, there's notes about these things in the Java documentation.

So, to sum up: No. It is WRONG to catch anything the JVM throws which is not intended to be caught to process critical system failures before shutting down the running application. Such an instance would be to produce a readable error log/crash report before shutting down.

commented

Sorry, I think maybe I phrased something badly there.

I wasn't suggesting you catch the Error that's being thrown, but instead that you should log the Exception that could be caught (even though it's irrelevant to this issue, since the issue in question is throwing an Error and not an Exception).

Again, I'm a Java dev, not a mod dev, so maybe there's Forge standards for exception handling that I'm not aware of, but generally speaking it's bad coding standards to catch an exception and then do nothing with it.