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

Share W/S: NPE in sun.java2d.loops.GraphicsPrimitiveProxy.instantiate

    XMLWordPrintable

Details

    • 2d
    • b24
    • x86
    • windows_xp
    • Verified

    Description



      Name: vsR10238 Date: 10/06/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b19)
      Java HotSpot(TM) Client VM (build 20030925111405.kbr.share_baseline, mixed mode)
      Testbase : Regression-test
      Platform[s] : all
      Falling test[s]:
               sun/java2d/loops/GraphicsPrimitiveProxyTest.java
               java/awt/image/BufferedImage/SubBandBug.java
               java/awt/Graphics2D/DrawString/DrawStringToCustom.java

      These 3 Regression tests from the test suite for JDK1.5.0-b19 fail with
      JDK1.5.0-b19 (build 20030925111405.kbr.share_baseline) with class sharing enabled.

      The tests fail on some computers of all 4 platforms we use for testing
      (Linux, Windows, Solaris Sparc, Solaris x86) but pass on some Linux and Windows computers.

      The tests failed on the following computers:

      Windows XP Pro (linux-16)
      Solaris 9 Sparc (Gnome) (novo48)
      Solaris 10 x86 (Gnome) (linux-18)
      Suse 8.1 Linux (Gnome) (linux-12)

      The tests pass on original JDK1.5.0-b19 installations (also pass with JDK1.5.0-b22).

      Test source location:
      =====================
      /java/re/jdk/1.5.0/promoted/all/b19/ws/j2se/test/sun/java2d/loops/GraphicsPrimitiveProxyTest.java
      /java/re/jdk/1.5.0/promoted/all/b19/ws/j2se/test/java/awt/image/BufferedImage/SubBandBug.java
      /java/re/jdk/1.5.0/promoted/all/b19/ws/j2se/test/java/awt/Graphics2D/DrawString/DrawStringToCustom.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b19s_on/regtest/win32/winXP_linux-16/workDir/test/sun/java2d/loops/GraphicsPrimitiveProxyTest.jtr
      /net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b19s_on/regtest/win32/winXP_linux-16/workDir/test/java/awt/image/BufferedImage/SubBandBug.jtr
      /net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b19s_on/regtest/win32/winXP_linux-16/workDir/test/java/awt/Graphics2D/DrawString/DrawStringToCustom.jtr

      How to reproduce:
      =================
      1) Install JDK1.5.0-b19
      2) Replace jvm.*, jvm_g.* from the build with class sharing
      (from windows_i486_compiler1/bin to jre/bin/client; from windows_i486_compiler2/bin to /jre/bin/server)
      Below is an except from the instructions we use for testing:

            "- The root directory containing the built JVMs is
              /net/animorphic.sfbay/export/kbr/tmp/sharing_test_builds/"

      3) Generate the shared archive for the installation. Below is an excerpt from the instructions we use for testing:

          "- The class lists for testing purposes are contained in
              /net/animorphic.sfbay/export/kbr/tmp/sharing_test_classlists.
            - Copy one of classlist.solaris, classlist.linux, or
              classlist.windows to a file named "classlist". Change to the
              directory containing this file and run the command "java
              -Xdump" or "java -server -Xdump" or both. This will cause a
              file called classes.jsa or classes_g.jsa to be created in the
              same directory where libjvm.so / jvm.dll resides. If it becomes
              necessary to regenerate the shared archive, first rm -f the
              classes.jsa or classes_g.jsa file before attempting to
              regenerate it."


      4) Run the following script (you may need to change its variables)

      --- script start ---
      #!/bin/sh
      RESULT_DIR=`pwd`
      WORK_DIR=$RESULT_DIR/workDir/test
      REPORT_DIR=$RESULT_DIR/reportDir

      #KOORI_ONESTOP is your path to koori.sfbay/onestop (/net/koori/onestop, /java/re)
      KOORI_ONESTOP="z:"
      #JPSE04 is your path to /net/jdk/export/jpse04
      JPSE04="x:"

      #JT_HOME="h:/java/jct"
      JT_HOME="$KOORI_ONESTOP/jct-tools/3.1.2/archive/fcs/binaries"
      #JEMMY_JAR="$JT_HOME/jemmy/jemmy.jar"
      JEMMY_JAR="$JPSE04/Jemmy/jemmy.jar"
      JAVA_HOME="c:/j2sdk1.5.0"

      #TEST_BASE_PATH="h:/java/regtest.tiger/test"
      TEST_BASE_PATH="$KOORI_ONESTOP/jdk/1.5.0/promoted/all/b19/ws/j2se/test"


      TESTVMOPTS="-client"
      CLASSPATH="$JT_HOME/classes;$JT_HOME/lib/javatest.jar;$JT_HOME/lib/jtreg.jar"

      TEST="java/awt/Graphics2D/DrawString/DrawStringToCustom.java"

      mkdir -p $WORK_DIR/scratch 2>&1
      mkdir -p $WORK_DIR/jtData 2>&1
      mkdir -p $REPORT_DIR 2>&1

      #rm $WORK_DIR/jtData/ResultCache.jtw 2>&1

      cd $WORK_DIR/scratch

      $JAVA_HOME/bin/java -server -cp $CLASSPATH -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,windir=$windir,SystemRoot=$SystemRoot,PATH=${SHELL%/*},CPAPPEND=$JEMMY_JAR,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-16" -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/$TEST"

      --- script end ---


      Test output (jtr part):
      =======================
      ----------System.out:(0/0)----------
      ----------System.err:(30/2005)----------
      java.lang.NullPointerException
      at sun.java2d.loops.GraphicsPrimitiveProxy.instantiate(GraphicsPrimitiveProxy.java:62)
      at sun.java2d.loops.GraphicsPrimitiveMgr.locate(GraphicsPrimitiveMgr.java:222)
      at sun.java2d.loops.GraphicsPrimitiveMgr.locatePrim(GraphicsPrimitiveMgr.java:179)
      at sun.java2d.loops.GraphicsPrimitiveMgr.locate(GraphicsPrimitiveMgr.java:132)
      at sun.java2d.loops.DrawLine.locate(DrawLine.java:37)
      at sun.java2d.SurfaceData.makeRenderLoops(SurfaceData.java:499)
      at sun.awt.image.BufImgSurfaceData.getSolidLoops(BufImgSurfaceData.java:348)
      at sun.awt.image.BufImgSurfaceData.initSolidLoops(BufImgSurfaceData.java:333)
      at sun.awt.image.BufImgSurfaceData.createData(BufImgSurfaceData.java:216)
      at sun.awt.image.CachingSurfaceManager.<init>(CachingSurfaceManager.java:157)
      at sun.awt.windows.WinCachingSurfaceManager.<init>(WinCachingSurfaceManager.java:86)
      at sun.java2d.SurfaceManagerFactory.createCachingManager(SurfaceManagerFactory.java:34)
      at sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:69)
      at sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:45)
      at sun.java2d.SurfaceData.getDestSurfaceData(SurfaceData.java:112)
      at sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEnvironment.java:327)
      at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1050)
      at DrawStringToCustom.main(DrawStringToCustom.java:52)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
      at java.lang.Thread.run(Thread.java:549)

      JavaTest Message: Test threw exception: java.lang.NullPointerException
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.NullPointerException
      result: Failed. Execution failed: `main' threw exception: java.lang.NullPointerException


      test result: Failed. Execution failed: `main' threw exception: java.lang.NullPointerException


      Specific machine info:
      ======================
      Hostname: linux-16
      OS: Windows XP Pro



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

      Attachments

        Issue Links

          Activity

            People

              campbell Christopher Campbell (Inactive)
              vshsunw Vsh Vsh (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: