JDK-7124421 : [macosx] Window.setBackground(noAlphaColor) for fullscreen windows leads to errors in the output
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: os_x
  • CPU: generic
  • Submitted: 2011-12-23
  • Updated: 2012-02-21
  • Resolved: 2012-01-11
Related Reports
Relates :  
Description
http://java.net/jira/browse/MACOSX_PORT-96 submitted 2011/06/01 by Dmitry Bessonov
import java.awt.*;
public class SetBackground {
    public static void main(String[] args) throws InterruptedException {        Frame frame = new Frame();        GraphicsDevice screenDevice =                GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0];        screenDevice.setFullScreenWindow(frame);        frame.setBackground(Color.RED);        frame.dispose();    }
}
The screen will blink red, it's OK. after that the output will contain:
2011-06-01 12:42:00.679 java<span class=&quot;error&quot;>&#91;17349:3503&#93;</span> Cocoa AWT: Not running on AppKit thread 0 when expected. (Java_sun_lwawt_macosx_CPlatformWindow_nativeGetScreenNSWindowIsOn_1AppKitThread - /HUDSON/workspace/jdk7-2-build-mac-amd64/ws/macosx-port/jdk/src/macosx/native/sun/awt/AWTWindow.m:726)
2011-06-01 12:42:00.682 java<span class=&quot;error&quot;>&#91;17349:3503&#93;</span> Please file a bug report at <span class=&quot;nobr&quot;><a href=&quot;http://java.net/jira/browse/MACOSX_PORT&quot;>http://java.net/jira/browse/MACOSX_PORT<sup><img class=&quot;rendericon&quot; src=&quot;/jira/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/></sup></a></span> with this message and a reproducible test case.
java.lang.Exception: Pointer to native NSWindow is invalid. Already disposed?
at sun.lwawt.macosx.CPlatformWindow.getNSWindowPtr(CPlatformWindow.java:515)
at sun.lwawt.macosx.CPlatformWindow.updateIconImages(CPlatformWindow.java:507)
at sun.lwawt.macosx.CPlatformWindow.setVisible(CPlatformWindow.java:473)
at sun.lwawt.LWWindowPeer.run(LWWindowPeer.java:222)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
at java.awt.EventQueue.access./Mac.bugs00(EventQueue.java:101)
at java.awt.EventQueue.run(EventQueue.java:666)
at java.awt.EventQueue.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
java.lang.Exception: Pointer to native NSWindow is invalid. Already disposed?
at sun.lwawt.macosx.CPlatformWindow.getNSWindowPtr(CPlatformWindow.java:515)
at sun.lwawt.macosx.CPlatformWindow.setVisibleHelper(CPlatformWindow.java:639)
at sun.lwawt.macosx.CPlatformWindow.setVisible(CPlatformWindow.java:479)
at sun.lwawt.LWWindowPeer.run(LWWindowPeer.java:222)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
at java.awt.EventQueue.access./Mac.bugs00(EventQueue.java:101)
at java.awt.EventQueue.run(EventQueue.java:666)
at java.awt.EventQueue.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Comments
EVALUATION Original bug was fixed couple of builds ago together with the reworking on the window initialization code.
11-01-2012

EVALUATION Author: Yuri Nesterenko Date: 23/Nov/11 11:34 AM Build: b217 api/java_awt/Window/indexTGF_BackgroundGeneral it's not fullscreen but apparently similar issue with translucency.
23-12-2011