Xplode

Random crashes on Windows XP

21 posts in this topic

Hello,

Since a few month ( more precisely, when I updated my script to AutoIT 3.3.14.2 ) , some users are complaining that my software doesn't work anymore on Windows XP. I verified that on VM and its really strange :

  • Sometimes, the compiled script runs without any problem when directly on E:\ ( E:\ is the drive where my shared folder between VM and host is mounted ) , but crashes when run from the desktop
  • Sometimes, it's the opposite
  • And sometimes, the script works perfectly or always crashes.

I thought it was related to something in my script but I tried with a basic script ( just showing a message box with "Toto" inside ) and I face the same behaviour.

Please note that this is not an AutoIT error, it's a real crash ( see picture attached ). I tried different things like using an older AutoIT version to compile, or compile directly from my VM and I face the same issue. This issue appears only in Windows XP.

I'm thinking of a problem with AutoIT3Wrapper, do you think this problem could be related to it ?

 

 

crash.png

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You know about:

Quote
  • Changed: Minimum OS requirements are now Windows XP SP3 and Windows Server 2003 SP2.

from Help|Appendix|Changelog

So what SP is installed in crashing XP?

 

Edited by AutoBert

Share this post


Link to post
Share on other sites
6 minutes ago, AutoBert said:

You know about:

from Help|Appendix|Changelog

So what SP is installed in crashing XP?

 

It crashes even with Windows XP SP3. Moreover, as I said in my first post, I tried with older version of AutoIT and it still crashes.

Share this post


Link to post
Share on other sites

Hello,

For your information, I'm able to provide more details about the crash. This is what I got when I run the script directly from Scite :

>Running:(3.3.14.2):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Xplode\Bureau\test.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
!>07:03:59 AutoIt3.exe ended.rc:-1073741819
+>07:03:59 AutoIt3Wrapper Finished.
>Exit code: 3221225477    Time: 1.789
 

Share this post


Link to post
Share on other sites
9 hours ago, Xplode said:

I'm thinking of a problem with AutoIT3Wrapper, do you think this problem could be related to it ?

Why? All it does is perform a run statement running autoit3.exe with your script as input. MAybe it would help when you share some more information about the script itself and maybe even show it. 

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I believe AdwCleaner is written in AutoIt.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

<>

Edited by mikell

Share this post


Link to post
Share on other sites

Hello,

Yes you're right, it's related to AdwCleaner since AdwCleaner in written in AutoIT and I'm its developer :)

I thought the issue was resolved in the latest version ( 5.031 ) because I was able to run the executable without any problem on my XP VM. But when trying to run it on another XP computer, it crashes.

I don't think it's related to AdwCleaner itself since it works perfectly under Vista, 7, 8 and 10, but this could be related to some UDF I use for AdwCleaner..

It's really difficult to investigate on this kind of bug because it's not a "programming" error ( when you have just an AutoIT error and the line the script crashes ).

I will continue to make some tests and keep you updated, but if you have any information about the exit code I provided above, I'll gladly appreciate your help.

Regards,

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

34 minutes ago, Xplode said:

....this could be related to some UDF I use for AdwCleaner.

Unlikely, if a simple script just showing a Msgbox causes a crash ... :huh:

Edit
When compiling did you use   #AutoIt3Wrapper_UseX64=n  ?

Edited by mikell

Share this post


Link to post
Share on other sites

You could always just tell people you've stopped XP support because if Microsoft won't support why should you :)

 


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
50 minutes ago, mikell said:

Unlikely, if a simple script just showing a Msgbox causes a crash ... :huh:

Edit
When compiling did you use   #AutoIt3Wrapper_UseX64=n  ?

Yes I use it since I use only a x86 version of the executable both on x86/x64.

5 minutes ago, BrewManNH said:

You could always just tell people you've stopped XP support because if Microsoft won't support why should you :)

 

Yeah I know but unfortunately a lot of people are still using Windows XP..

Share this post


Link to post
Share on other sites
Just now, Xplode said:

Yeah I know but unfortunately a lot of people are still using Windows XP..

They shouldn't be. ;)

You're not making any money from it, so you don't lose anything by not supporting a 15 year old OS that's obsolete and unsupported. 

