Comments (11)
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.
from chatty.
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.
from chatty.
How do you build the application when creating releases? It's probably a mismatch between linked classes.
from chatty.
I build it in Netbeans by clicking on "Clean and Build".
from chatty.
Could you please provide the ANT script you created?
from chatty.
Also, it's probably a bad idea to catch Throwable in ErrorHandler.java.
If the AbstractMethodError would not be catched it would probably help debug the problem. Right now, when this error happens, the UI just hangs when it should actually properly crash.
from chatty.
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:
10:50:44 Unhandled Exception:
Exception java.lang.AbstractMethodError: java.lang.Throwable.printStackTrace(Ljava/io/PrintWriter;)V
occured during logging of uncaught exception: java.lang.ArrayIndexOutOfBoundsException [Thread[AWT-EventQueue-0,6,main]]
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:
15:48:39 Unhandled Exception:
java.lang.AbstractMethodError: java.lang.Throwable.getStackTrace()[Ljava/lang/StackTraceElement;
at chatty.ErrorHandler.uncaughtException(ErrorHandler.java:30)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.awt.EventDispatchThread.processException(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
15:48:39 Unhandled Exception:
java.lang.NullPointerException
at chatty.ErrorHandler.uncaughtException(ErrorHandler.java:33)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.awt.EventDispatchThread.processException(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I tried all sorts of things to get some information out of the original Exception, but even toString()
was abstract as far as I can remember.
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.
from chatty.
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.
Could you please post your build script somewhere for me to look at?
from chatty.
Another idea would be, when an error occurs during the custom exception logging (like it happens here) to throw the original exception (the e
in void uncaughtException(Thread t, Throwable e)
) and let the JVM itself log it to stderr. If the JVM itself crashes on logging this exception, this would probably mean that there's a bug in the JVM. If the JVM does not crash, there's probably a bug somewhere in your build process or used libraries.
The second case is more likely, so it would be nice if I could take a look at your build script.
from chatty.
Good iea, but it's not possible to throw an exception in the uncaughtException
method. I would have to add a throws
to the method, but that means it doesn't override the method of the UncaughtExceptionHandler
anymore.
I didn't make a build script, the IDE does all the building for me.
from chatty.
I haven't encountered this for a while, it may have been resolved by newer Java versions.
from chatty.
Related Issues (20)
- open links without popup confirmation? HOT 2
- Join links in raid messages have incorrect context menu links
- no sound with Voicemeeter HOT 4
- Minimized windows not restoring on Win+D on Windows
- [v0.23] FFZ supported badge disappeared HOT 3
- User not removed from the chat member list when ignored HOT 3
- User list duplicates selection to a joined user placed after him
- Chatty minimizes its window when clicking a tray balloon
- Could not set unknown property 'classifier' for task ':shadowJar' HOT 6
- Filter out announcements from ignored users HOT 1
- Lags on MacOS
- Access missing: "Ban users" (see "Main - Account") HOT 2
- Show multimonth sub announcements HOT 5
- /refresh ALL emotes pls HOT 2
- Kick support HOT 1
- Hype Chat support HOT 1
- Disable Automod Close on Q
- Streams may not open when updating to Streamlink 6 or later.
- [Feature Request] Copy/Duplicate Entry in settings dialog
- [Feature Request] Threshold-trigger for Notifications
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatty.