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

Windows are incorrectly removed from the ownedWindowList during disposal

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.2.0
    • client-libs
    • None
    • 1.2fcs
    • generic
    • generic
    • Not verified

      Currently, Window.dispose removes the Window from its parent's ownedWindowList
      Vector. This is incorrect from a specification standpoint. Recall that dispose()
      does not make a java.awt.Window unusable; rather, it destroys the peer and any
      other native screen resources allocated for the Window. The Window can be reused
      by directly or indirectly invoking addNotify on it a second time.

      In addition to the specification issue, invalidating the ownedWindowList can
      lead to crashes on both platforms. If an owned Window considers another Window
      its parent, but the parent does not contain the owned Window in its
      ownedWindowList Vector, then when the parent Window is disposed(), its peer
      is removed, but the peer of the owned Window is not. The native owned Window now
      refers to another native Widget which no longer exists. When the owned Window
      tries to access this Widget, the VM can crash.

            dmendenhsunw David Mendenhall (Inactive)
            dmendenhsunw David Mendenhall (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: