[request] waitVanish with parameter Region/Match should wait until region content changes --- use 1.1.4+ and observe

Bug #1389432 reported by Zed
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Won't Fix
Undecided
RaiMan

Bug Description

When I have a region that I define as using find(), for some reason when I call waitVanish on that region it crashes Sikuli (ie, waitVanish(img.find(img2)) or waitVanish(find(img)). Didn't have this problem before on 1.0.1.

Here's the debug logs:
[debug] Region: waiting for M[92,339 212x32]@S(S(0)[0,0 1280x800]) S:1.00 C:198,355 [6/6 msec] to vanish
[error] Region: doFind: invalid parameter: M[92,339 212x32]@S(S(0)[0,0 1280x800]) S:1.00 C:198,355 [6/6 msec]
[error] ***** Terminating SikuliX after a fatal error 999 *****
It makes no sense to continue!

RaiMan (raimund-hocke)
summary: - Sikuli 1.1.0. waitVanish crashes Sikuli when used on regions created
- from find()
+ [1.1.0] waitVanish crashes Sikuli when using Match objects created from
+ find()
Revision history for this message
RaiMan (raimund-hocke) wrote : Re: [1.1.0] waitVanish crashes Sikuli when using Match objects created from find()

the java docs from waitVanish:

 /**
  * waits until target vanishes or timeout (in seconds) is
  * passed (AutoWaitTimeout)
  *
 * @param <PSI> Pattern, String or Image
 * @param target The target to wait for it to vanish
 * @return true if the target vanishes, otherwise returns false.
public <PSI> boolean waitVanish(PSI target) {

in version 1.0.1 using any other kind of parameter (like in your case a Match object as a result from find(image)) should have evaluated to an error message: image file not found on disk.

This is irritating, so in 1.1.0 it correctly reports wrong parameter in your case.

If you want to wait for an image to vanish, that just was found (in 1.1.0):
waitVanish(find(image).getImage())

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

... but your idea makes some sense:
waitVanish(someRegion)

where someRegion is a Region or Match object could mean:
wait until the content of the region changes.

I make it a request bug, to have this convenience shortcut.

summary: - [1.1.0] waitVanish crashes Sikuli when using Match objects created from
- find()
+ [request] waitVanish with parameter Region/Match should wait until
+ region content changes
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.2.0
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Won't Fix
importance: High → Undecided
milestone: 2.0.0 → none
summary: [request] waitVanish with parameter Region/Match should wait until
- region content changes
+ region content changes --- use 1.1.4+ and observe
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.