[1.1.4] [error] RobotDesktop: checkMousePosition: new information

Bug #1797752 reported by Michael Bvhm on 2018-10-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Medium
RaiMan

Bug Description

Hi
Maybe I can support with the bugfinding of the
[error] RobotDesktop: checkMousePosition: should be L(960,12)@S(0)[0,0 1920x1080] but after move is L(923,71)@S(0)[0,0 1920x1080] 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

issue.

I run the latest version of java and Sikulix.

Sikulix 2018-10-11_14:41 (Build 109)

C:\temp\SikuliX>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

All went fine the last couple of weeks, without running the jar as admin. Suddenly yesterday in the middle of night the program stopped working, and clicks were not registered anymore. with the error message above. Actually the error message appeared even before, while it was still working fine.

I was not able to get it back to work, by reinstalling java, or the newest Sikulix version. only running as admin fixed the issue. (so it is working now - only in administrator mode).

When suddenly in the middle of night the Sikulix program stopped working, I did not do any OS updates or any other changes (actually I was not even at home). However, on the evening before I started playing around with running external programs from the script.
Just 2-3 hours before it stopped working I used app.focus to start taskkill and open tail. (which actually is strange, because it should just focus on an existing window - maybe another bug).
I also started to import subprocess.

import subprocess

And in my script I am using taskkill a lot - I am mentioning this, as at the same time the clicks did not work anymore, also the taskkill command did not work anymore.
these are the commands used:
App.focus(r"C:\Program Files (x86)\TeamViewer\TeamViewer.exe")
subprocess.call('taskkill.exe /f /im TeamViewer.exe')

App.focus worked fine all the time, subprocess stopped at the same time the click stopped working.

I can reproduce here and happy to help.

RaiMan (raimund-hocke) wrote :

what exact version of Windows?

Changed in sikuli:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.4
summary: - [error] RobotDesktop: checkMousePosition: new information
+ [1.1.4] [error] RobotDesktop: checkMousePosition: new information
Michael Bvhm (badboi) wrote :

Hi!
Windows 10 Version 1803 (Build:17134.407)

still the same behavior here.

Regards

RaiMan (raimund-hocke) wrote :

ok, thanks.

Only tomorrow I will have my Windows 10 ready again and will test then.

Michael Bvhm (badboi) wrote :

For your information, my workaround on the PC where clicks don't work anymore, is to start SIKULIX via that .bat script: that works fine in all the cases.

Fun fact: On the PC where I don't have the click issue, this particular script does not work. SIKULIX fails clicking in that case. So I need to be careful how I start SIKULIX on every computer.

@echo off
:: BatchGotAdmin (Run as Admin code starts)
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:: BatchGotAdmin (Run as Admin code ends)
:: Your codes should start from the following line
java -jar C:\temp\SikuliX\sikulix.jar

RaiMan (raimund-hocke) wrote :

interesting - thanks a lot.

I will try to understand ;-) and look, what I can do with that.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers