JDK-4636269 : Deadlock when showing a modal dialog from a windowDeactivated event
  • Type: Bug
  • Status: Resolved
  • Resolution: Fixed
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P4
  • Affected Version: 1.4.0
  • OS: generic
  • CPU: generic
  • Submit Date: 2002-02-11
  • Updated Date: 2002-08-22
  • Resolved Date: 2002-08-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.2 mantisResolved
Related Reports
Relates :  
Description
I am filing this report based on an email.  It is JDK1.4 RC1 feedback.   
See Comments for the email.  

I listed the platform as generic because it wasn't included in the email.  

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class AwtLockBug {

    public AwtLockBug() {
        new MyFrame();
        new MyFrame();
    }

    public class MyFrame extends JFrame {
        public MyFrame() {
            super();
            final MyFrame frame = this;
            addWindowListener(new WindowAdapter() {
                                  public void windowClosing(WindowEvent e) {
                                      System.exit(0);
                                  }
                                  public void windowDeactivated(WindowEvent e) {
                                      new ModalDialog(frame);
                                  }
                              });
            setBounds(0,0,100,100);
            setVisible(true);
        }
    }

    public class ModalDialog extends JDialog {
        public ModalDialog(Frame frame) {
            super(frame, "ModalDialog", true);
            setBounds(100,100,100,100);
            setVisible(true);
        }
    }

    public static void main(String args[]) {
        new AwtLockBug();
    }
}

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis
2004-08-24

EVALUATION Commit to fix in mantis (hang). ###@###.### 2002-02-11 Name: osR10079 Date: 08/02/2002 The problem is the same as 4531693 ====================================================================== Name: osR10079 Date: 08/02/2002 The problem is the same as 4531693 ======================================================================
2004-08-24