'sun.awt.image.PNGImageDecoder$PNGException: crc corruption

I'm working in a big java project, with about 400 classes. Suddenly I got this error

sun.awt.image.PNGImageDecoder$PNGException: crc corruption
    at sun.awt.image.PNGImageDecoder.getChunk(PNGImageDecoder.java:699)
    at sun.awt.image.PNGImageDecoder.getData(PNGImageDecoder.java:707)
    at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:234)
    at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
    at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
    at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

There has been a long time that I don't deal with images in this project and I can't see where the error is being caused, as it's not shown in the exception message.



Solution 1:[1]

I was facing a similar issue. To fix this, I opened the project images with my image editor (GIMP) and exported them with a new name. So I imported the new images into the project and the problem was fixed. Hope it helps you too.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bruno