Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6013

Problems with null pointer exception catch in server or opt mode for Java applications

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.0M7
    • None
    • DRLVM
    • None
    • Windows XP OS, Intel Core(TM)2 Duo CPU
    • Advanced

    Description

      Harmony has problems with null pointer exception catch under server or opt mode for Java applications.

      The following shows a test example:

      public class Btest5710 {

      Object obj;

      public static void main(String [] args)

      { (new Btest5710()).test(); }

      public void test() {
      System.err.println("Start Btest5710 test...");
      try

      { sync(); System.err.println("FAILED: NullPointerException was expected"); System.exit(-99); }

      catch (NullPointerException e)

      { System.err.println("PASSED: " + e); }

      catch (Throwable e)

      { System.err.println("Unexpected exception was thrown:"); e.printStackTrace(); System.err.println("FAILED"); System.exit(-99); }

      }

      void sync() {
      synchronized (obj)

      { obj = new Object(); }

      }

      }

      When running in server or opt mode, error will happen and the following is the error message.

      Signal reported: GENERAL_PROTECTION_FAULT
      Registers:
      EAX: 0x0003f700, EBX: 0x208667ac, ECX: 0x00000004, EDX: 0x00000003
      ESI: 0x02fed15c, EDI: 0x0013f8c0, ESP: 0x0013f6f8, EBP: 0x0086e740
      EIP: 0x00820b8f

      Attachments

        Activity

          People

            chunrong lai Chunrong Lai
            harmonyjit Zhiguo Ge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: