Menu

Commit [r5199]  Maximize  Restore  History

Adds code to hide/ignore exceptions caused by the Swing bug that

throws an ArrayIndexOutOfBoundsException at
sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:492) in
Sun JVMs older than 6.0_18.

This is the most common bug report, and there is nothing we can do
about it. It also doesn't seem like it destabilizes DrJava. It
therefore makes sense to not display the error window.

The exception is only ignored if
(1) the current JVM is a Sun JVM
(2) the current JVM is older than 6.0_18
(3) the exception is an ArrayIndexOutOfBoundsException
(4) the exception's stack trace begins with

at sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:492)
at javax.swing.text.Utilities.getTabbedTextOffset(Utilities.java:381)
at javax.swing.text.Utilities.getTabbedTextOffset(Utilities.java:302)
at javax.swing.text.Utilities.getTabbedTextOffset(Utilities.java:286)
at javax.swing.text.PlainView.viewToModel(PlainView.java:403)
at javax.swing.plaf.basic.BasicTextUI$RootView.viewToModel(BasicTextUI.java:1540)
at javax.swing.plaf.basic.BasicTextUI.viewToModel(BasicTextUI.java:1089)

(5) the exception's stack trace ends with

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

https://sourceforge.net/tracker/?func=detail&atid=438935&aid=2831821&group_id=44253

mgricken 2010-03-23

changed /trunk/drjava/src/edu/rice/cs/drjava/ui/DrJavaErrorHandler.java
/trunk/drjava/src/edu/rice/cs/drjava/ui/DrJavaErrorHandler.java Diff Switch to side-by-side view
Loading...
MongoDB Logo MongoDB