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

REGRESSION: Regtest-test java/awt/Graphics/DisposeTest/DisposeNOP.java test fail

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      mantis
    • CPU:
      x86
    • OS:
      linux, solaris_8, windows_xp
    • Verification:
      Verified

      Description



      Name: asR10013 Date: 09/24/2002


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.2-b02
      Testbase : RegTest-test
      Platform[s] : RedHat Linux 7.2 (GNOME), Windows XP Home, Solaris 9 (sparc) (GNOME), Solaris 8 (x86)
      Falling test[s]:
              java/awt/Graphics/DisposeTest/DisposeNOP.java

      java/awt/Graphics/DisposeTest/DisposeNOP.java fails on JDK1.4.2-b02.
      The test passed on JDK1.4.1-b21.
      This happens because the code related to sun.java2d.SunGraphics2D.dispose method
      was changed in JDK1.4.2. A new class sun.java2d.NullSurfaceData was introduced
      in JDK1.4.2 and its getRaster method contain the following code
              throw new InternalError("obsolete interface used");
      which leads to the failure.

      It worth to note that although the Java API specification requires that
      "A Graphics object cannot be used after dispose has been called", the test
      was written in response to the customer call (bugid 4107389):

      "We've got a slight inconsistency in our code when a Graphics object is
      used after a dispose. The Javadoc comment indicate that the Graphics
      object should not be used after a dipose BUT the Class Libraries book
      suggests that operations are ignored after a dispose."

      Also note that getRaster throws an Error and it is not caught by the test.
      As a result the test fails immediately under JavaTest, but runs infinitely
      when it is stated with the shell script provided below.

      jtr file location:
      ==================
      /net/jtgb4u4c.eng/export/sail15/results/mantis/b02/regtest/linux/redhat7.2_gnome_smp__linux-24/workDir/test/java/awt/Graphics/DisposeTest/DisposeNOP.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change its variables as needed)
       
      --- script start ---

      #!/bin/bash

      PS=':'
      JDK=/net/linux-15/export/home/java/jdk1.4.2/linux
      TEST_BASE=/net/linux-15/export/home/java/regtest
      TEST_PACKAGE=java/awt/Graphics/DisposeTest
      TEST_SHORT_NAME=DisposeNOP
      TEST_NAME=$TEST_PACKAGE/$TEST_SHORT_NAME

      TEST_SRC=$TEST_BASE/test/${TEST_NAME}.java

      export CLASSPATH=.${PS}${JDK}${PS}${JDK}/lib/tools.jar${PS}${TEST_BASE}${PS}${TEST_BASE}/test/${TEST_PACKAGE}

      $JDK/bin/javac -g -classpath $CLASSPATH -d . $TEST_SRC

      echo "$JDK/bin/java -cp $CLASSPATH $TEST_SHORT"

      $JDK/bin/java -cp $CLASSPATH $TEST_SHORT_NAME

      --- script end ---

      Test output:
      ============

      java.lang.InternalError: obsolete interface used
              at sun.java2d.NullSurfaceData.getRaster(NullSurfaceData.java:78)
              at sun.java2d.loops.OpaqueCopyAnyToArgb.Blit(CustomComponent.java:70)
              at sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:525)
              at sun.java2d.loops.MaskBlit$General.MaskBlit(MaskBlit.java:167)
              at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Blit.java:169)
              at sun.java2d.SunGraphics2D.copyArea(SunGraphics2D.java:1828)
              at DisposeNOP.test(DisposeNOP.java:77)
              at DisposeNOP.paint(DisposeNOP.java:50)
              at sun.awt.RepaintArea.paint(RepaintArea.java:177)
              at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:374)
              at java.awt.Component.dispatchEventImpl(Component.java:3661)
              at java.awt.Component.dispatchEvent(Component.java:3439)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:451)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)


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

        Attachments

          Activity

            People

            • Assignee:
              campbell Christopher Campbell (Inactive)
              Reporter:
              alssunw Als Als (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: