Closed sgauruseu closed 4 years ago
GIF that causes NPE:
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 4096 out of bounds for length 4096
at java.desktop/com.sun.imageio.plugins.gif.GIFImageReader.read(GIFImageReader.java:992)
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1468)
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1363)
at com.enonic.xp.image.ImageHelper.toBufferedImage(ImageHelper.java:54)
at com.enonic.xp.core.impl.image.ImageServiceImpl.retrieveBufferedImage(ImageServiceImpl.java:233)
in reality issue is https://bugs.openjdk.java.net/browse/JDK-7132728
GIF images should be served as original binaries regardless of image service parameters. Now they are served correctly (as originals) in content thumbnail, media preview and image selector but attempted to be scaled inside image component and HTML Area which occasionally gives NPE because of high compression.