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

Window.dispose() under TreeLock causes deadlock

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_98, windows_xp

      Description

      The following minimized sample deadlocks

      import java.awt.*;

      public class Dispose {
          public static void main(String[] args) {
              Frame frame = new Frame();
              frame.setSize(100, 100);
              frame.setVisible(true);
              synchronized (frame.getTreeLock()) {
                   frame.dispose();
              }
          }
      }

      If user calls dispose from some awt method which holds TreeLock it
      causes deadlock even if the user code doesn't get TreeLock itself.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmikhalksunw Denis Mikhalkin (Inactive)
              Reporter:
              ssisunw Ssi Ssi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: