Why does Sikuli fail with a different remote desktop session?

Asked by Landy

I developed a sikuli script in a Windows 7 machine.
I access the testing machine via Windows 7 remote desktop.
The script runs very well.
But if I access the testing machine via Windows XP remote desktop, the images can't be find.
I can't see the differences between the 2 sessions with my eyes - same theme, same resolution. But the script failes again and again.

Is there any factor to make sikuli script can't run across different desktop manager? Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Landy
Solved:
Last query:
Last reply:
Revision history for this message
Tsung-Hsiang Chang (vgod) said :
#1

How did it fail? Always fail on the same image? Did any image matching work?

Revision history for this message
Landy (landy-zhu) said :
#2

Hi Tsung-Hsiang

1. "How did it fail?"

It throw exception and said "FindFailed: can't find xxx.png". For example,

at org.sikuli.script.Region.handleFindFailed(Region.java:349)
at org.sikuli.script.Region.wait(Region.java:420)
at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethod
AccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
org.sikuli.script.FindFailed: FindFailed: can not find Open.png

2. "Always fail on the same image?"
Yes, alwasy fail on the same image

3. "Did any image matching work?"
No. If I replace the saved image with a new image captured in the Windows XP remote desktop session, the script can find it then move to the next line and fail to find the next image. But I only tried 3~4 time. I'm not sure whethere there is an image matching well if I try enough times.

Thanks.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Are you working with RDP in fullscreen mode?

If working in windowed mode, there might be slight differences in the presentation regarding pixels (only a difference of one pixel will make the difference).

Try to find a way, to find out, wether in both RDP versions, the test machine desktop is exactly (pixel by pixel) the same.

Revision history for this message
Landy (landy-zhu) said :
#4

Hi RainMan

Yes, I've set the display configuration to 'full screen' in both client machine (win7 and win xp).

I'll provide you the result of comparing pixel by pixel tomorrow because I don't have the testing machine at hand. But I've a question, even there is slight differences between both RDP versions, will it have so obvious effect on the result of similarity? The default similarity is 0.7 and I think it's enough to endure this kind of differences. Please correct me if I misunderstand anything.

Thanks.

Revision history for this message
RaiMan (raimund-hocke) said :
#5

the term similarity is a little missleading here:

an image might be matched if it is exactly the same size by pixels, but some of the pixels differ.

But if an image is not the same size pixel by pixel, it will not match (normally ;-) and this cannot be influenced by minimum similarity (at lest not yet in the current version --- this is a known request bug).

Revision history for this message
Landy (landy-zhu) said :
#6

Hi RaiMan

Your explanation does make a lot of sense!

The Windows XP machine I used has a 4:3 monitor. After I plug a 16:9 monitor and remote desktop to the Win 7 machine which has sikuli environment, the script can run well. So the reason is not the different rdp version, but different monitor.

Thanks.