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

Focal Points: NullPointerException when Uploading SVG

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 1.1.6
    • 1.1.4
    • None
    • None
    • Magnolia 6.1.2

      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.

       

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

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