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

JCK-interactive: NullPointerException for java.awt.FileDialog constructor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.4.0
    • client-libs
    • 2d
    • x86
    • windows_nt



      Name: icR10030 Date: 12/07/2000


      The following JCK13 tests fail in win32 under build 1.4beta-B42:
      api/java_awt/interactive/FileDialogTests.html#FileDialogTests
      api/java_awt/interactive/ComponentTests.html#ComponentTests

      Bug Description:
      Constructor for class java.awt.FileDialog causes NullPointerException.

      To reproduce the bug, run script below
      You may need to set JCK and JAVA_HOME.
      -------------------------------------------------------------------------------------
      #!/bin/sh
      SWITCH=${@}
      JAVA_HOME=x:/usr/local/java/jdk1.4/win
      JCK=x:/net/sqesvr/export/st1/JCK-13

      CLASSPATH=${JCK}/classes:${JCK}/javatest.jar
      export CLASSPATH
      executeClass=javasoft.sqe.tests.api.java.awt.interactive.FileDialog.FileDialogTests

      $JAVA_HOME/bin/java ${SWITCH} -version
      $JAVA_HOME/bin/java ${SWITCH} -client -Xfuture ${executeClass} -TestCaseID ALL
      JScrollBarTest0002
      RESULT="$?"
      if [ $RESULT = 95 ]; then
       echo Test passed
      elif [ $RESULT = 97 ]; then
       echo Test failed
      else
       echo Result is $RESULT
      fi
      -------------------------------------------------------------------------------------

      I have following log for api/java_awt/interactive/FileDialogTests.html#FileDialogTests:
      FileDialogTest0002: Failed. FileDialog created by FileDialog(Frame,String) constructor does not look and behave correctly.
      FileDialogTest0003: Failed. FileDialog created by FileDialog(Frame,String,int) constructor does not look and behave correctly FileDialog mode LOAD.
      FileDialogTest0004: Failed. FileDialog created by FileDialog(Frame,String,int) constructor does not look and behave correctly FileDialog mode SAVE.
      FileDialogTest0005: Failed. FileDialog test does NOT work as expected.
      FileDialogTest0006: Failed. FileDialog test does NOT work as expected.
      ----------log:(126/8177)----------
      java.lang.NullPointerException: component argument pData
              at sun.awt.windows.Win32SurfaceData.initOps(Native Method)
              at sun.awt.windows.Win32SurfaceData.<init>(Win32SurfaceData.java:217)
              at sun.awt.windows.Win32SurfaceData.createData(Win32SurfaceData.java:123)
              at sun.awt.windows.WComponentPeer.<init>(WComponentPeer.java:410)
              at sun.awt.windows.WCanvasPeer.<init>(WCanvasPeer.java:22)
              at sun.awt.windows.WPanelPeer.<init>(WPanelPeer.java:56)
              at sun.awt.windows.WWindowPeer.<init>(WWindowPeer.java:60)
              at sun.awt.windows.WFileDialogPeer.<init>(WFileDialogPeer.java:51)
              at sun.awt.windows.WToolkit.createFileDialog(WToolkit.java:321)
              at java.awt.FileDialog.addNotify(FileDialog.java:186)
              at java.awt.Dialog.conditionalShow(Dialog.java:339)
              at java.awt.Dialog.show(Dialog.java:395)
              at java.awt.Component.show(Component.java:1084)
              at java.awt.Component.setVisible(Component.java:1041)
              at javasoft.sqe.tests.api.java.awt.interactive.FileDialog.FileDialogDisplayer.actionPerformed(FileDialogDisplayer.java:67)
              at java.awt.Button.processActionEvent(Button.java:336)
              at java.awt.Button.processEvent(Button.java:309)
              at java.awt.Component.dispatchEventImpl(Component.java:2899)
              at java.awt.Component.dispatchEvent(Component.java:2766)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
              at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:140)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:121)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
      ...
      ...
      ...
      java.lang.NullPointerException: component argument pData
              at sun.awt.windows.Win32SurfaceData.initOps(Native Method)
              at sun.awt.windows.Win32SurfaceData.<init>(Win32SurfaceData.java:217)
              at sun.awt.windows.Win32SurfaceData.createData(Win32SurfaceData.java:123)
              at sun.awt.windows.WComponentPeer.<init>(WComponentPeer.java:410)
              at sun.awt.windows.WCanvasPeer.<init>(WCanvasPeer.java:22)
              at sun.awt.windows.WPanelPeer.<init>(WPanelPeer.java:56)
              at sun.awt.windows.WWindowPeer.<init>(WWindowPeer.java:60)
              at sun.awt.windows.WFileDialogPeer.<init>(WFileDialogPeer.java:51)
              at sun.awt.windows.WToolkit.createFileDialog(WToolkit.java:321)
              at java.awt.FileDialog.addNotify(FileDialog.java:186)
              at java.awt.Dialog.conditionalShow(Dialog.java:339)
              at java.awt.Dialog.show(Dialog.java:395)
              at java.awt.Component.show(Component.java:1084)
              at java.awt.Component.setVisible(Component.java:1041)
              at javasoft.sqe.tests.api.java.awt.interactive.FileDialog.FileDialogTests$cButton.actionPerformed(FileDialogTests.java:432)
              at java.awt.Button.processActionEvent(Button.java:336)
              at java.awt.Button.processEvent(Button.java:309)
              at java.awt.Component.dispatchEventImpl(Component.java:2899)
              at java.awt.Component.dispatchEvent(Component.java:2766)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
              at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:140)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:121)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
      STATUS:Failed.tests: 5; failed: 5; first test case failure: FileDialogTest0002
      result: Failed. tests: 5; failed: 5; first test case failure: FileDialogTest0002

      ======================================================================

            Unassigned Unassigned
            ichesunw Iche Iche (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: