I am getting this error code using ovserver

Asked by Seyed Mohammad Hossein Amirkhalili on 2019-02-20

1.1.4-SNAPSHOT-2019-01-16_07:30/Windows10.0/Java8(64)1.8.0_201-b09

I have some observe operation like following:

rp = SOME REGION

r1 = some region
def pcheck(event):
    global rp
    print "in pcheck"
    r = Some region
    ppp = some pattern (png file)
    r.wait(ppp,60)
    rp.stopObserver()

def something_changed():
    try:
        r1.wait(some picture, 60)
        rp.onChange(50,pcheck)
        rp.observeInBackground()
    except:
        pass

def main():

     ......
     something_changed()
     #some where in the main code I call this function (something_changed) to start monitoring for the change and I hope it gets triggered once certain conditions are met:

main()

and I get this in the log:

LOG:
[error] Region(108295,173451,12,12) outside any screen - subsequent actions might not work as expected
in pcheck

[error] Region(108900,174420,12,12) outside any screen - subsequent actions might not work as expected
in pcheck

[error] Region(109505,175389,12,12) outside any screen - subsequent actions might not work as expected
in pcheck

[error] Region(110110,176358,12,12) outside any screen - subsequent actions might not work as expected
in pcheck

[error] Region(110715,177327,12,12) outside any screen - subsequent actions might not work as expected
in pcheck

[error] Region(111320,178296,12,12) outside any screen - subsequent actions might not work as expected
in pcheck

[error] Region(111925,179265,12,12) outside any screen - subsequent actions might not work as expected
in pcheck

I dont know what is this Region which is moving out of the screen and I do not understand why the observer is not getting stopped when pcheck function is triggered for the first time ?!

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2019-02-20
Last query:
2019-02-20
Last reply:
2019-02-20

This question was originally filed as bug #1816765.

RaiMan (raimund-hocke) said : #1

should first be a question

RaiMan (raimund-hocke) said : #2

What is your screen situation? Working with HiDPI?

If yes: see bug 1730645

If not, then you have to narrow down, when these errors are reported.

1080p - 125% scale

I dont know how to find out if my situation considered as HiDPI.

The region in the error is moving to some insanely big numbers! The code seems to continue working however I can see these errors when I stop the code and check the log.

I should also mention that time to time the log reports the error of the mouse should be at x,y but instead it ended up at a, b. It asks me to run Sikuli x as administrator when I right click on the Sikuli file there is no such option.

just installed java 11 as was suggested in your link (bug 1730645) from this link: https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html

now I cant open the script any more :( the IDE screen got bigger and scaled up looks like ). I get the following error:

[error] Region(50,1002,1870,78) outside any screen - subsequent actions might not work as expected
[error] EditorPane: read returned null
[error] IDE: restoreScriptFromSession: Can't load: [Script file address]

Warning: Nashorn engine is planned to be removed from a future JDK release

[error] Region(50,1002,1870,78) outside any screen - subsequent actions might not work as expected

[error] highlight: not possible for null

[error] Region(50,1002,1870,78) outside any screen - subsequent actions might not work as expected
[error] EditorPane: read returned null

Best RaiMan (raimund-hocke) said : #6

sorry, no - the recommendation was not really to install Java 11, but first with Java 8, to try setting the scaling to 100%.

Switching to Java 11 should only to be done, if you know what you are doing.
SikuliX still works with Java 8.

So my recommendation: go back to Java 8 and use SikuliX with a scaling of 100%

Ok thank you very much Raiman. This will force me to redo all the pictures for the code and define new regions as I created everyone with 125% scaling. But seems the only solution.

RaiMan (raimund-hocke) said : #8

yep, sorry.