Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebP: "Coordinate out of bounds!" exception thrown when reading certain files #978

Open
Parsee1 opened this issue Jul 10, 2024 · 5 comments

Comments

@Parsee1
Copy link

Parsee1 commented Jul 10, 2024

Describe the bug
A clear and concise description of what the bug is.

Version information

  1. The version of the TwelveMonkeys ImageIO library in use.
    com.twelvemonkeys.imageio
    imageio-webp
    3.11.0

  2. The exact output of java --version (or java -version for older Java releases).
    Java 17.0.1 2021-10-19 LTS
    Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
    Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

  3. Extra information about OS version, server version, standalone program or web application packaging, executable wrapper, etc. Please state exact version numbers where applicable.
    JDK 17.0.1, IntelliJ Idea Community 2019.2.4, Win10 Home Basic

To Reproduce
Steps to reproduce the behavior:

  1. Compile the below sample code
    ImageIO.read(new URL(url));

2.Download the sample image file
https://i0.hdslb.com/bfs/face/0266ce294d60018dcc6d567e57a3b93ae7825447.webp
https://i2.hdslb.com/bfs/face/50733c332633ab43d3bd03bad142cd86d871aeee.webp

Stak trace

java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
	at java.desktop/sun.awt.image.ByteInterleavedRaster.setDataElements(ByteInterleavedRaster.java:541)
	at com.twelvemonkeys.imageio.plugins.webp.lossless.VP8LDecoder.decodeBwRef(VP8LDecoder.java:309)
	at com.twelvemonkeys.imageio.plugins.webp.lossless.VP8LDecoder.decodeImage(VP8LDecoder.java:225)
	at com.twelvemonkeys.imageio.plugins.webp.lossless.VP8LDecoder.readVP8Lossless(VP8LDecoder.java:131)
	at com.twelvemonkeys.imageio.plugins.webp.WebPImageReader.readVP8Lossless(WebPImageReader.java:673)
	at com.twelvemonkeys.imageio.plugins.webp.WebPImageReader.readAlpha(WebPImageReader.java:565)
	at com.twelvemonkeys.imageio.plugins.webp.WebPImageReader.readVP8Extended(WebPImageReader.java:498)
	at com.twelvemonkeys.imageio.plugins.webp.WebPImageReader.readVP8Extended(WebPImageReader.java:478)
	at com.twelvemonkeys.imageio.plugins.webp.WebPImageReader.read(WebPImageReader.java:456)
	at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1470)
	at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1365)
@Parsee1 Parsee1 changed the title Webp: "Coordinate out of bounds!" exception thrown when loading a certain file WebP: "Coordinate out of bounds!" exception thrown when loading a certain file Jul 10, 2024
@Parsee1 Parsee1 changed the title WebP: "Coordinate out of bounds!" exception thrown when loading a certain file WebP: "Coordinate out of bounds!" exception thrown when loading certain files Jul 10, 2024
@Parsee1 Parsee1 changed the title WebP: "Coordinate out of bounds!" exception thrown when loading certain files WebP: "Coordinate out of bounds!" exception thrown when reading certain files Jul 10, 2024
@haraldk
Copy link
Owner

haraldk commented Jul 10, 2024

Hi @Parsee1,

Thanks for reporting! I'll investigate.

@haraldk
Copy link
Owner

haraldk commented Jul 11, 2024

Probably related to #734, #739 and #785, but not necessarily the same issue.

@orDaor
Copy link

orDaor commented Dec 3, 2024

Hi guys, do you have any update on this bug? I encountered the same problem. Updating the webp plugin to 3.12.0 is not fixings this apparently.

@haraldk
Copy link
Owner

haraldk commented Dec 4, 2024

No, we haven't been able to fix this bug yet.

It's mostly due to lack of time, so if you have some spare time to investigate to find the bug and/or fix it, contributions are welcome!

@WangJincheng4869
Copy link

I also encountered the same problem, I don't know if it's the same reason, but I left my picture here.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants