-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AbstractMethodError when logging Exception #16
Comments
Since the error occurs outside of your code, it might just be because of differing runtime version versus compiled Java version. I'd guess this to be a Java bug, not really one of your own. Obviously the "fix" to this problem would be to fix whatever array index is out of bounds, but without a stack trace I guess that's less than helpful. |
To me this sounds like "printStackTrace" would be an AbstractMethod (i.e. not implemented by the runtime). Maybe some openSource implementation on some linux distributions don't support it accidentally? Or did this also happen on Windows? You can, however implement your own method for that by iterating. Throwable has some kind of stacktrace you have to iterate over. That would workaround that issue to at least track the error down. |
How do you build the application when creating releases? It's probably a mismatch between linked classes. |
I build it in Netbeans by clicking on "Clean and Build". |
Could you please provide the ANT script you created? |
Also, it's probably a bad idea to catch Throwable in ErrorHandler.java. |
I'm not sure how that would give me any more information about the error. The UncaughtExceptionHandler is already the last resort. It informs the user about an error that might require the program to close and logs it to the debug file. So it's not like an error goes unnoticed because of that. Because e.printStackTrace() on the Exception failed with an AbstractMethodError (and I think NullPointerExceptions), I added the catch Throwable in an attempt to log any useful information about the original error, which is the same as in the first post:
Before it was something like this over an over again, which also could freeze the GUI, because of course an Exception in the ErrorHandler is also caught again by the ErrorHandler:
I tried all sorts of things to get some information out of the original Exception, but even I also tried to compile the latest beta with Java 8 instead of Java 7 as before (because it seemed to occur mainly on Java 8), but I still had the error occur for people. Of course I'm not getting the error, so it's even harder to test stuff. |
Again, it probably has something to do with the build you're doing, linking with a class that is fine on your machine but having a different versions on other machines. It could also be a problem in one of the libraries. |
Another idea would be, when an error occurs during the custom exception logging (like it happens here) to throw the original exception (the |
Good iea, but it's not possible to throw an exception in the I didn't make a build script, the IDE does all the building for me. |
I haven't encountered this for a while, it may have been resolved by newer Java versions. |
There has been an
AbstractMethodError
when usingThrowable.printStackTrace
for some users for quite a while now. It is unclear as to how that can even happen, because a thrown exception (to my understanding) shouldn't be abstract. Because of this there is little information as to what causes the error, but it appears to be related to the GUI.It appears to only happen on Java 8, although that may be because it's the current version and most people use it. It seems to happen on different OS (at least on Windows 7/8.1, Linux, OSX).
Any suggestions or help would be appreciated.
The text was updated successfully, but these errors were encountered: