1 Reply Latest reply: Jun 24, 2011 4:58 AM by EJP RSS

    NPE thrown in DrawImage.renderImageXform()

    629254
      Hi Buddies,

      Have you ever met such error?

      java.lang.NullPointerException
           at sun.java2d.pipe.DrawImage.renderImageXform(DrawImage.java:490)
           at sun.java2d.d3d.D3DDrawImage.renderImageXform(D3DDrawImage.java:57)
           at sun.java2d.pipe.DrawImage.transformImage(DrawImage.java:251)
           at sun.java2d.pipe.DrawImage.scaleImage(DrawImage.java:739)
           at sun.java2d.pipe.DrawImage.scaleImage(DrawImage.java:1036)
           at sun.java2d.pipe.ValidatePipe.scaleImage(ValidatePipe.java:201)
           at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3052)

      The JDK is 1.6-24, and the OS is both Windows 7 and XP.
      I checked the code is
      localTransformHelper.Transform(localMaskBlit2, localSurfaceData1, localSurfaceData2, AlphaComposite.Src, null, localAffineTransform, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, 0, 0, m - j, n - k, arrayOfInt, j, k);
      The only possible null value is localTransformHelper. In which situation it will be null?

      Thanks in advance,
      Justin
        • 1. Re: NPE thrown in DrawImage.renderImageXform()
          EJP
          I checked the code is
          localTransformHelper.Transform(localMaskBlit2, localSurfaceData1, localSurfaceData2, AlphaComposite.Src, null, localAffineTransform, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, 0, 0, m - j, n - k, arrayOfInt, j, k);
          The only possible null value is localTransformHelper. In which situation it will be null?
          In the situations where your code sets it to null, or fails to set it to anything else. Without seeing the code concerned it is impossible to go further.