[1.0.x] Script hangs after extended test runs

Asked by DavidL on 2013-09-05

Im running a script to exercise a GUI over an extended period of time, and so far I've had 6 test runs and have seen 4 of them hang at the same place in the GUI sequence.

Summary of test runs:
Became hung 7 hours into a 24 hour run
Became hung 40 hours into a 48 hour run
Successfully completed a 72 hour run
Became hung 9 hours into a 96 hour run
Successfully completed a 48 hour run
Became hung 84 hours into a 96 hour run

The test consists of a series of nested loops which use a list of x,y locations to click on specified points, then at the end, searches for the Apply button to click, as follows:

loop for range1
    Click(this range1 Location)

    loop for range2
        Click(this range2 Location)

        loop for range3
            This goes round a circle clicking on two points for the start and end
            Click(start Location)
            Click(end Location)

            Click(ApplyButton.png)

        end range3

        Click(this range2 Location) again

    end range 2

end range1

It always hangs with the mouse pointer on the Apply button.

The test is started as a command line script using sikuli-script with debug enabled, and machine parameters logged to record cpu, memory, and disk usage, all of which appear normal. Looking in the debug output gives nothing unusual.

Im running it on RedHat Linux 6.4 64bit using Sikuli version 1.0.0.

Havn't been able to try it on version 1.0.1 yet due to problems getting the dropbox hosted files through a firewall.

In advance of trying 1.0.1, have there been any mods which would address such a random hang?

Thanks

Question information

Language:
English Edit question
Status:
Open
For:
Sikuli Edit question
Assignee:
RaiMan Edit question
Last query:
2013-09-18
Last reply:
2013-09-17
RaiMan (raimund-hocke) said : #1

--- in advance of trying 1.0.1, have there been any mods which would address such a random hang?
nothing changed here (except in the observe() section).

--- Havn't been able to try it on version 1.0.1 yet due to problems getting the dropbox hosted files through a firewall.
already checked the possibility in faq 2363

Your problem:
How do you handle FindFailed?
Just normally? So script should crash if ApplyButton is not found?

If FindFailed is ignored somehow, the LoopRange3 would run forever.

DavidL (dsdev27-73) said : #2

-- I've checked faq 2363 as I need the standalone files, the test system doen't have a web connection. Just a case of getting them through the firewall.

-- I wasn't handling FindFailed at all, so will give it a go, likely with the exception handler. It does look though as if it has found the Apply button, as it hangs with the mouse pointer still on it. Is there anything I can do to try to find out more about the exception conditions?

-- Not sure how it would enter an infinite loop in range3 if FindFailed is not handled...

RaiMan (raimund-hocke) said : #3

--- download problem
you should somehow be able to download the stuff on another machine and transfer it to the test machine.

--- handling FindFailed
... will not change your situation, since if the find would have failed in your situation, the script would have crashed wit exception FindFailed.

-- Not sure how it would enter an infinite loop in range3

simply so:

      loop for range3
            This goes round a circle clicking on two points for the start and end
            Click(start Location) // always works
            Click(end Location) // always works

            Click(ApplyButton.png) // always works if FindFailed ignored

        end range3

Since I do not know, wether you have a terminating condition to break the loop, the above would run forever.

DavidL (dsdev27-73) said : #4

I have now given this a try using v1.0.1 and have handled FindFailed. I see that handling it wont change anything but it lets me see a bit more of whats going on.

The same problems happens, after a seemingly random amount of time after successfully finding the Apply button at the end of each iteration of loop range3, Sikuli raises an exception as it cant find it any more.

I'm guessing there is likely more than one exception possible at this stage so if need be I could maybe find out which one it is.

As a bit more info, I've had a look at my log file and can see that loop range3 at the start of the test takes around 1 minute 20 seconds to complete. This then gradually increases so after 24 hours is 1 minute 40, up to about 38 hours in when it takes about half an hour then 6 hours.

At the time it took 6 hours, CPU load increased by about 10% and memory stayed more or less stable.

As I was running this from the IDE, I stopped the run with shift alt c, and tried to start it again, which failed. Restarting the IDE enabled the run to start again.

This problem may be similar to another recently reported: 235769 Always Prompt: "FindFailed: can not find *.png on the screen".

RaiMan (raimund-hocke) said : #5

--- As I was running this from the IDE, I stopped the run with shift alt c
long running scripts should always be run from command line using sikuli-script.jar / .cmd
Now with 1.0.1 you can use sikuli-ide.jar/ .cmd as well from commandline using the -r parameter. This directly delegates to the script run level and avoids the initialization of the IDE.
When using abort key in IDE it heavily depends on the state the script is in, wether the IDE is still useable after this.
I always recommend, to restart the IDE.

--- loop range3 lasts longer over the time
Is it possible, to have a look at the real script or is it restricted?
It always helped me, to see the real stuff to get nearer to problems.

DavidL (dsdev27-73) said : #6

Its ok to look at the real script, I'll send it to the email address in your profile.

Thanks

Can you help with this problem?

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

To post a message you must log in.