Jump to content
Sign in to follow this  
Zambra

My script is closing without error message in some machines

Recommended Posts

Zambra

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.

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Zambra

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.

Share this post


Link to post
Share on other sites
Zambra

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.

Share this post


Link to post
Share on other sites
Inverted

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)

Edited by Inverted

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Zambra

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.

Share this post


Link to post
Share on other sites
Zambra

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.

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Zambra

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.

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  

×