[1.0.1] observe() or observe(FOREVER) doesn't wait for any event to occur and the next line runs immediately --- fixed in 1.1.0

Bug #1224795 reported by vince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

Bug Description

-------- workaround
use any numeric value to specify a waiting time (do not use FOREVER)

e.g. observe(360*24*60*60) would wait for one year ;-)
--------------------------------------------------------------------------

when I run the script below, observe() does not wait for the appear event to occur,but the after line "print()" runs immediately.

script:

def handler(event):
    print(event.type)
    stopObserver()

def test():
    onAppear("recycle.png",handler)
    observe()
    print("end")

-----------------------------------------------------
test result:
print "end"

vince (xuyatian)
description: updated
description: updated
description: updated
RaiMan (raimund-hocke)
summary: - observe() doesn't wait for any event to occur and the next line runs
- immediately
+ [1.0.1] observe() doesn't wait for any event to occur and the next line
+ runs immediately
summary: [1.0.1] observe() doesn't wait for any event to occur and the next line
- runs immediately
+ runs immediately --- workaround
RaiMan (raimund-hocke)
description: updated
summary: - [1.0.1] observe() doesn't wait for any event to occur and the next line
- runs immediately --- workaround
+ [1.0.1] observe() or observe(FOREVER) doesn't wait for any event to
+ occur and the next line runs immediately --- workaround
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
RaiMan (raimund-hocke)
Changed in sikuli:
importance: High → Critical
summary: [1.0.1] observe() or observe(FOREVER) doesn't wait for any event to
- occur and the next line runs immediately --- workaround
+ occur and the next line runs immediately --- fixed in 1.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.