Jump to content

Recommended Posts

Posted

Hi

I am wondering what is the best way to handle "autoit script has stopped working" and how to handle when the application autoit is testing crashes. 

I noticed sometimes that when I run my scripts I will get one of those 2 errors. It happens maybe once every 10 times but I would like to somehow be able to get information of why it happened(was it autoit that crashed the program or is there a bug in the program it is testing).

 

Thanks

Posted

If it is not compiled,  meaning running from scite, you will get better error messages after a crash in the console. But as JohnOne as stated, putting error checking in place, is the best way.

  Reveal hidden contents
All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

  Reveal hidden contents

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Posted

It is a custom application written a very long time ago.

I just notice that somehow autoit can crash it. It is not always but all of sudden autoit will do something and the entire application will stop to respond and will show some cryptic error. No clue why it happens can't add more debugging to the app it is testing and it does not always happen.

Then sometimes I will run my autoitscript and I will get "autoit stopped responding" and will say nothing else.

Posted

I get 2 error message that randomly happen

1. "autoit script stopped working"

2.  "app has stopped working. A problem caused the program to stop working correctly. Please close the program"

Both happen sometimes and number 2 only happens when autoit tests are run. Never when used by people and its been used for a long time.

Posted

@chobo2,

when you see "app has stopped working", it means Windows tried to communicate with the app to query its status, but the app was busy and could not respond in due time.

so it seems your script is putting too much pressure on the app - so you see the 2nd message. since AutoIt itself is not built for heavy computational load, it may get too busy executing the tests on the app - hence the 1st message.

so, what exactly is your script doing to your app?

P.S. that is a polite way of telling you what AutoBert said right above this post.

Signature - my forum contributions:

  Reveal hidden contents

 

Posted (edited)

Here is one issue

The script that I just got this error on was trying to load up excel to grab data from it(it never got past grabbing data....about 10 rows in that particular worksheet was trying to grab so very little of data) and then to use that data to validate if that same data by going through multiple screens(opening a window, check if whatever is there, closing that window, moving to a next window and so forth).

How can I test if it is a hanging issue or a memory issue? What can I do to minimize the load  on autoit Autoit?

 

stoppedWorking.JPG

Edited by chobo2
Posted
  On 9/28/2016 at 10:18 PM, chobo2 said:

I just got this error on was trying to load up excel to grab data from it

Expand  

Show the function which you are using to grab=get data from excel.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

@chobo2,

  On 9/28/2016 at 5:12 PM, chobo2 said:

It is a custom application written a very long time ago.

Expand  

 

  On 9/28/2016 at 10:18 PM, chobo2 said:

trying to load up excel to grab data from it

Expand  

as far as i know, Excel is not "a custom application written a very long time ago".

 

now, you've been asked politely several times to show your script. this is so we may review it and help you find the cause of the issue. if you do not show your script, anything anyone can say is purely theoretical, with little to none actual benefit.

so, why are you refusing to show your script?

 

 

Signature - my forum contributions:

  Reveal hidden contents

 

Posted (edited)
  On 9/29/2016 at 6:12 AM, orbs said:

@chobo2,

 

as far as i know, Excel is not "a custom application written a very long time ago".

 

now, you've been asked politely several times to show your script. this is so we may review it and help you find the cause of the issue. if you do not show your script, anything anyone can say is purely theoretical, with little to none actual benefit.

so, why are you refusing to show your script?

 

 

Expand  

No Excel is not a custom application. But as far as my autoit tests use excel is to grab data out of it and use it in a custom application.

If you want to see that code you can see it here as I am had problems with it in the past but now I have different problems(before it at least gave me an error now I am running into the script stopping)

I am looking for general ways to figure out how to properly debug my scripts.  Posting my scripts is not an option as I am finding out this error likes to move around. One day it dies on Script 5, next time it could be Script 8, next time it could be who knows. 

I would have to post so much code up that no one could run as you need the customer application that I don't see any benefit until I can narrow down the error. 

All tests run by themselves just fine. It is just went running one after another is when I see these problems

 

Edited by chobo2
Posted

So it is the customers application that is crashing, and not your autoit script? If that is the case, it is going to be very hard for anyone to help you, as we do not have your script, nor the customers application (custom application at that), plus the data being pulled from Excel.

If they are running by themselves, though (your scripts), why not run them one at a time? Meaning split up your code to only do one thing it is supposed to do. That way, when the error does occur, you can narrow it down to that one part.

Not sure anyone else is going to have a better answer, but they might.

  Reveal hidden contents
All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

  Reveal hidden contents

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Posted
  On 9/29/2016 at 11:48 PM, chobo2 said:

I am looking for general ways to figure out how to properly debug my scripts.

Expand  

then you have been given general answer right in post #2.

  On 9/29/2016 at 11:48 PM, chobo2 said:

If you want to see that code you can see it here

Expand  

if you already opened a forum topic, stick with it. also, your code there does very little for error checking, if any at all - and now i see that entire topic is full of people - one of them is the Excel guru - telling you to do proper error checking.

 

Signature - my forum contributions:

  Reveal hidden contents

 

Posted
  On 9/30/2016 at 1:08 AM, nitekram said:

So it is the customers application that is crashing, and not your autoit script? If that is the case, it is going to be very hard for anyone to help you, as we do not have your script, nor the customers application (custom application at that), plus the data being pulled from Excel.

If they are running by themselves, though (your scripts), why not run them one at a time? Meaning split up your code to only do one thing it is supposed to do. That way, when the error does occur, you can narrow it down to that one part.

Not sure anyone else is going to have a better answer, but they might.

Expand  

Well like I said I get 2 errors. 

1. Sometimes the scripts just stop working

2. Sometimes it is actually the custom application that stops working.

Each script is run at one at a time. Each test is written as a function. There is one function that has all the tests in it. The first function(ie test) is called, once it finished it moves onto the next and so forth.

This is where I run into problems as if I run each test manually one at a time it does not seem to have problems. It just seems to have problems when one after another happens.

I

Posted
  On 9/30/2016 at 2:31 PM, orbs said:

then you have been given general answer right in post #2.

if you already opened a forum topic, stick with it. also, your code there does very little for error checking, if any at all - and now i see that entire topic is full of people - one of them is the Excel guru - telling you to do proper error checking.

 

Expand  

Just saying " writing good robust code with error checking" does not help me. What causes an autoit script to stop working? What should I be checking for? How do I catch an error that would case "autoit script stopped working"

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...