Jump to content

Resolve unresponsiveness?


Elyonne
 Share

Recommended Posts

I have a script interacting with a program that likes to crash every now and then. It uses a lot of ram & cpu power, and so when my stupid Windows 10 computer decides to force-download updates in the background, everything turns to poop. Also, for my internet connection I currently have to rely on crappy wireless xfinity, which I know doesn't help. And these are only two out of a bazillion different factors that make the thing crash. The point is, when it does, it doesn't close, it just stays there open and my script thinks the window is still active and keeps going. Is there a way for AutoIt to tell when an app has become unresponsive??? I'm going to try PixelChecksum() but I haven't had luck in the past with the other pixel functions and I thought I'd ask here to see if anyone had a better idea.

The other thing is that the program has processes that keep running in the background whether I call ProcessClose() or WinKill(), or just quit manually. If I don't go into task manager and end these processes, when I run the thing again, sometimes it will launch in its frozen state. Other times it will be ok for a few minutes before crashing again. Au3Info doesn't tell me stuff about these processes so idk how to deal with them in my script.

 

new to AutoIt and online forums, so I apologize in advance for being annoying.

Link to comment
Share on other sites

  • Moderators

@Elyonne without knowing the nature of the program, or what you're trying to automate within the program, it is a little difficult to help. You need to find a common symptom of when the app becomes unresponsive (does it throw a pop-up, does the window become blank, does it stop writing to the log files, etc.). As I said, without knowing the app you're working with, and with, as you so pointedly put it, a "baziliion" factors that might make it hang, it becomes difficult to suggest a one-size-fits-all solution.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

The program is an android emulator, which is its own little virtual machine. As my script executes, it eats up more and more RAM and CPU power with each loop iteration until it just freezes. There are no messages and it doesn't become blank, it's just frozen. Sometimes it's just the app and the emulator will let me close the app, and other times the whole emulator is frozen. Usually, once it freezes, it frees up most of the computer's resources.


I think it crashed around 4:59 AM last time but the last thing I see on the log is....

12-08 03:32:59.460  2624  2718 F libc : Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 2718 (Thread-120)
2624 = process ID
2718 = thread ID

The emulator is apparently based on Dalvik, which logs a lot of 
GC_CONCURRENT freed 900K, 47% free 3577K/6636K, paused 10ms+10ms, total 20ms
or
GC_CONCURRENT freed 874K, 47% free 3549K/6636K, paused 10ms+0ms, total 10ms


The GUI software framework logs a lot of 
debug info: bitmap event/win_comment_eventitem.png not found
but mostly
debug info: ****Util_localeCountryCode

At one point the log has these little nuggets
W IInputConnectionWrapper: showStatusIcon on inactive InputConnection
W PGA     : [2718] egl: eglDestroySurface (0x4a8447a0, 0x787cbe60)
W PGA     : [2718] egl: eglDestroySurface (0x4a8447a0, 0x787cbe60) returned

I'm clueless, so.

new to AutoIt and online forums, so I apologize in advance for being annoying.

Link to comment
Share on other sites

  • Moderators

Just curious, which emulator are you using? I have used several; wouldn't think you'd want to continue to use one that so obviously has a resource leak.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

When a window 'hangs' (becomes unresponsive), the window state changes to not be enabled.  You can always check the state prior to performing action, and if not enabled , then do a loop until it is.

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

New update! I tried my scripts on a different computer and the pixel functions worked. I guess my surface pro display is just not AutoIt friendly ... maybe the touchcreen thing messes with everything. Oh well.

 

Just curious, which emulator are you using?

Can I name the emulator without getting my threat deleted or flagged or whatever? Sorry, I'm new here and I'm a little paranoid haha. But I will say that it's an extremely popular emulator, possibly the best known one. It is also the slowest and dumbest of all the ones I've tried but unlike the other ones, it can actually run the app I want. But I also just downloaded android x86 and will run it on virtualbox, so we'll see how that goes...

 

 

When a window 'hangs' (becomes unresponsive), the window state changes to not be enabled.  You can always check the state prior to performing action, and if not enabled , then do a loop until it is.

Yay! Thanks! This program does not come recover once it freezes but I will definitely use WinGetState() to determine whether to kill the process and stop the script or what. Thanks a bunch!!!!!!

new to AutoIt and online forums, so I apologize in advance for being annoying.

Link to comment
Share on other sites

  • Moderators

Can I name the emulator without getting my threat deleted or flagged or whatever? Sorry, I'm new here and I'm a little paranoid haha.

If you are using the emulator in a manner that is contrary to the forum rules, then you have a right to be paranoid. I would suggest you familiarize yourself with them now before continuing the conversation. 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

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