JDK-6776839 : AWTUtilities.setWindowOpaque() causes a stack overflow on X11
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u12
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-11-26
  • Updated: 2011-01-19
  • Resolved: 2008-12-03
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
6u12 b02Fixed
Description
The fix for 6730439 introduced the Enhanced Security Warning on the X11 platforms. Before that fix unsigned application were not allowed to use non-opaque windows (as introduced in 6u10). With the fix for 6730439 the effect was enabled for such applications on X11. However, due to a typo this now causes a StackOverflowException to be thrown whenever an applications enables the effect. The stack trace is as follows:

        at sun.awt.X11.XWindowPeer.setOpaque(XWindowPeer.java:1936)
        at java.awt.Window.applyOpaque(Window.java:3367)
        at java.awt.Window.access$800(Window.java:132)
        at java.awt.Window$1.setOpaque(Window.java:3426)
        at sun.awt.X11.XWindowPeer.setOpaque(XWindowPeer.java:1936)
        at java.awt.Window.applyOpaque(Window.java:3367)
        at java.awt.Window.access$800(Window.java:132)
        at java.awt.Window$1.setOpaque(Window.java:3426)

Comments
SUGGESTED FIX --- old/src/solaris/classes/sun/awt/X11/XWindowPeer.java 2008-11-26 16:36:53.000000000 +0300 +++ new/src/solaris/classes/sun/awt/X11/XWindowPeer.java 2008-11-26 16:36:53.000000000 +0300 @@ -1933,7 +1933,6 @@ } public void setOpaque(boolean isOpaque) { - AWTAccessor.getWindowAccessor().setOpaque((Window)getTarget(), true); } public void updateWindow(BufferedImage backBuffer) {
26-11-2008

EVALUATION The fix is considered P1 since it breaks the new feature on X11 platofrms. We need to make the method XWindowPeer.setOpaque() no-op because it is not needed at all on X11.
26-11-2008