Jump to content

My script is closing without error message in some machines


Recommended Posts

I'm running several scripts in more then 1000 machines. In about 1% of then when I run the compiled script, the scripts are closing without error message, just closing.

I try to compile the follow script in many diferents versions of AutoIt.

The anti-virus is not running.

I try to use the filemon and the process explorer and none relevant results was found.

All machines are 32 bits. In 64-bit machines, this is not happening.

WHILE 1
    Sleep(500)
WEnd

-----------------------------------------------------------------To a lot of people, the Sky is the limit. To person who love the aviation, the sky is the your own home.

Link to comment
Share on other sites

I'm running several scripts in more then 1000 machines. In about 1% of then when I run the compiled script, the scripts are closing without error message, just closing.

I try to compile the follow script in many diferents versions of AutoIt.

The anti-virus is not running.

I try to use the filemon and the process explorer and none relevant results was found.

All machines are 32 bits. In 64-bit machines, this is not happening.

WHILE 1
     Sleep(500)
 WEnd
Are you saying that a compiled version of the simple While loop you showed closes?

If so then I would guess that something is closing it, and since SpyBot for example, detects recently compiled versions of AutoIt as malware (reported to SpyBot and apparently a fix in the next update) I would expect that the 1% of machines have some malware detection software that falsely detects AutoIt as harmful and shuts it down.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Last week I had a similar problem. A compiled script was working fine on a lot of PCs but crashing on a single PC.

After some investigation I found the problem to be caused by a wrong working directory in the users link definition on his desktop. The script was reading an ini file from the working directory, didn't find it but unfortunately didn't catch the error to display a message.

So: Check the environment!

HTH

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Are you saying that a compiled version of the simple While loop you showed closes?

If so then I would guess that something is closing it, and since SpyBot for example, detects recently compiled versions of AutoIt as malware (reported to SpyBot and apparently a fix in the next update) I would expect that the 1% of machines have some malware detection software that falsely detects AutoIt as harmful and shuts it down.

I send the security report to Trend and no malware was found.

-----------------------------------------------------------------To a lot of people, the Sky is the limit. To person who love the aviation, the sky is the your own home.

Link to comment
Share on other sites

Last week I had a similar problem. A compiled script was working fine on a lot of PCs but crashing on a single PC.

After some investigation I found the problem to be caused by a wrong working directory in the users link definition on his desktop. The script was reading an ini file from the working directory, didn't find it but unfortunately didn't catch the error to display a message.

So: Check the environment!

HTH

I perform a check on all environment and nothing was found.

The problem still persist.

-----------------------------------------------------------------To a lot of people, the Sky is the limit. To person who love the aviation, the sky is the your own home.

Link to comment
Share on other sites

If you have a machine where you can reproduce the problem I would do the following:

  • Install the full AutoIt / Scite Package
  • Open your script in Scite and run it
  • If you get any error messages try to solve the problem
  • If you don't get any message insert #AutoIt3Wrapper_Run_Debug_Mode=N in your script and again run it from Scite and see what the script does

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

If you have a machine where you can reproduce the problem I would do the following:

  • Install the full AutoIt / Scite Package
  • Open your script in Scite and run it
  • If you get any error messages try to solve the problem
  • If you don't get any message insert #AutoIt3Wrapper_Run_Debug_Mode=N in your script and again run it from Scite and see what the script does

I get no errors and the script no crash. Only the compiled script is crashing.

-----------------------------------------------------------------To a lot of people, the Sky is the limit. To person who love the aviation, the sky is the your own home.

Link to comment
Share on other sites

You mean there are a few PCs where no compiled script works ? The can't even start ?

(try not using upx, long shot I know)

The script start and crash in few seconds, without errors, just close.

-----------------------------------------------------------------To a lot of people, the Sky is the limit. To person who love the aviation, the sky is the your own home.

Link to comment
Share on other sites

The next thing I would do is write a log file. At some significant points in your code (at the beginning, before and after reading/writing files, before you start a loop ..) write a record with some meaningful data (@HomePath, @ScriptFullPath, @WorkingDir, @NumParams, returncode of file operation, counter for your loop ...) with _FileWriteLog.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

The next thing I would do is write a log file. At some significant points in your code (at the beginning, before and after reading/writing files, before you start a loop ..) write a record with some meaningful data (@HomePath, @ScriptFullPath, @WorkingDir, @NumParams, returncode of file operation, counter for your loop ...) with _FileWriteLog.

I do that, but the application crash in a random part of the code. There is no logic.

In one of the machines, I delete the windows user profile and create again and the problem stop. But on the others machines, the problem is still occurring.

-----------------------------------------------------------------To a lot of people, the Sky is the limit. To person who love the aviation, the sky is the your own home.

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...