I am currently trying to merge a seperate project into ours, that uses deeplearning4j-core as a dependency. deeplearning4j-core
uses com.twelvemonkeys.imageio
internally, which registers plugins into ImageIO.read()
. However, that seems to break all ImageIO.read
calls we currently have in production, with the following error message:
javax.imageio.IIOException: No SOF segment in stream
at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.getSOF(Unknown Source) ~[imageio-jpeg-3.1.1.jar:3.1.1]
at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source) ~[imageio-jpeg-3.1.1.jar:3.1.1]
at com.github.jaiimageio.impl.plugins.tiff.TIFFJPEGDecompressor.decodeRaw(TIFFJPEGDecompressor.java:226) ~[jai-imageio-core-1.4.0.jar:1.4.0]
at com.github.jaiimageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2583) ~[jai-imageio-core-1.4.0.jar:1.4.0]
at com.github.jaiimageio.impl.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1144) ~[jai-imageio-core-1.4.0.jar:1.4.0]
at com.github.jaiimageio.impl.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1414) ~[jai-imageio-core-1.4.0.jar:1.4.0]
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1468) ~[na:na]
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1315) ~[na:na]
[production code]
We are reading in TIFF files that had no issue being recognized before. Now they cannot be read at all and throw the exception listed above 90% of the time the software is started. 10% of the time, it works without a hitch until the JVM suspends. This makes me think it's a loading order issue, but I am too inexperienced to work it out.
I know the underlying issue is probably greater, but getting it up and running right now has a high priority first and foremost.
We are using gradle.