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

NullPointerException in java.awt.image.ComponentColorModel in openjdk 1.8.0_412

XMLWordPrintable

    • 2d
    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      Linux
      openjdk version "1.8.0_412"

      A DESCRIPTION OF THE PROBLEM :
      Getting a NPE with that stacktrace

      java.lang.NullPointerException
      at java.awt.image.ComponentColorModel.getDataElements(ComponentColorModel.java:1555)
      at sun.awt.image.PixelConverter.rgbToPixel(PixelConverter.java:57)
      at sun.java2d.loops.SurfaceType.pixelFor(SurfaceType.java:434)
      at sun.java2d.SurfaceData.pixelFor(SurfaceData.java:973)
      at sun.java2d.SunGraphics2D.validateColor(SunGraphics2D.java:1755)
      at sun.java2d.SunGraphics2D.<init>(SunGraphics2D.java:290)
      at sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEnvironment.java:186)
      at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1182)

      The exactly same code works with the oracle JDK.
      What changes:
      in ComponentColorModel with the Oracle JDK we get in this condition, not with the openjdk version
      if (ColorModel.isLinearGRAYspace(ics)) {


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: