JDK-8000276 : [macosx] graphicsDevice.setFullScreenWindow(frame) crashes JVM
  • Type: Bug
  • Status: Resolved
  • Resolution: Duplicate
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P4
  • Submit Date: 2012-10-01
  • Updated Date: 2012-10-02
  • Resolved Date: 2012-10-02
Related Reports
Duplicate :  
Description
This issue is separated from the JI-27

Run the code below on Mac OS X:
----------------------------------
import com.apple.eawt.FullScreenUtilities;
import javax.swing.*;
import java.awt.GraphicsDevice;

public class FileChooserFullScreen {

    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {

            @Override
            public void run() {
                JFrame frame = new JFrame();
                frame.setSize(300, 300);
                frame.setVisible(true);
                FullScreenUtilities.setWindowCanFullScreen(frame, true);

                GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();

                device.setFullScreenWindow(frame);
            }
        });

    }
}

----------------------------------

The JVM crashes:
012-10-01 17:33:46.470 java[2045:860b] Cocoa AWT: Not running on AppKit thread 0 when expected. (
	0   libawt_lwawt.dylib                  0x000000011c4376c9 Java_sun_lwawt_macosx_CPlatformWindow_nativeGetNSWindowDisplayID_1AppKitThread + 59
	1   ???                                 0x000000010f46560d 0x0 + 4551235085
Comments
Duplicate of the issue JDK-7175707 [macosx] PIT: 8 b43 Not running on AppKit thread issue again
2012-10-02

Stack trace before failing: java.lang.Exception: Stack trace at sun.lwawt.macosx.CPlatformWindow.getGraphicsDevice(CPlatformWindow.java:448) at sun.lwawt.LWWindowPeer.checkIfOnNewScreen(LWWindowPeer.java:990) at sun.lwawt.LWWindowPeer.notifyReshape(LWWindowPeer.java:641) at sun.lwawt.macosx.CPlatformView.enterFullScreenMode(CPlatformView.java:106) at sun.lwawt.macosx.CPlatformWindow.enterFullScreenMode(CPlatformWindow.java:765) at sun.lwawt.LWWindowPeer.enterFullScreenMode(LWWindowPeer.java:1298) at sun.awt.CGraphicsDevice.enterFullScreenExclusive(CGraphicsDevice.java:179) at sun.awt.CGraphicsDevice.setFullScreenWindow(CGraphicsDevice.java:147) at filechooser.FileChooserFullScreen$1.run(FileChooserFullScreen.java:25) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:720) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:681) at java.awt.EventQueue$3.run(EventQueue.java:679) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:690) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) 2012-10-01 17:52:11.940 java[2063:860b] Cocoa AWT: Not running on AppKit thread 0 when expected. ( 0 libawt_lwawt.dylib 0x0000000112fae6c9 Java_sun_lwawt_macosx_CPlatformWindow_nativeGetNSWindowDisplayID_1AppKitThread + 59 1 ??? 0x0000000105fe060d 0x0 + 4395501069 )
2012-10-02