[request] Find failed: more features for debugging

Bug #1204634 reported by Erick Quinteros
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Medium
RaiMan

Bug Description

Version: Sikuly finally 1.0.0
OS: Windows 7 64-bits
Reproduce: Execute find operations for a long period of time.

When I use the find operation (or others than use find inside) on a automatized scenario during long periods of time, the find operation fail in some point, if I try to find the image again is found but in a long execution it fails, and not always the same image fail.

summary: - Find fail after use it 30 minutes or more
+ Find fail after use it for a long time
Revision history for this message
RaiMan (raimund-hocke) wrote : Re: Find fail after use it for a long time

FindFailed exceptions are only raised/thrown, if a (explicit or implicit) search (explicit or implicit) for an image on the screen is not successful within the given wait time (in the standard 3 seconds).

In long running situations, there might be other system aspects that eventually lead to a delay of the GUI actions and hence to a FindFailed. This can only be debugged, if you take care, that a screenshot of the FindFailed situation is available afterwards (e.g. the latest screen image used to search).

Currently, there is no compact feature in Sikuli to support such a tracking. You must setup your own function and use it instead of all (or at least the critical ones).

Another option is to replace all find operations with wait(image, maxtime)

e.g. instead of
click(some_image)

use
click(wait(some_image, 20))

which does not do any harm, since it will come back in the moment the some_image appears, but add some robustness for situations, where the image's appearance is delayed for a reason you cannot foresee in your script.

Changed in sikuli:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
Revision history for this message
RaiMan (raimund-hocke) wrote :

I accept this as a request bug in 2 directions:

1. provide better tracking/documentation options for search operations

2. support some dynamic automatic adjustment for the waiting time, based on e.g. cpu-usage level and/or average search times up to now.

summary: - Find fail after use it for a long time
+ [1.0] Find fail after use it for a long time
Revision history for this message
Erick Quinteros (ebryan666) wrote : Re: [1.0] Find fail after use it for a long time

I implemented a "waiter" to wait until no changes occur in the screen and this method avoid the posibility to use a find operation when the screen is not ready. That is not the problem, when i use the sikuli rc2 this don´t fail, I start having problems when I upgrade to the new sikuli version. I will continue looking for a workaround or a fix and I will give you more feedback.

Revision history for this message
RaiMan (raimund-hocke) wrote :

I understand:
in RC2 you have a waiter method, that lets find operations wait until the screen is ready.

If I understand right: could you share this method with me?
use my mail silently: https://launchpad.net/~raimund-hocke

RaiMan (raimund-hocke)
Changed in sikuli:
milestone: 1.1.0 → 1.2.0
RaiMan (raimund-hocke)
summary: - [1.0] Find fail after use it for a long time
+ [request] Find failed: more features for debugging
Changed in sikuli:
milestone: 2.0.0 → 2.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.