Also you stated that it's crashing on older versions of AutoIt, so perhaps there's something wrong with the computer being used to compile it, and not where it's being run.

There are plenty of  people using 3.3.14.x on WinXP without a problem, so I can only suggest you look closer to home for why it's crashing at all.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

I would still prefer to solve this issue even if it's highly probable that v6.000 won't support Windows XP. This is the script I use to make the program crash :

 

#NoTrayIcon
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
;~ #AutoIt3Wrapper_Version=Beta
;~ #AutoIt3Wrapper_Icon=Ressources\AdwCleaner.ico
;~ #AutoIt3Wrapper_Outfile=E:\test2.Exe
;~ #AutoIt3Wrapper_Compression=4
;~ #AutoIt3Wrapper_UseUpx=y
;~ #AutoIt3Wrapper_Res_Language=1036
;~ #AutoIt3Wrapper_Res_requestedExecutionLevel=None
;~ #AutoIt3Wrapper_Run_AU3Check=n
;~ #AutoIt3Wrapper_AU3Check_Parameters=-d -w 3 -w 4 -w 5 -w 6
;~ #Au3Stripper_Parameters=/sf /sv /rm /rsln /tl /debug
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <SQLite.au3>
#include <Process.au3>
#include <GuiConstants.au3>
#include <GuiListView.au3>
#include <String.au3>

#include <C:\Documents and Settings\Xplode\dev\AdwCleaner\JSON.au3>
#include <C:\Documents and Settings\Xplode\dev\AdwCleaner\Permissions.au3>
#include <C:\Documents and Settings\Xplode\dev\AdwCleaner\Services.au3>
#include <C:\Documents and Settings\Xplode\dev\AdwCleaner\Registry.au3>
#include <C:\Documents and Settings\Xplode\dev\AdwCleaner\Firefox.au3>

MsgBox("","","Toto")

But I don't think it really matters, since when I comment a random line, it works. Then I uncomment another, it crashes. It's totally random, perhaps because the crash code (  3221225477 ) stands for a segmentation fault. So maybe sometimes the script can access to the address in memory and works, and sometimes it can't..

Share this post


Link to post
Share on other sites
59 minutes ago, BrewManNH said:

You could always just tell people you've stopped XP support because if Microsoft won't support why should you :)

Toothache treatment = decapitation, eh ?  :D

Share this post


Link to post
Share on other sites
1 hour ago, mikell said:

Toothache treatment = decapitation, eh ?  :D

More like, the OS sucks, stop trying so hard. ;)

 


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

BTW, as an aside.

The script posted in #14 is not just a msgbox causing a crash, it's 10 different include lines PLUS a msgbox. And only half of those have passed verification with AutoIt3's latest version because they're standard libraries while the other 5 are unknown/untested.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Hello,

Yes it includes some UDF ( JSON.au3, Permissions.au3 and Services.au3 ) that can be found on AutoIT forum. The two other ( Registry.au3 and Firefox.au3 ) are home-made.

We're currently trying a debug version with JSON.au3 disabled, since after some tests, we are highly suspicious about this UDF causing the crash.

Regards.

Share this post


Link to post
Share on other sites

Hello,

Just as a follow-up, we found the bug and fixed it in v5.032. This is the part of the code that was responsible of the crash :

For $i = 1 To 100
    $sSubKey = RegEnumKey("HKU", $i)
    If @Error Then ExitLoop
    If $sSubKey = _LookupAccountName(@UserName) Or $sSubKey = "S-1-5-18" Or StringInStr($sSubKey,"_Classes") Then ContinueLoop
    _ArrayAdd($aSoftwareKeys,"HKU\" & $sSubKey & "\Software\")
Next

In fact, it's the call to "_LookupAccountName" that makes the computer crashes. This function comes from Permissions.au3 UDF that can be found here. I guess this function should be only called for Permissions.au3 internal use.. :)

Regards.

Share this post


Link to post
Share on other sites
On 1/28/2016 at 2:56 PM, Xplode said:

the crash code (  3221225477 ) stands for a segmentation fault.

It is the decimal equivalent to 0xC0000005 (Access Violation)

You can verify this in Windbg.

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