Errors running Java apps

Asked by Alejandro Bullones

Hello, i had noticed that when running a sikuli script in an oracle application developed in java, when clicking incertain buttons, the app freezes whe sikuli waits until the next element to show on the screen. after the sikuli timeout finishes closing the script, the java app unfreezes and starts working again. is it possible that sikuli crashes when another application is running in java at the same time? if so, is there a solution?

thanks

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

What System?
Method to run Sikuli script?

Revision history for this message
Alejandro Bullones (ale-1) said :
#2

it is running in win2k3 32bits, but i found the same thing happening in xp. at the momment the script is being runned directly from the sikuli interface.

Revision history for this message
Alejandro Bullones (ale-1) said :
#3

it is running in win2k3 32bits, but i found the same thing happening in xp. at the momment the script is being runned directly from the sikuli interface.

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

I understand:
-- you start your Java application
-- then you start Sikuli-IDE, where you open your script and run it
-- the IDE screen vanishes and the script starts to act on the app by clicking some visual object

What do you mean by "the app freezes"? Does not react on the click? Does not react on any manual action anymore? What happens with your app, while Sikuli is waiting after the click?

Is your app working, while Sikuli runs a script, that e.g. acts on a web site opened in a browser? Put loop with a popup() in the script, to have a chance to act on your app in between.

Revision history for this message
Alejandro Bullones (ale-1) said :
#5

What i do is:
- Start a sikuli script that runs a java application
- The script starts doing tasks in the application
- In some screens after, for example select an option that pops up and OK/Cancel window or a Menu, the app freezes and the window or menu doesn't show
- Sikuli keeps on waiting for the next image that should find to do the next step but as it nevers appears, it ends after reaching the timeout
- Inmediatly after sikuli aborts, the window that was supposed to show, shows, making me think that somehow sikuli interfers in the java app making it either go extreamly slow to the point that timeouts get reached (i even setted it to 5mins), or the app gets totally frozen.

this always happens when using the wait command to wait until the next graphical item shows to do the following action. i tested replacing the wait for a sleeps and it works, but being the main objective of my script to measure response times, the sleep command doesn't provide me what i'm looking for. do you think there might be a solution to it?

thanks

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

Does it always happen at the same point or in different situations?

Is it possible to reproduce the freeze situation this way:
- drive your app manually to the point before the freeze happens in your long script
- then run a short snippet, that only does the next step

what happens?

you have to some how narrow the situation.

Might be some java.awt.robot stuff ??

Revision history for this message
Anshu (anshu-ca) said :
#7

HI RaiMan,

I have also seen this issue on my XP Virtual machine.

For example, when i am running an install script for my app , after clicking the exe - Next button appears in say about 40 seconds (in the mean time it does some disk space check or so).

If i write my script like

1.Run the exe file
2. Click("Next.png",50)

as compared to

1.Run the exe file
2.Wait(50)
 3.Click("Next.png",5)

Then in first case , most of the times script fails because as soon as it hits find or click that has wait interval inside - it appears that main app stops working and sikuli takes over all the processor/memory and just goes in wait mode.Once it fails - after finishing 50 seconds, that time - app would continue and Next button would appear.

I can only see this more often in the Virtual Machine - which is a slow machine - with 1 GB RAM and also the main HOST machine is running some other apps.

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

If this is a problem, then with X-1.0rc2 it is possible to adjust, how many times per second Sikuli tries to find during the wait (see: http://sikuli.org/docx/globals.html#Settings.WaitScanRate).

BTW:
Click("Next.png",50)
50 does not define a waiting time. The second parameter denotes the modifier keys used

If you want to wait for an image and then click, you have to use:

click(wait("Next.png", 50))

Can you help with this problem?

Provide an answer of your own, or ask Alejandro Bullones for more information if necessary.

To post a message you must log in.