Uploaded image for project: 'DAM Focal'
  1. DAM Focal
  2. RESPDAM-20

Focal Points: NullPointerException when Uploading SVG

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: 1.1.4
    • Fix Version/s: 1.1.6
    • Labels:
      None
    • Environment:
      Magnolia 6.1.2
    • Sprint:
      Sprint 5

      Description

      Hi Mgnls,

      I get a NullpointerException in the assets app when uploading a SVG (find stacktrace attached).

      I've found this:

      https://jira.magnolia-cms.com/browse/RESPDAM-10

      But here the mimetype is image.

      I debugged so far that the error is this in FocalAreaField class:

       

      ImageIO.read(is)

       

      See method:

       

      protected void refreshBufferedImage(Optional<InputStream> stream)

       

      ImageIO only supports GIF, PNG, JPEG, BMP, and WBMP, see

      https://docs.oracle.com/javase/tutorial/2d/images/loadimage.html

      Therefor ImageIO returns null as expected although the InputStream is there for the tmp-image and the Optimizer fails with a NullPointerException.

      Well, it doesn't make sence to have focal images for SVGs.

      Is there any way to exclude SVGs in the configuration?

      Thanks.

      Sigurd

      PS: the Exeption is silent. So the image gets uploaded and can be chosen, but the edit button is disabled.

       

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                amanzoni Adrien Manzoni
                Reporter:
                sigurd.rolfes Sigurd Rolfes
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Checklists

                    Bug DoR
                    DoD

                      Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 0.25d
                      0.25d