Decode icStatusCMM in tool/connect error messages (#1322, #1323)#1324
Merged
ChrisCoxArt merged 1 commit intoJun 12, 2026
Conversation
…Consortium#1322, InternationalColorConsortium#1323) iccApplyToLink reported any CIccCmm::AddXform failure as "Invalid Profile(N)" and the IccConnect stage loop reported "AddXform failed ... (status N)" with a bare number. Both misled triage when the actual failure was icCmmStatBadSpaceLink (2) - a chain-level color space mismatch with a structurally valid profile. - iccApplyToLink: report "Unable to add <file> to transform chain (status N: <name>)" via CIccCmm::GetStatusText, with an extra hint for bad space links; decode the Begin() status too. - IccConnect.cpp: append GetStatusText(stat) to the four AddXform failure messages and three Begin() failure messages. - CIccCmm::GetStatusText: add missing icCmmStatUnsupported case. No behavior change; message text only. Exit codes unchanged. Verified against the InternationalColorConsortium#1322/InternationalColorConsortium#1323 repro commands and RunTests.sh. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ChrisCoxArt
approved these changes
Jun 12, 2026
9adf63d
into
InternationalColorConsortium:master
24 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Investigation of #1322 and #1323 found both reported failures are status 2 =
icCmmStatBadSpaceLink— a chain-level color-space mismatch, not a profile-validity problem. The rejections are correct, expected behavior; the QA-generated commands chain profiles whose color spaces cannot connect. The actionable defect was the diagnostics:iccApplyToLinkprintedInvalid Profile(2): <file>for a structurally valid profile (Research: iccApplytoLink indicates Invalid Profile(2): ICC/Lab_float-F11_2deg-MAT.icc #1322) — the chain was incompatible, not the profile.AddXform failed ... (status 2)with a bare number (Research: iccApplyNamedCmm | Error - stage 0: AddXform failed for ICC/Spec380_10_730-D50_2deg.icc #1323), forcing a lookup of theicStatusCMMenum to triage.Root cause detail
#1323: input data
cmykGrays.txtis CMYK (4ch); the first chain profileSpec380_10_730-D50_2deg.iccis aspac-class spectral reference profile with device spacenc0024(24-channel spectral reflectance) and an empty colorimetric PCS.CIccNamedColorCmm::AddXformcorrectly returnsicCmmStatBadSpaceLink(IsCompatSpace(CMYK, nc0024)andIsNChannelCompatboth false). This profile is used only as a-PCCargument in legitimate tests, never as a chain profile.#1322: the command passes
first_transform = 0, so the CMM takes profile 1 (Spec380_10_730-D50_2deg.icc) in the destination direction (rs0024 → nc0024, som_nLastSpace = nc0024); profile 2 (Lab_float-F11_2deg-MAT.icc) is then taken in the input direction with source = device Lab.IsCompatSpace(nc0024, Lab)is false →icCmmStatBadSpaceLink. TheiccDumpProfilewarnings on that profile (empty A2B3/B2A3) are unrelated.Changes
Tools/CmdLine/IccApplyToLink/iccApplyToLink.cpp: replaceInvalid Profile(N)withError - Unable to add '<file>' to transform chain (status N: <name>)via the existingCIccCmm::GetStatusText, plus an explanatory line foricCmmStatBadSpaceLink; also decode theBegin()failure status.IccConnect/IccLibConnect/IccConnect.cpp: appendGetStatusText(stat)to the fourAddXform failedmessages and threeBegin() failedmessages.IccProfLib/IccCmm.cpp: add the missingicCmmStatUnsupportedcase toCIccCmm::GetStatusText(the enum comment asks for the switch to be kept in sync).Message text only — no behavior or exit-code changes.
Verification
ENABLE_TOOLS=ON), regeneratedTesting/hybridprofiles, ran both issue repro commands:Error - Unable to add 'ICC/Lab_float-F11_2deg-MAT.icc' to transform chain (status 2: Invalid space link)+ chain-connection hint (exit code unchanged).Error - stage 0: AddXform failed for 'ICC/Spec380_10_730-D50_2deg.icc' (status 2: Invalid space link)(exit code unchanged).Testing/CreateAllProfiles.sh+Testing/RunTests.sh: clean, no errors/failures.Fixes #1322. Fixes #1323.
🤖 Generated with Claude Code