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

VM resumes on request to step-over in NPE location

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • vm-legacy
    • mustang
    • generic, x86, sparc
    • generic, solaris_9, windows_2000



      Name: tb29552 Date: 07/15/2003


      FULL PRODUCT VERSION :
      java version "1.4.2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
      Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      When debugging the following sample program (using Eclipse JDI debugger), a breakpoint is placed on a line that will cause an NullPointerException to be generated. The line is then stepped over. The step request never completes - instead the VM resumes execution. The problem appears to occurr on 1.3.1 and 1.4.1 VMs as well as 1.4.2 VMs (does work on 1.2.2). The problem does not occurr with IBM VMs (1.3.1 and higher).

      Sample program (breakpoint on line 11, as indicated).

      public class StepOver {
        public static void main(String[] args) {
          try {
            foo();
          } catch (Exception e) {
          }
          while (true);
        }
        private static void foo() {
          String s= null;
          s.charAt(0); // <-- breakpoint here
        }
      }
       


      REPRODUCIBILITY :
      This bug can be reproduced always.
      (Review ID: 190900)
      ======================================================================

            dcubed Daniel Daugherty
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: