JDK-6444360 : Exception .CMMException: General CMM error517 when reading jpeg image
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: x86
  • Submitted: 2006-06-28
  • Updated: 2014-03-18
Description
FULL PRODUCT VERSION :
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Linux linux 2.6.13-15.10-default #1 Fri May 12 16:27:12 UTC 2006 i686 i686 i386 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
I get the exception CMMException: General CMM error517 when performing ImageIO.read() on certain JPEG images.  More specifically, some of the images in the Windows XP  media center edition causes problems, such as the image "Flower - GalleryPlayer.jpg".

I would have attached the troublesome image, but the bug submission form does not take attachments. I can email it to you, if you like.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the given java program with one of the troublesome images as an argument.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
For the given test program, no output should occur.
ACTUAL -
  Program fails with an exception

ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.awt.color.CMMException: General CMM error517
        at sun.awt.color.CMM.checkStatus(CMM.java:127)
        at sun.awt.color.ICC_Transform.<init>(ICC_Transform.java:89)
        at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:493)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1081)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)        at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1049)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:864)
        at javax.imageio.ImageIO.read(ImageIO.java:1400)
        at javax.imageio.ImageIO.read(ImageIO.java:1286)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;

public class ImageBug {
    public static void main(String[] args) {
        try {
            File imageFile = new File(args[0]);
            BufferedImage image = ImageIO.read(imageFile);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
None so far.

Comments
Please re-open if - if fix is in progress or on the plan to fix soon - if this is a P3 (file as P3, not P4)
18-03-2014

EVALUATION This exception was caused by embedded (into sample jpeg) ICC color profile. I've attached simplified testcase and extracted profile.
28-06-2006