Home > javax imageio iioexception error > javax.imageio.iioexception error reading png metadata

Javax.imageio.iioexception Error Reading Png Metadata

After attaching an image to a JIRA issue, the image doesn't seem to be successfully attached. If you click on Cancel or refresh the page, you will not be able to view the issue any longer. It just keeps trying to load but remains a blank page Following appears in theatlassian-jira.log: 2015-07-22 15:33:55,179 file-attachment-store:thread-2 ERROR admin 933x119x2 1t0ctls 0:0:0:0:0:0:0:1 /plugins/servlet/streams [core.util.thumbnail.Thumber] Unable to create thumbnail image for id 11817 javax.imageio.IIOException: Error reading PNG metadata at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(PNGImageReader.java:769) at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1229) at com.sun.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:1577) at com.atlassian.core.util.thumbnail.Thumber.scaleImage(Thumber.java:231) at com.atlassian.core.util.thumbnail.Thumber.createThumbnail(Thumber.java:291) at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:270) at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$3.withInputStream(DefaultThumbnailManager.java:252) at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$3.withInputStream(DefaultThumbnailManager.java:248) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$8.get(DefaultAttachmentManager.java:874) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$8.get(DefaultAttachmentManager.java:868) at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$2.get(DefaultFileSystemAttachmentStore.java:145) at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$2.get(DefaultFileSystemAttachmentStore.java:141) at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$3.call(DefaultFileSystemAttachmentStore.java:178) at com.atlassian.util.concurrent.Executors$DefaultSubmitter$CallableRunner.run(Executors.java:62) at com.atlassian.util.concurr

ExportXMLWordPrintable Details Type: Bug Status: Resolved Priority: P3 Resolution: Fixed Affects Version/s: 7 Fix Version/s: 8 Component/s: client-libs Labels: 8-target-client webbug Subcomponent: javax.imageio Resolved In Build: b112 OS: generic Description FULL PRODUCT VERSION : java version " 1.7.0_25 " Java(TM) SE Runtime Environment (build 1.7.0_25-b15) Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed https://confluence.atlassian.com/jirakb/unable-to-view-issue-in-jira-after-attaching-a-png-file-770802999.html mode) ADDITIONAL OS VERSION INFORMATION : Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 A DESCRIPTION OF THE PROBLEM : While inspecting PNG header, com.sun.imageio.plugins.wbmp.WBMPImageReaderSpi.canDecodeInput() throws IOException because the first byte of a PNG header is 137 https://bugs.openjdk.java.net/browse/JDK-8022632 (unsigned byte), which was read as a negative value (signed byte). Hence it doesn't call " stream.reset() " and when the image is passed to PNGImageReader, the first byte is skipped and the reader falsely throws " javax.imageio.IIOException: Bad PNG signature! " . REGRESSION. Last worked in version 6u43 STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : just call javax.imageio.ImageIO.read() with any PNG file. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Should read a PNG file successfully. ACTUAL - It throws " javax.imageio.IIOException: Bad PNG signature! " exception. ERROR MESSAGES/STACK TRACES THAT OCCUR : javax.imageio.IIOException: I/O error reading PNG header! at com.sun.imageio.plugins.png.PNGImageReader.readHeader(PNGImageReader.java:315) at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(PNGImageReader.java:654) at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1229) at com.sun.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:1577) at javax.imageio.ImageIO.read(ImageIO.java:1448) at com.syslore.image.reader.BufferedImageBlobImageReader.read(BufferedImageBlobImageReader.java:34) at com.syslore.image.reader.BlobImageFactory.create(BlobImageFactory.java:61) at com.syslore.flowmanager.autocrop.SimpleAutoCropper.crop(SimpleAutoCropper.java:56) at com.syslore.flowmanager.preprocess.AutoCropperBlobImageBuilder.build(AutoCropperBlobImageBuilder.java:55) at com.syslore.flowmanager.preprocess.AutoCropperBlobIma

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack http://stackoverflow.com/questions/6894218/error-reading-png-metadata-android-ui-designer-within-eclipse Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error reading PNG metadata Android UI designer within Eclipse up vote 3 down vote favorite 1 javax.imageio.iioexception error I'm using the Android plug-in in my Eclipse environment to design layouts. I have a variety of PNG files in different locations. Some of these PNG files cannot be rendered by the plug-in although they can be opened in image editors and appear perfectly in the application itself. The error displayed on the plug-in depends on the Android version chosen. For >= 3.0, I see: Failed lot load MyProjDir\res\drawable\roll.png for Android javax.imageio.iioexception error reading <3.0, I see: Unable to resolve drawable >"MyProjDir\res\drawable\roll.png" in attribute "src" Either way, the error log shows: javax.imageio.IIOException: Error reading PNG metadata at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(Unknown Source) at com.sun.imageio.plugins.png.PNGImageReader.readImage(Unknown Source) at com.sun.imageio.plugins.png.PNGImageReader.read(Unknown Source) at javax.imageio.ImageIO.read(Unknown Source) ... many more entries ... It would appear that the PNG's with the problem have some metadata (or lack some metadata), causing the issue. One possibility, is to save the PNG's using some other editor. I'm using GIMP, and I've tried Windows 7's Paint to no avail. Any suggestions? android eclipse android-layout png share|improve this question asked Aug 1 '11 at 4:28 Livingston 12017 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted Try switching to a different Java SDK. I get that same "Error reading PNG metadata" error when using Sun Java 5 though the same exact thing works with OpenJDK or Sun Java 6. share|improve this answer answered Nov 15 '11 at 4:11 Blaine 1,1541011 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and ter

 

Related content

javax.imageio.iioexception error reading png image data

Javax imageio iioexception Error Reading Png Image Data p here for a quick overview of relatedl the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Javax ImageIO IIOException