-
Bug
-
Resolution: Fixed
-
P4
-
e6u10, 6, 6u30, 6u38, 7
-
b14
-
generic, x86, arm
-
generic, linux, windows_xp
-
Verified
I am creating a buffered image of type TYPE_INT_ARGB with a specific size. I am getting the GIF writer from the registry and writing this empty, transparent buffered image to a file. As soon as I call, writer.write(bi), I am getting a NullPointerException on the console.
This is reproducible on all platforms. This is not reproducible for other writers and occurs only for GIF. This is seen since Mustang-b39.
I have attached a sample test. Execute the sample test. If you see the following exception on the console, the bug is reproduced.
java.lang.NullPointerException
at com.sun.imageio.plugins.common.PaletteBuilder.findPaletteEntry(PaletteBuilder.java:310)
at com.sun.imageio.plugins.common.PaletteBuilder.getIndexColorModel(PaletteBuilder.java:296)
at com.sun.imageio.plugins.common.PaletteBuilder.getIndexedImage(PaletteBuilder.java:145)
at com.sun.imageio.plugins.common.PaletteBuilder.createIndexedImage(PaletteBuilder.java:77)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:569)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:499)
at javax.imageio.ImageWriter.write(ImageWriter.java:598)
at WriteARGBEmptyImage.<init>(WriteARGBEmptyImage.java:30)
at WriteARGBEmptyImage.main(WriteARGBEmptyImage.java:41)
###@###.### 2005-06-20 12:44:39 GMT
This is reproducible on all platforms. This is not reproducible for other writers and occurs only for GIF. This is seen since Mustang-b39.
I have attached a sample test. Execute the sample test. If you see the following exception on the console, the bug is reproduced.
java.lang.NullPointerException
at com.sun.imageio.plugins.common.PaletteBuilder.findPaletteEntry(PaletteBuilder.java:310)
at com.sun.imageio.plugins.common.PaletteBuilder.getIndexColorModel(PaletteBuilder.java:296)
at com.sun.imageio.plugins.common.PaletteBuilder.getIndexedImage(PaletteBuilder.java:145)
at com.sun.imageio.plugins.common.PaletteBuilder.createIndexedImage(PaletteBuilder.java:77)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:569)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:499)
at javax.imageio.ImageWriter.write(ImageWriter.java:598)
at WriteARGBEmptyImage.<init>(WriteARGBEmptyImage.java:30)
at WriteARGBEmptyImage.main(WriteARGBEmptyImage.java:41)
###@###.### 2005-06-20 12:44:39 GMT
- duplicates
-
JDK-6301101 GIF Writer throws NPE when writing a buffered image created through GC.createCompatibleImage()
- Closed
-
JDK-6828689 linux-arm: GIFProgressiveDisposalTest throw NullPointerException
- Closed
-
JDK-7114670 GIFProgressiveDisposalTest: NPE thrown
- Closed
-
JDK-6542772 1.7.0-b10 threw NullPointerException at com.sun.imageio.plugins.common.PaletteBuilder.findPaletteEnt
- Closed
-
JDK-6680211 Null Pointer Exception in PaletteBuilder
- Closed