JDK-6678385 : Random java.lang.StackOverflowError from various JDKs
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u4
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: linux_2.6
  • CPU: x86
  • Submitted: 2008-03-21
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u23Fixed 7 b60Fixed OpenJDK6Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
We've got over 30 reports of exception with this stacktrace. It has no exact steps to reproduce.

See comments in our exceptions reporter:
http://statistics.netbeans.org/analytics/detail.do?id=38330

STACKTRACE: (first 10 lines)
java.lang.StackOverflowError
        at sun.awt.X11.XlibWrapper.CallErrorHandler(XlibWrapper.java:0)
        at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
        at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
        at sun.awt.X11.XlibWrapper.CallErrorHandler(XlibWrapper.java:0)
        at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
        at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
        at sun.awt.X11.XlibWrapper.CallErrorHandler(XlibWrapper.java:0)
        at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
        at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
        at sun.awt.X11.XlibWrapper.CallErrorHandler(XlibWrapper.java:0)
This problem is described in details in SWT bugs database:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=171432

Comments
PUBLIC COMMENTS This bug also affects SWT: https://bugs.eclipse.org/bugs/show_bug.cgi?id=142644.
15-04-2009

SUGGESTED FIX An idea is to make AWT error handlers synthetic: install a real handler at the very beginning and call the requested handlers from it instead of real calls to XSetErrorHandler(). This would change the sequence of error handlers the following way (compare to what is described in SWT bug #171432): AWT thread: XToolkit is initialized and sets its global event handler saved_error_handler = XSetErrorHandler(XlibWrapper.ToolkitErrorHandler) AWT thread: invokes XToolkit.WITH_XERROR_HANDLER() the new handler is stored in XToolkit and all the errors from default toolkit handler are forwared to it no call to XSetErrorHandler() is performed GTK thread: invokes gdk_error_trap_push() and remembers the temporary AWT toolkit error handler (XlibWrapper.ToolkitErrorHandler) AWT thread: invokes XToolkit.RESTORE_XERROR_HANDLER() current error handler is cleared, all the subsequent errors are skipped (or forwarded to saved_error_handler) no call to XSetErrorHandler() is performed GTK thread: invokes gdk_error_trap_pop() and again sets the X error handler to XlibWrapper.ToolkitErrorHandler AWT thread: on JVM shutdown, XToolkit restores the saved handler XSetErrorHandler(saved_error_handler)
30-03-2009

EVALUATION I have to say I have not been able to "decode" informtation available at http://statistics.netbeans.org/analytics/detail.do?id=38330 The only thing I've understood: I've just created new Ruby on Rails application using new Project wizard and I've got this. It was on Ubuntu 8.04 Alpha 6 with composite window manager (window effects set to normal in GNOME). Though I'm not sure if this information is useful :(
21-03-2008