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

[macosx] Sometimes NSWindow.isZoomed hangs

    Details

    • Subcomponent:
    • Resolved In Build:
      b166
    • OS:
      os_x
    • Verification:
      Verified

      Backports

        Description

        Discussion at AWT mailing list - http://mail.openjdk.java.net/pipermail/awt-dev/2017-March/012661.html

        Steps to reproduce it with attached WindowTest.java, maybe you need 2-3 attempts:

        (0. start the demo program)
        1. click on the button in the first window ; a second window opens
        2. click on the button in the second dialog ; a third windows open
        3. move the third window via mouse and click on the label
        4. wait 9 seconds ; a fourth windows is opened (the fourth windows should be opened behind the third)
        5. try to close the fourth
        -> EDT is blocked

        The relevant thread stacks are:

        "AWT-EventQueue-0" #13 prio=6 os_prio=31 tid=0x00007fa86ea7e000 nid=0xd203 runnable [0x0000700010632000]
           java.lang.Thread.State: RUNNABLE
            at sun.lwawt.macosx.CWrapper$NSWindow.isZoomed(java.desktop@9-ea/Native Method)
            at sun.lwawt.macosx.CPlatformWindow.isMaximized(java.desktop@9-ea/CPlatformWindow.java:509)
            at sun.lwawt.macosx.CPlatformWindow.setVisible(java.desktop@9-ea/CPlatformWindow.java:558)
            at sun.lwawt.LWWindowPeer.setVisibleImpl(java.desktop@9-ea/LWWindowPeer.java:253)
            at sun.lwawt.LWComponentPeer.setVisible(java.desktop@9-ea/LWComponentPeer.java:763)
            at java.awt.Component.hide(java.desktop@9-ea/Component.java:1705)
            - locked <0x00000007a48a2c20> (a java.awt.Component$AWTTreeLock)
            at java.awt.Window.hide(java.desktop@9-ea/Window.java:1118)
            at java.awt.Dialog.hide(java.desktop@9-ea/Dialog.java:1152)
            at java.awt.Window.hide(java.desktop@9-ea/Window.java:1110)
            - locked <0x00000007a802e218> (a java.util.Vector)
            at java.awt.Dialog.hide(java.desktop@9-ea/Dialog.java:1152)
            at java.awt.Component.show(java.desktop@9-ea/Component.java:1670)
            at java.awt.Component.setVisible(java.desktop@9-ea/Component.java:1615)
            at java.awt.Window.setVisible(java.desktop@9-ea/Window.java:1017)
            at java.awt.Dialog.setVisible(java.desktop@9-ea/Dialog.java:1005)
            
        "AppKit Thread" #11 daemon prio=5 os_prio=31 tid=0x00007fa87076b000 nid=0x307 waiting for monitor entry [0x00007fff5e87e000]
           java.lang.Thread.State: BLOCKED (on object monitor)
            at java.awt.Window.getOwnedWindows_NoClientCode(java.desktop@9-ea/Window.java:1478)
            - waiting to lock <0x00000007a802e218> (a java.util.Vector)
            at java.awt.Window$1.getOwnedWindows(java.desktop@9-ea/Window.java:4127)
            at sun.lwawt.macosx.CPlatformWindow.orderAboveSiblingsImpl(java.desktop@9-ea/CPlatformWindow.java:1153)
            at sun.lwawt.macosx.CPlatformWindow.orderAboveSiblings(java.desktop@9-ea/CPlatformWindow.java:1118)
            at sun.lwawt.macosx.CPlatformWindow.windowDidBecomeMain(java.desktop@9-ea/CPlatformWindow.java:1182)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dmarkov Dmitry Markov
                  Reporter:
                  dmarkov Dmitry Markov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: