java.lang.NegativeArraySizeException

Atlassian JIRA | Aqqiela Zuhra | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h4. Summary: *How mail handler normally works:* # detect the email in the inbox # create issue # if it detects attachment, it will try to add the attachment to the issue # once the attachment was successfully added, delete the email from inbox *How it works here (happens occasionally):* When the attachment was not added successfully, the same email stays in the inbox. This cause the mail handler to re-process the email and re-create an issue again out of it h4. Steps to reproduce: This is not reproducible. h4. Error causing the email not being deleted (failed to add the attachment): {code} 2014-12-11 19:58:57,489 QuartzScheduler_Worker-3 DEBUG ServiceRunner XX.YYYY [mail.incoming.CreateOrCommentHandler.3] Checking if attachment should be added to issue: 2014-12-11 19:58:57,489 QuartzScheduler_Worker-3 DEBUG ServiceRunner XX.YYYY [mail.incoming.CreateOrCommentHandler.3] Content-Type: image/png; name="XYXY.png" 2014-12-11 19:58:57,490 QuartzScheduler_Worker-3 DEBUG ServiceRunner XX.YYYY [mail.incoming.CreateOrCommentHandler.3] Content-Disposition: attachment 2014-12-11 19:58:57,491 QuartzScheduler_Worker-3 ERROR ServiceRunner XX.YYYY [atlassian.mail.incoming.mailfetcherservice] XX.YYYY[XYXYX]: Exception: null java.lang.NegativeArraySizeException at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(Unknown Source) at com.sun.imageio.plugins.png.PNGImageReader.getImageMetadata(Unknown Source) at com.atlassian.jira.plugins.mail.handlers.GeneratedAttachmentRecogniser.containsJiraMetadata(GeneratedAttachmentRecogniser.java:64) at com.atlassian.jira.plugins.mail.handlers.GeneratedAttachmentRecogniser.<init>(GeneratedAttachmentRecogniser.java:32) at {code} h4. Suggestion If deleting the unsuccessfully processed email is not an option (perhaps for integrity reason), then maybe mail handler could mark it as *read* and notify the reporter to resend an email for creating issue (while the read email will not be processed anymore).

    Atlassian JIRA | 2 years ago | Aqqiela Zuhra [Atlassian]
    java.lang.NegativeArraySizeException
  2. 0

    h4. Summary: *How mail handler normally works:* # detect the email in the inbox # create issue # if it detects attachment, it will try to add the attachment to the issue # once the attachment was successfully added, delete the email from inbox *How it works here (happens occasionally):* When the attachment was not added successfully, the same email stays in the inbox. This cause the mail handler to re-process the email and re-create an issue again out of it h4. Steps to reproduce: This is not reproducible. h4. Error causing the email not being deleted (failed to add the attachment): {code} 2014-12-11 19:58:57,489 QuartzScheduler_Worker-3 DEBUG ServiceRunner XX.YYYY [mail.incoming.CreateOrCommentHandler.3] Checking if attachment should be added to issue: 2014-12-11 19:58:57,489 QuartzScheduler_Worker-3 DEBUG ServiceRunner XX.YYYY [mail.incoming.CreateOrCommentHandler.3] Content-Type: image/png; name="XYXY.png" 2014-12-11 19:58:57,490 QuartzScheduler_Worker-3 DEBUG ServiceRunner XX.YYYY [mail.incoming.CreateOrCommentHandler.3] Content-Disposition: attachment 2014-12-11 19:58:57,491 QuartzScheduler_Worker-3 ERROR ServiceRunner XX.YYYY [atlassian.mail.incoming.mailfetcherservice] XX.YYYY[XYXYX]: Exception: null java.lang.NegativeArraySizeException at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(Unknown Source) at com.sun.imageio.plugins.png.PNGImageReader.getImageMetadata(Unknown Source) at com.atlassian.jira.plugins.mail.handlers.GeneratedAttachmentRecogniser.containsJiraMetadata(GeneratedAttachmentRecogniser.java:64) at com.atlassian.jira.plugins.mail.handlers.GeneratedAttachmentRecogniser.<init>(GeneratedAttachmentRecogniser.java:32) at {code} h4. Suggestion If deleting the unsuccessfully processed email is not an option (perhaps for integrity reason), then maybe mail handler could mark it as *read* and notify the reporter to resend an email for creating issue (while the read email will not be processed anymore).

    Atlassian JIRA | 2 years ago | Aqqiela Zuhra
    java.lang.NegativeArraySizeException

    Root Cause Analysis

    1. java.lang.NegativeArraySizeException

      No message provided

      at com.sun.imageio.plugins.png.PNGImageReader.readMetadata()
    2. Java RT
      PNGImageReader.getImageMetadata
      1. com.sun.imageio.plugins.png.PNGImageReader.readMetadata(Unknown Source)
      2. com.sun.imageio.plugins.png.PNGImageReader.getImageMetadata(Unknown Source)
      2 frames
    3. com.atlassian.jira
      GeneratedAttachmentRecogniser.<init>
      1. com.atlassian.jira.plugins.mail.handlers.GeneratedAttachmentRecogniser.containsJiraMetadata(GeneratedAttachmentRecogniser.java:64)
      2. com.atlassian.jira.plugins.mail.handlers.GeneratedAttachmentRecogniser.<init>(GeneratedAttachmentRecogniser.java:32)
      2 frames