← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #194095]: Sikuli doesn't find images that definitely exist on screen

 

Question #194095 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194095

Andrew P posted a new comment:
RaiMan,

Thank you for helping out.  Good news is that I figured it out and the
image recognition mechanism was not the problem.  I was actually hugely
relieved that it wasn't the core feature of Sikuli that didn't work
well.

The virtual machine that ran Sikuli scripts was being restored
automatically from a screenshot.  It turned out that the clock on the
VMWare ESXi hypervisor was set 4 hours behind by mistake.  Windows 7, on
the other hand, was set to synchronize time with a time server
automatically.  It would do it on its own schedule and, as a result, the
clock would jump 4 hours forward while Sikuli scripts were running.
Sometimes the time change would happen while the wait(image.png, 45)
statement was scanning for the target image.  Sikuli would then decide
that 45 seconds have gone by and throw the FindFailed exception
prematurely.

I know that this problem is not going to affect that many people, but
when it does, it will drive people crazy, since it is very hard to
debug.  Sikuli seems to be checking the local time to determine whether
the necessary waiting period has gone by.  One could implement it using
a system timer event that counts the seconds instead of periodically
looking whether a target time has been reached.

I haven't tested them, but here are possible scenarios that will most likely cause Sikuli scripts to fail on wait():
- Change from standard to daylight savings time and vice versa
- Manual time change
- NTP time synchronization to respond to clock drift.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.