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

STD: jdb Internal error when stepping past breakpoint set in javax.swing.JPopupM

XMLWordPrintable

    • beta
    • x86
    • windows_nt
    • Not verified



      Name: gsC80088 Date: 02/15/99


      First, compile this class:

      import javax.swing.*;

      public class DebugCrash extends JFrame
      {
          
          public DebugCrash()
          {
      String[] list = {"Foo", "bar"};
      getContentPane().add(new JComboBox(list));
      pack();
          }

          public static void main(String[] args)
          {
      JFrame f = new DebugCrash();
      f.setVisible(true);
          }

      }

      Then start the debugger (i.e. type jdb DebugCrash).

      Here is my transcript of a debug session. Note that I set a breakpoint
      on the setVisible method of javax.swing.JPopupMenu and when the debugger
      tries to step past that code it crashes.

      H:\robert\java\src>jdb DebugCrash
      Initializing jdb...
      0xae:class(DebugCrash)
      > use d:\java\jdk1.2\src
      > stop in javax.swing.JPopupMenu.setVisible
      Breakpoint set in javax.swing.JPopupMenu.setVisible
      > run
      run DebugCrash
      running ...
      main[1]
      Current thread "main" died. Execution continuing...
      >
      Breakpoint hit: javax.swing.JPopupMenu.setVisible (JPopupMenu:726)
      AWT-EventQueue-0[1] list
      722 * description: Makes the popup visible
      723 */
      724 public void setVisible(boolean b) {
      725 // Is it a no-op?
      726 => if (b == isVisible())
      727 return;
      728
      729 // if closing, first close all Submenus
      730 if (b == false) {
      AWT-EventQueue-0[1] next
      java.lang.InternalError: unknown JVMDI errorAWT-EventQueue-0[1]
              at sun.tools.agent.CachedMethod.getCode(Native Method)
              at sun.tools.agent.CachedMethod.fetchCode(CachedMethod.java:102)
              at sun.tools.agent.CachedMethod.byteAt(CachedMethod.java:165)
              at sun.tools.agent.StepHandler.stepLine(StepHandler.java:749)
              at sun.tools.agent.StepHandler.run(StepHandler.java:156)
      (Review ID: 53608)
      ======================================================================

            ghirschsunw Gordon Hirsch (Inactive)
            gstone Greg Stone
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: