Open marbetschar opened 7 years ago
This seems to happen when checking GIF files. Can you narrow down the problem to a single GIF image and attach this file or a demo epub file containing this GIF?
Still waiting for feedback...
Can you narrow down the problem to a single GIF image and attach this file or a demo epub file containing this GIF?
Hi tofi86,
You can check attachment file which also produces the same error.
Thanks for the demo data, we'll take a look!
@tofi86 sorry for being unresponsive - I was not able to reproduce the issue. @minhductin2 thanks for the demo data!
I can confirm that the error can be reproduced with the above animated GIF.
However, when reading this StackOverflow question I have the impression that there isn't an easy patch for this besides switching the ImageIO GIFImageReader.
I could reproduce with the animated GIF as well.
This is caused by a known bug in OpenJDF, see JDK-7132728.
There is an issue open to the TwelveMonkeys ImageIO plugins (which we use in EPUBCheck) to add support for GIFs, with explicit mention of this issue, see haraldk/TwelveMonkeys#316. Let's keep track of the issue there! By the way, the issue is marked as sponsor needed
, so if anyone wants to accelerate the resolution, maybe it's a good idea to get in touch with the TwelveMonkeys folks 🙂
I will push a patch to make sure that the ArrayIndexOutOfBoundsException
is caught, so that it's "only" reported as an image corruption issue and the processing at least continues with other checks.
In the mid term, we could also possibly make a special case for *.gif
files in the catch block, to allow them anyway and ignore the exception; although i'm a little concerned about any false-negatives it might cause. Thoughts?
I pushed a repro to the branch fix/issue-756/gifs
.
I'm getting the following error during ePub validation (using
v4.0.2
):