[1.1.x] Windows 10: latest build and Java 8: Mouse cursor is misbehaving on high resolution --- currently no solution nor workaround

Asked by Abhijit saxena on 2017-11-09

I have a very basic script which will find an image and click on it.
Now when the resolution is 1920x1080, script is working fine. But if I keep the resolution as 3840x2160, sikuli is able to find the image but the cursor is either going to top left or top right corner of the screen.

Any suggestions on fixing this bug?

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2017-11-10
Last reply:
2017-11-10
RaiMan (raimund-hocke) said : #1

what system, what java, what SikuliX?

Abhijit saxena (abhijitsaxena) said : #2

@RaiMan

System is Windows, Java is 1.8 and SikuliX is 1.1.1

RaiMan (raimund-hocke) said : #3

run the script from commandline using
runsikulix.cmd -d 3 yourscript

and look for any oddities in the log.

How do you know, that the image is found?

Abhijit saxena (abhijitsaxena) said : #4

@RaiMan

Okay, I'll do that.

And I used highlight() method to find whether sikuli was able to find image or not.

Abhijit saxena (abhijitsaxena) said : #5

This is what I got after running debug:

[debug] Jython: requested to use as default region: S(0)[0,0 3840x2160]

[debug] JythonScriptRunner: runPython: running script from IDE: C:/AutoBat/Bat/Tools/gfxbench3/gfxbench.sikuli

[debug] Region: init: (0, 0, 3840, 2160)
[debug] App.immediate: C:\AutoBat\Bat\Tools\gfxbench3\gfxbench\GFXBench.exe
[debug] App.create: [-1:GFXBench.exe]
[debug] App.open [6116:GFXBench.exe]

[debug] Region: Key.WIN as modifier
[debug] ( Windows ) TYPE "#UP."
[debug] Region: ( Windows ) TYPE "#UP."

[debug] Image: reused: 1.png (file:/C:/AutoBat/Bat/Tools/gfxbench3/gfxbench.sikuli/1.png)
[debug] Region: wait: waiting 3.0 secs for 1.png to appear in S(0)[0,0 3840x2160]

[debug] Region: wait: 1.png appeared (M[1969,1074 94x93]@S(S(0)[0,0 3840x2160]) S:1.00 C:2016,1120 [976 msec])

[error] RobotDesktop: checkMousePosition: should be L(2016,1120)@S(0)[0,0 3840x2160] but after move is L(3839,2159)@S(0)[0,0 3840x2160] Possible cause in case you did not touch the mouse while script was running: Mouse actions are blocked generally or by the frontmost application. You might try to run the SikuliX stuff as admin.
[debug] CLICK on L(2016,1120)@S(0)[0,0 3840x2160] (535 msec)
[debug] Image: reused: 2.png (file:/C:/AutoBat/Bat/Tools/gfxbench3/gfxbench.sikuli/2.png)
[debug] Region: wait: waiting 3.0 secs for 2.png to appear in S(0)[0,0 3840x2160]

[debug] Region: handleFindFailed: P(2.png) S: 0.7 T: 113,-41
[debug] Region: wait: 2.png did not appear [5280 msec]
[error] script [ gfxbench ] stopped with error in line 9
[error] FindFailed ( 2.png: (646x152) in S(0)[0,0 3840x2160] E:Y, T:3.0 )
[debug] Sikulix: cleanUp: 0

Abhijit saxena (abhijitsaxena) said : #6

Also I am already running this script as admin

RaiMan (raimund-hocke) said : #7

OK, there is a problem.

... but it is not relevant, that you are logged in with an admin account.

You have to run the script on an admin commandline (special start of commandline window) as mentioned in comment #3

BTW: is it Windows 10 latest build?

Abhijit saxena (abhijitsaxena) said : #8

I am already running commandline in admin mode.
And yes it is windows 10's latest build

RaiMan (raimund-hocke) said : #9

see bug 1730645

... and run the mentioned test

Okay, I'll run that test

[MoveMouseAround] Using: loops = 5; Robot.autoDelay = 20
[MoveMouseAround] GraphicsEnvironment: 1 ScreenDevices
[MoveMouseAround] Screen: (0,0 3840x2160)
[MoveMouseAround] using area: (200,200 3440x1760)
[MoveMouseAround] *** visitCorners of (200,200 3440x1760)
[MoveMouseAround] Moved to: (200,200) but is: (0, 0)
[MoveMouseAround] Moved to: (3640,200) but is: (3839, 600)
[MoveMouseAround] Moved to: (3640,1960) but is: (3242, 2159)
[MoveMouseAround] Moved to: (200,1960) but is: (0, 1562)
[MoveMouseAround] Moved to: (200,200) but is: (600, 0)
[MoveMouseAround] *** movingAround in (200,200 3440x1760) for 5 times
[MoveMouseAround] Moved to: (955,387) but is: (1665, 1161)
[MoveMouseAround] Moved to: (2451,762) but is: (3839, 0)
[MoveMouseAround] Moved to: (2195,1203) but is: (0, 2159)
[MoveMouseAround] Moved to: (3374,899) but is: (3839, 0)
[MoveMouseAround] Moved to: (2892,1707) but is: (998, 2159)

RaiMan (raimund-hocke) said : #12

Ok, then you have the same problem as the one that brought this problem up.

It has nothing to do with SikuliX, since the above test is plain Java.

Since the problem does not exist on my Windows 10 machine (latest build and latest java 8), it might have something to do with a special graphics setup (hardware/software) or some piece of software, that intercepts somehow the mouse movement originated from a program.

I have no clue and no chance, to work on a solution (... and no time: 2 weeks on holiday ,-)

Now that's a bummer. My whole project is based on sikuli. :(
Now have to find some native python library to run the automation.

Can you help with this problem?

Provide an answer of your own, or ask Abhijit saxena for more information if necessary.

To post a message you must log in.