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.
Build: NetBeans IDE Dev (Build 200903101401) VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b02 OS: Windows XP, 5.1, x86 User Comments: suchezi: fresh newest compilation giorgio42: Double-clicked on a gif image. Note that I am using a self-compiled NetBeans build. GUEST: i created a label inside a jframe, then i went into the jlabel property and click on the icon browse so that i can out an image on the label and the browse window didnt open hope this helps u GUEST: Happend when try to choose icon in jbutton! GUEST: property editor for label icon ogretech: Selecting the poperty editor for a JButton's icon GUEST: I created a label from the pallete i clicked on its properties and choose to browse for icons the icon browser doesnt open so i have to code the icon manually hope this helps GUEST: I have a problem with Icon ( JButton ). Stacktrace: java.lang.IndexOutOfBoundsException: off < 0 || len < 0 || off+len > b.length || off+len < 0! at javax.imageio.stream.MemoryCacheImageInputStream.read(MemoryCacheImageInputStream.java:85) at com.sun.imageio.plugins.gif.GIFImageReader.getCode(GIFImageReader.java:306) at com.sun.imageio.plugins.gif.GIFImageReader.read(GIFImageReader.java:881) at javax.imageio.ImageIO.read(ImageIO.java:1422) at javax.imageio.ImageIO.read(ImageIO.java:1326) at org.netbeans.modules.image.ImageDataObject.getImage(ImageDataObject.java:174)
Created attachment 78020 [details] stacktrace
changeset f71ca8bc6989 I've fixed the Exception but not the issue itself, because com.sun.imageio.plugins.gif.GIFImageReader class not able to read some gif files, and it is not related to Netbeans. Here is the code which will give an Exception for some gif files String fileStr="columnIndex.gif"; File file = new File(fileStr); Iterator<ImageReader> it = javax.imageio.ImageIO.getImageReadersByFormatName("GIF"); ImageReader reader = it.next(); FileImageInputStream input = new FileImageInputStream(file); reader.setInput(input); reader.read(0);
Created attachment 78041 [details] Example of image which cause the exception
Fixed
java bug: http://bugs.sun.com/view_bug.do?bug_id=6532025