Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6880694

GraphicsDevice.setFullScreenWindow(null) throws NPE if there's a fullscreen window displayed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: client-libs
    • Subcomponent:
    • Resolved In Build:
      b77
    • CPU:
      generic
    • OS:
      solaris

      Backports

        Description

        The following JCK tests fail due to this issue:
        api/java_awt/GraphicsDevice/indexTGF.html#ShapeAndTranslucencyForFullScreen[nullShape]
        api/java_awt/Window/indexTGF.html#BackgroundGeneral[testNoAlphaFullScreen]
        api/java_awt/Window/indexTGF.html#ShapeGeneral[nullShapeForFullScreen]
        The following code causes NPE on Solaris.
        JDK: 7 build 74
        Platform: Solaris x86
        ------------------------------------------------------------------------------------------
        import java.awt.*;

        public class NPE {

            public static void main(String[] args) {
                GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
                devices[0].setFullScreenWindow(new Frame());
                devices[0].setFullScreenWindow(null);
            }
        }
        ------------------------------------------------------------------------------------------

        <db158260@zenit(pts/28).278> /set/java/re/j2se/7/promoted/latest/binaries/solaris-i586/bin/java NPE
        Exception in thread "main" java.lang.NullPointerException
                at sun.awt.X11GraphicsDevice.setDisplayMode(X11GraphicsDevice.java:388)
                at sun.awt.X11GraphicsDevice.setFullScreenWindow(X11GraphicsDevice.java:330)
                at NPE.main(NPE.java:10)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dcherepanov Dmitry Cherepanov
                  Reporter:
                  dbessono Dmitry Bessonov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: