Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-19557

Thumbnail of certain image attachments fail and cause ERROR in log

XMLWordPrintable

      Steps to create problematic image:

      1. On a Mac using OS X 10.5 or 10.6
      2. Use Preview to capture part of the screen (File > Grab)
      3. Save the image in GIF format.
      4. Attach the GIF image to a JIRA issue, then open that issue.

      Problem:

      • Thumbnail does not appear in image attachments
      • ERRORS appear in logs:
      2009-10-28 10:51:57,863 http-8080-Processor21 ERROR [core.util.thumbnail.Thumber] Unable to create thumbnail image for id 10000
      javax.imageio.IIOException: Unexpected block type 0!
              at com.sun.imageio.plugins.gif.GIFImageReader.readMetadata(GIFImageReader.java:721)
              at com.sun.imageio.plugins.gif.GIFImageReader.read(GIFImageReader.java:954)
              at javax.imageio.ImageIO.read(ImageIO.java:1400)
              at javax.imageio.ImageIO.read(ImageIO.java:1322)
              at com.atlassian.core.util.thumbnail.Thumber.getImage(Thumber.java:281)
              at com.atlassian.core.util.thumbnail.Thumber.createThumbnail(Thumber.java:241)
              at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:215)
              at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:86)
              at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnail(DefaultThumbnailManager.java:104)
              at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnails(DefaultThumbnailManager.java:50)
      
      2009-10-28 10:51:57,874 http-8080-Processor21 ERROR [webwork.util.ValueStack] METHOD: "attachment", exception: 
      com.atlassian.jira.exception.AttachmentNotFoundException: null
              at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:85)
      
      2009-10-28 10:51:57,882 http-8080-Processor21 ERROR [webwork.util.ValueStack] METHOD: "latestFile", exception: 
      java.lang.NullPointerException
              at com.atlassian.jira.web.bean.LatestFileBean.isLatestFile(LatestFileBean.java:44)
      

      (I attached a full log file for posterity)

      I tested this against JIRA 3.13.5 and the issue does not occur - this is new in 4.0.

      Using this method of doing screen grabs works if you save to JPEG instead of GIF.

        1. atlassian-jira.log
          350 kB
        2. brokenthumbnail.gif.gz
          13 kB
        3. maxatpsuppfactspanel.jpg
          maxatpsuppfactspanel.jpg
          1.07 MB
        4. more_bad.txt
          11 kB

              chris@atlassian.com Chris Mountford
              mtokar Michael Tokar
              Votes:
              7 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: