Spotread for Windows is affected by a finicky bug when driving a
X-Rite i1 Display Pro colorimeter, which I tried to understand and
identify for a while.
Here is a repository with log files of occurrences and the source of
the demo program used to trigger it.
It is random by nature and can be hard to reproduce.
To give an idea, the two days before I was getting it often but today
only once so far.
The code shared is the shortest. In case it doesn't do the trick for
you, I have a couple other more complex approaches getting the same
result eventually as well.
When the issue occurs, spotread ends up stalling in an infinite
GetDiffuserPosition loop with zeros as response instead of moving on
I hope you'll be able to reproduce the bug too, but maybe the logs
will be sufficient.
Adjusting PRE_DELAY_MS and POST_DELAY_MS constants in the source file
might help, as well as measuring a display showing changing content,
I'm not entirely sure.
It seems that the bug is timing-dependent.
Please let me know if I can do better to help fixing this bug :)