Skip to content

Retry ICC reads after profile loader failures - #977

Draft
Xare123 wants to merge 1 commit into
eoyilmaz:developfrom
Xare123:fix/profile-loader-read-retry
Draft

Retry ICC reads after profile loader failures#977
Xare123 wants to merge 1 commit into
eoyilmaz:developfrom
Xare123:fix/profile-loader-read-retry

Conversation

@Xare123

@Xare123 Xare123 commented Sep 12, 2026

Copy link
Copy Markdown

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 empty ICCProfile on 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.py and test_profile_loader.py. The two recovery cases failed against unmodified develop because 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.

@Xare123
Xare123 force-pushed the fix/profile-loader-read-retry branch from 4b2761b to 7b19a93 Compare September 12, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant