This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178906

Summary: IllegalArgumentException: Numbers of source Raster bands and source color space components do not match
Product: guibuilder Reporter: Tiven
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 163795
Attachments: stacktrace

Description Tiven 2009-12-20 13:51:50 UTC
Build: NetBeans IDE 6.7.1 (Build 200907230233)
VM: Java HotSpot(TM) Client VM, 14.3-b01, Java(TM) SE Runtime Environment, 1.6.0_17-b04
OS: Windows 7, 6.1, x86

User Comments:
Tiven: It happens everytime im trying to click on the three dots button of the icon option for the label.



Stacktrace: 
java.lang.IllegalArgumentException: Numbers of source Raster bands and source color space components do not match
   at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:460)
   at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1114)
   at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(JPEGImageReader.java:0)
   at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1082)
   at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:897)
   at javax.imageio.ImageIO.read(ImageIO.java:1422)
Comment 1 Tiven 2009-12-20 13:51:54 UTC
Created attachment 92799 [details]
stacktrace
Comment 2 Jan Stola 2009-12-22 09:27:28 UTC
I was able to reproduce this issue using the following image:
http://farm4.static.flickr.com/3655/3591243423_a258d87ea6.jpg

It seems to be a bug in JDK. ImageIO.read() throws IllegalArgumentException for some valid images (that can be created using 'new ImageIcon(...)').

Related JDK bugs seems to be:
http://bugs.sun.com/view_bug.do?bug_id=4893408
http://bugs.sun.com/view_bug.do?bug_id=4884308

We will implement some workaround. You should remove or save the problematic image in another format (to be able to use it in GUI builder in NetBeans 6.7 or 6.8).
Comment 3 Jan Stola 2009-12-22 09:49:23 UTC
Fixed.

Modified file: http://hg.netbeans.org/cdev/rev/079cc22559e2