[RESPDAM-20] Focal Points: NullPointerException when Uploading SVG Created: 03/Dec/19  Updated: 14/Feb/22  Resolved: 29/Apr/20

Status: Closed
Project: DAM Focal
Component/s: None
Affects Version/s: 1.1.4
Fix Version/s: 1.1.6

Type: Bug Priority: Neutral
Reporter: Sigurd Rolfes Assignee: Adrien Manzoni
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.25d
Original Estimate: Not Specified
Environment:

Magnolia 6.1.2


Attachments: Text File stacktrace-focalarea.txt    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
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.

 


Generated at Mon Feb 12 00:41:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.