Retry ICC reads after profile loader failures - #977
Draft
Xare123 wants to merge 1 commit into
Draft
Conversation
Xare123
force-pushed
the
fix/profile-loader-read-retry
branch
from
September 12, 2026 03:14
4b2761b to
7b19a93
Compare
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.
A failed ICC read leaves the Windows profile loader using linear calibration until its cache is invalidated or the loader is restarted.
_retrieve_profile_vcgt()caches an emptyICCProfileon failure, then_generate_gamma_ramp()caches the resulting linear ramp. Later polls never retry the file if its association and mtime are unchanged.Leave both cache entries unset after a failed read. The next poll retries the profile; successful reads, profiles without a VCGT tag, and explicit linear resets are still cached as before.
Validation: 27 tests pass across
test_profile_loader_retry.pyandtest_profile_loader.py. The two recovery cases failed against unmodifieddevelopbecause the ramp stayed linear. Coverage includes consecutive read failures, manual reloads, and successful caching. The tests use generated ICC files and do not touch display state.Found while investigating a loader on Windows 11 ARM64 that kept restoring linear ramps after profile installation. Restarting that loader resolved the symptom. This cache failure also reproduces under x64 Python 3.12, but the original log did not capture the failed read, so I cannot yet tie that incident to this specific cause. Keeping this as a draft pending a live install/reload check.