United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6776839 AWTUtilities.setWindowOpaque() causes a stack overflow on X11
6776839 : AWTUtilities.setWindowOpaque() causes a stack overflow on X11

Details
Type:
Bug
Submit Date:
2008-11-26
Status:
Resolved
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2008-12-03
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P1
Resolution:
Fixed
Affected Versions:
6u12
Fixed Versions:
6u12

Related Reports

Sub Tasks

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
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.
                                     
2008-11-26
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) {
                                     
2008-11-26



Hardware and Software, Engineered to Work Together