Jump to content
Sign in to follow this  
Chani

ConsoleWrite hangs + AutoIT hangs

Recommended Posts

Chani

We're using AutoIT to run QA tests (v 3.2.12.0).

After 5 months, AutoIT suddenly started to have weird symptoms:

1) When I use a consoleWrite, the output is NOT printed to the debug window past a few initial lines but it is being printed in the log file (which happens in the same function called Record). The number of lines that it prints before hanging in the console varies.

2) During execution, I use the tray icon to see on what line I'm stuck. Recently I have noticed that it is wrong...The icon will say that it's on a line like sleep(2000) for more than 1 minute (I keep refreshing by moving away from the icon and then back).

3) The script cannot be stopped by right clicking on the autoit tray icon. If I right click, nothing happens and I have to force termination with ctrl break.

Notes:

- The problem occurs on every machine I use (we have at least 6 different XP boxes).

- These are all new installs since I have to wipe the machines to run my tests on a new build.

We're right in the middle of a test cycle and there is a fire under me to figure out why out automated tests are broken >_<

Thanks for you insights :)

Share this post


Link to post
Share on other sites
PsaltyDS

We're using AutoIT to run QA tests (v 3.2.12.0).

The current Prod is 3.2.12.1 and the current Beta is 3.2.13.7.

After 5 months, AutoIT suddenly started to have weird symptoms:

1) When I use a consoleWrite, the output is NOT printed to the debug window past a few initial lines but it is being printed in the log file (which happens in the same function called Record). The number of lines that it prints before hanging in the console varies.

You will have to post some code to provide an example of how you are doing this before people will know what's going on.

2) During execution, I use the tray icon to see on what line I'm stuck. Recently I have noticed that it is wrong...The icon will say that it's on a line like sleep(2000) for more than 1 minute (I keep refreshing by moving away from the icon and then back).

That doesn't mean anything. If a loop keeps coming back to a Sleep() then it might only execute other code for 1ms, then go back to Sleep() for 2000ms. Your odds of moving the mouse to the icon at exactly that 1ms are slim.

A better check would be a log file with some _FileWriteLog() calls to update where you are and what's going on at any given time.

You could also run from SciTE with:

#AutoIt3Wrapper_Run_Debug_Mode=Y

3) The script cannot be stopped by right clicking on the autoit tray icon. If I right click, nothing happens and I have to force termination with ctrl break.

AutoIt is single threaded, if anything hangs up, it's all hung up including the tray icon responce. You still need to identify what is hanging.

Notes:

- The problem occurs on every machine I use (we have at least 6 different XP boxes).

- These are all new installs since I have to wipe the machines to run my tests on a new build.

We're right in the middle of a test cycle and there is a fire under me to figure out why out automated tests are broken :idiot:

Thanks for you insights >_<

If it's consistent it will be easier to track down.

Something changed since 5 months ago. Did you ever compile the script, or are you running from SciTE every time? What else is happening in that loop with the Sleep(2000)?

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Chani

You will have to post some code to provide an example of how you are doing this before people will know what's going on.

I am working on a trimmed down version my the code that reprodduces the problem. It's a big script and I have to remove all references to the product I'm working on for legal reasons. It's coming :)

A better check would be a log file with some _FileWriteLog() calls to update where you are and what's going on at any given time.

I am using a log file. And it's funny because the log file outputs without problems. It's only in the Scite window (consolewrite) that things stop being updated.

You could also run from SciTE with:

#AutoIt3Wrapper_Run_Debug_Mode=Y
I'm trying this right now.

Something changed since 5 months ago. Did you ever compile the script, or are you running from SciTE every time? What else is happening in that loop with the Sleep(2000)?

Mmmm...I always ran from Scite. I will try compiling see if that changes anything. The only thing that changed (these script are fairly stable in the overall execution) is that I moved await from WinWait (which was inconsistent in my experience) towards doing while + sleep loops. Maybe the while loop is freezing up Scite and jams the test condition from executing properly?

Thx for your comments. It really helps orgnaize my own thoughts >_<

Chani

Share this post


Link to post
Share on other sites
Chani

Bingo!

As PsaltyDS mentionned, when I compile and run from outside the editor, all the weirdness goes away.

THANKS!!!

Chani

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×