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

Images of .gif or .png format fail to appear on ticket

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • 6.3
    • 4.4.1, 5.2.2, 6.0-OD-14, 6.1
    • Issue - Attachments
    • Client: Mac OS 10.6.x, FF 7.0.1
      Server: Standalone (Apache Tomcat Version 6.0.32, Java(TM) SE Runtime Environment (build 1.6.0_26-b03))

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      When attaching .gif or .png images to a JIRA ticket under v4.4.1#660-r161644, they don't appear on the ticket main page. The Attachments section does appear (as opposed to when there are no attachments), however, it appears empty. You must go into "Manage attachments" to view the attachment in question.

      I saw JRA-19557 so this may be related, however the exception looks quite a bit different so I figured I would open a separate ticket and let you decide to close as duplicate and reopen that if applicable.

      Here is the first portion of the exception.

      2011-11-17 09:21:14,072 http-127.0.0.1-8080-20 ERROR cburt 561x496995x1 1e7rt94 10.128.9.139,127.0.0.1 /browse/CREATIVE-648 [webwork.util.ValueStack] query="/thumbnails" {[id="null" type="5" values=""]} {[id="thumbnails" type="8" values=""]}
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.GeneratedMethodAccessor955.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      

      The second error expected behaviour after attaching the image gif in JIRA 5.2.2:

      2012-12-17 18:58:22,242 http-bio-8080-exec-19 WARN admin 1138x57x1 1f6j7xn 0:0:0:0:0:0:0:1 /secure/IssueAction!default.jspa [jira.issue.thumbnail.DefaultThumbnailManager] Error writing to thumbnail file: C:\JIRA\5.2.1\atlassian-jira-5.2.1\jira-home\data\attachments\DEMO\DEMO-5\thumbs\_thumb_10100.png
      javax.imageio.IIOException: Unexpected block type 0!
      	at com.sun.imageio.plugins.gif.GIFImageReader.readMetadata(GIFImageReader.java:722)
      	at com.sun.imageio.plugins.gif.GIFImageReader.getWidth(GIFImageReader.java:167)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$ImageDimensionsHelper.dimensionsForImage(DefaultThumbnailManager.java:535)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$5.withInputStream(DefaultThumbnailManager.java:383)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$5.withInputStream(DefaultThumbnailManager.java:379)
      

      See image001.PNG.

      Additionally the following can occur which is specific to thumbnails:

      2013-12-19 23:58:00,430 http-bio-443-exec-45 ERROR john.liew 1438x7500x1 1rmvdjp 203.167.201.206 /secure/IssueAction!default.jspa [core.util.thumbnail.Thumber] Unable to create thumbnail image for id 30080
      java.io.IOException: Cannot read the image
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$1.getImage(DefaultThumbnailManager.java:215)
      	at com.atlassian.core.util.thumbnail.Thumber.createThumbnail(Thumber.java:416)
      	at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:384)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$2$1.withInputStream(DefaultThumbnailManager.java:282)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$2$1.withInputStream(DefaultThumbnailManager.java:278)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.withStreamConsumer(DefaultThumbnailManager.java:432)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.access$700(DefaultThumbnailManager.java:57)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$2.get(DefaultThumbnailManager.java:277)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$2.get(DefaultThumbnailManager.java:239)
      	at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:303)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.doGetThumbnail(DefaultThumbnailManager.java:239)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnail(DefaultThumbnailManager.java:159)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnail(DefaultThumbnailManager.java:147)
      	at sun.reflect.GeneratedMethodAccessor525.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:83)
      	at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
      	at com.sun.proxy.$Proxy188.getThumbnail(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor525.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      	at com.sun.proxy.$Proxy188.getThumbnail(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor525.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
      	at com.sun.proxy.$Proxy188.getThumbnail(Unknown Source)
      	at com.atlassian.jira.issue.attachment.AttachmentsCategoriser$AttachmentItemCreator.apply(AttachmentsCategoriser.java:135)
      	at com.atlassian.jira.issue.attachment.AttachmentsCategoriser$AttachmentItemCreator.apply(AttachmentsCategoriser.java:125)
      	at com.google.common.collect.Lists$TransformingRandomAccessList.get(Lists.java:451)
      	at java.util.AbstractList$Itr.next(AbstractList.java:358)
      	at java.util.AbstractCollection.toArray(AbstractCollection.java:141)
      	at com.google.common.collect.ImmutableList.copyFromCollection(ImmutableList.java:291)
      	at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:260)
      	at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:230)
      	at com.atlassian.jira.issue.attachment.AttachmentItems.<init>(AttachmentItems.java:22)
      	at com.atlassian.jira.issue.attachment.AttachmentsCategoriser.items(AttachmentsCategoriser.java:81)
      	at com.atlassian.jira.plugin.viewissue.AttachmentBlockContextProvider.getContextMap(AttachmentBlockContextProvider.java:116)
      	at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.initContextMap(CacheableContextProviderDecorator.java:70)
      	at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.getContextMap(CacheableContextProviderDecorator.java:46)
      	at com.atlassian.jira.plugin.webfragment.contextproviders.MultiContextProvider.getContextMap(MultiContextProvider.java:99)
      	at com.atlassian.plugin.web.model.AbstractWebItem.getContextMap(AbstractWebItem.java:30)
      	at com.atlassian.plugin.web.model.DefaultWebLabel.getDisplayableLabel(DefaultWebLabel.java:55)
      	at com.atlassian.jira.plugin.issuenav.viewissue.webpanel.WebPanelBeanBuilder.getLabel(WebPanelBeanBuilder.java:91)
      	at com.atlassian.jira.plugin.issuenav.viewissue.webpanel.WebPanelBeanBuilder.builder(WebPanelBeanBuilder.java:72)
      	at com.atlassian.jira.plugin.issuenav.viewissue.webpanel.WebPanelBeanBuilder.buildWithoutHtml(WebPanelBeanBuilder.java:63)
      	at com.atlassian.jira.plugin.issuenav.viewissue.webpanel.WebPanelMapperUtil.mapAndRenderPanels(WebPanelMapperUtil.java:90)
      	at com.atlassian.jira.plugin.issuenav.viewissue.webpanel.WebPanelMapperUtil.create(WebPanelMapperUtil.java:60)
      	at com.atlassian.jira.plugin.issuenav.action.IssueAction.populateIssueFields(IssueAction.java:163)
      	at com.atlassian.jira.plugin.issuenav.action.IssueAction.doDefault(IssueAction.java:132)
      	at sun.reflect.GeneratedMethodAccessor900.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
      	...
      Caused by: java.lang.IllegalArgumentException: Numbers of source Raster bands and source color space components do not match
      	at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:482)
      	at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1258)
      	at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
      	at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1226)
      	at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1034)
      	at javax.imageio.ImageIO.read(ImageIO.java:1448)
      	at javax.imageio.ImageIO.read(ImageIO.java:1352)
      	at com.atlassian.core.util.thumbnail.Thumber.getImage(Thumber.java:459)
      	at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager$1.getImage(DefaultThumbnailManager.java:212)
      

      Unfortunately, I seem to be unable to attach any files to this ticket so you can find both the full exception log as well as an example of an image that fails here:
      http://www.chuckburt.com/dropbox/JRA-Assets.zip

        1. image001.PNG
          image001.PNG
          28 kB
        2. image_with_problems.gif.tmp
          39 kB

              Unassigned Unassigned
              737168712dbf Chuck Burt
              Votes:
              18 Vote for this issue
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: