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

Wide 1 pixel image attachments cause errors

    XMLWordPrintable

Details

    Description

      To Reproduce
      1. attach an image to an issue that is 600x1 (for example, I've attached to this issue but neither it nor any other image attachment appears in File Attachments above)

      Expected Result
      see a thumbnail of the image on your issue...or at least the name of the file listed in File Attachments

      Actual Result
      On Jira 4 no attachment appears.
      On Jira 3.13 a there'll be a thumbnail number with parenthesis () but no link, no file name and no size.

      And, in Jira 3.13, the logs will get 11 stack traces, the first one starting with

      2010-02-08 12:31:56,122 TP-Processor3 ERROR [core.util.thumbnail.Thumber] Unable to create thumbnail image of attachment with id:108282
      java.lang.IllegalArgumentException: Width (200) and height (0) must be non-zero
              at java.awt.image.ReplicateScaleFilter.<init>(ReplicateScaleFilter.java:85)
              at java.awt.image.AreaAveragingScaleFilter.<init>(AreaAveragingScaleFilter.java:60)
              at com.atlassian.core.util.thumbnail.Thumber.scaleImage(Thumber.java:148)
              at com.atlassian.core.util.thumbnail.Thumber.createThumbnail(Thumber.java:170)
              at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:131)
              at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:91)
              at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnail(DefaultThumbnailManager.java:88)
              at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnails(DefaultThumbnailManager.java:50)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      ...
      

      Attachments

        1. 1pix-attach-bug.jpg
          1pix-attach-bug.jpg
          5 kB
        2. atlassian-core-3.10.jar
          154 kB
        3. atlassian-core-4.5.5.jar
          169 kB
        4. shortwide.jpg
          shortwide.jpg
          0.3 kB
        5. wideshort.jpg
          wideshort.jpg
          0.3 kB

        Activity

          People

            Unassigned Unassigned
            adc6ee404f6d Jeff Kirby
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: