Skip to content

NPE on images without iccBytes #32

@zeppelinux

Description

@zeppelinux
  • JPEG Autorotate Version: 1.1.0
  • Java Version: 17

It fails on NullPointerException while processing some (any image from Pixel 6 Pro) images, here is the stack trace:

Caused by: java.lang.NullPointerException: Cannot invoke "[B.clone()" because "this.iccBytes" is null at org.apache.commons.imaging.formats.jpeg.segments.App2Segment.getIccBytes(App2Segment.java:90) at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getICCProfileBytes(JpegImageParser.java:295) at org.apache.commons.imaging.Imaging.getICCProfileBytes(Imaging.java:545) at org.apache.commons.imaging.Imaging.getICCProfile(Imaging.java:440) at org.apache.commons.imaging.Imaging.getICCProfile(Imaging.java:363) at org.apache.commons.imaging.Imaging.getICCProfile(Imaging.java:345) at com.domenicseccareccia.jpegautorotate.imaging.JpegImageMetadataReader.readIccProfile(JpegImageMetadataReader.java:118) at com.domenicseccareccia.jpegautorotate.imaging.JpegImageMetadata.<init>(JpegImageMetadata.java:55) at com.domenicseccareccia.jpegautorotate.imaging.JpegImage.<init>(JpegImage.java:35) at com.domenicseccareccia.jpegautorotate.imaging.JpegImageProcessor.process(JpegImageProcessor.java:65) at com.domenicseccareccia.jpegautorotate.JpegAutorotate.rotate(JpegAutorotate.java:157)

JPEG image files
If applicable, add jpeg image files causing the error when processed with JPEG Autorotate.
IMG_20240329_154929_653

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions