Jump to content

Autoit crashes! Why?


tjfs
 Share

Recommended Posts

Download latest AutoIt and install (version 3.2.0.1)

Try and compile very simple script (attached) by right clicking and selecting Compile

After a second you get a crash in Aut2Exe. Why? Running WinXP SP2 with latest patches.

Opt("WinTitleMatchMode", 2) 
Opt("SendKeyDelay", 1)

If $CmdLine[0] <> 7 Then 
    MsgBox (0, "Error", "Correct syntax is: KeePrg3 " & chr(34) & "Program" & chr(34) & " " & chr(34) & "Title" & chr(34) & " " & chr(34) & "Username" & chr(34) & " " & chr(34) & "Password" & chr(34) & " " & chr(34) & "Autotype" & chr(34) & " " & chr(34) & "Autotype2" & chr(34)  & " " & chr(34) & "Autotype3" & chr(34)) 
    exit 
EndIf 

$Prog            = $CmdLine[1] 
$WinTitle        = $CmdLine[2] 
$AutotypeUsername = $CmdLine[3] 
$AutotypePassword = $CmdLine[4] 
$Autotype1      = $CmdLine[5] 
$Autotype2      = $CmdLine[6] 
$Autotype3      = $CmdLine[7] 

$Autotype3 = StringReplace($Autotype3, "{_USERNAME_}", $AutotypeUsername) 
$Autotype3 = StringReplace($Autotype3, "{_PASSWORD_}", $AutotypePassword) 

Run ($Prog) 

If WinWait($WinTitle, "", 90) = 0 Then 
    MsgBox (0, "Error", "Could not find window with title " & $WinTitle) 
    Exit 
EndIf 

If Not WinActive ($WinTitle) Then WinActivate($WinTitle) 

If WinWaitActive ($WinTitle, "", 30) = 0 Then 
    MsgBox (0, "Error", "Could not activate window with title " & $WinTitle) 
    Exit 
EndIf 

Send ($Autotype1) 
Sleep(10000)
Send ($Autotype2)
Sleep(5000)
Send ($Autotype3)
Link to comment
Share on other sites

  • Developers

Download latest AutoIt and install (version 3.2.0.1)

Try and compile very simple script (attached) by right clicking and selecting Compile

After a second you get a crash in Aut2Exe. Why? Running WinXP SP2 with latest patches.

No crash here ..... also winxp sp2 AutoIt 3.2.0.1

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

No crash here ..... also winxp sp2 Au8toIt 3.2.0.1

HI,

can you show us your parameters and the error message, please.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

If you mean "Error" dialouge when you say "crash" then , yes I get that.

How are you running the program, CMD line Run() command?

The programs logic itself is okay. Give us an example of how you use this script.

ViM

Link to comment
Share on other sites

Thanks for the quick replies!

I get the following message...

Aut2Exe has encountered a problem and needs to close.

AppName: aut2exe.exe AppVer: 3.2.0.1 ModName: ntdll.dll 
ModVer: 5.1.2600.2180 Offset: 00011639

Exception Information
Code: 0xc0000005 Flags: 0x00000000
Record: 0x00000000000000000 Address: 0x0000000007c911639

I didn't have AutoIt on my machine before I installed 3.2.0.1

I'm just trying to compile the script, not run it.
Edited by tjfs
Link to comment
Share on other sites

@tjfs,

I don't have Mod: ntdll.dll, it appears there's some alerts regarding this dll - check the internet.

Are you running Windows 2000, NT ?

Your script compiles on my Windows XP system, no errors.

ViM

Thanks for the quick replies!

I get the following message...

Aut2Exe has encountered a problem and needs to close.

AppName: aut2exe.exe AppVer: 3.2.0.1 ModName: ntdll.dll 
ModVer: 5.1.2600.2180 Offset: 00011639

Exception Information
Code: 0xc0000005 Flags: 0x00000000
Record: 0x00000000000000000 Address: 0x0000000007c911639

I didn't have AutoIt on my machine before I installed 3.2.0.1

I'm just trying to compile the script, not run it.
Link to comment
Share on other sites

Download latest AutoIt and install (version 3.2.0.1)

Try and compile very simple script (attached) by right clicking and selecting Compile

Try start > programs > autoit3 > beta > Compile script to EXE (Beta), I dont think the right-click dialog is updated when you get beta, it isnt for me... If I use any beta functions then it crashes

Link to comment
Share on other sites

I dont get a crash too.. Why use char(34) why not?

MsgBox (0, "Error", 'Correct syntax is: KeePrg3 "Program" "Title" "Username" "Password" "Autotype" "Autotype2" "Autotype3"')

My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!
Link to comment
Share on other sites

No viruses, no disk errors. Can anyone interpret the address it fails at? A developer perhaps?

Perhaps your antivirus software "sees" some activity that it does not like during the compile process. To test for that make a text file that is totally empty. Rename it test.au3 and compile it. That should take the code being compiled out of the equation. If that still crashes, take your system off the NET, disable your antivirus software and attempt to compile an empty au3 file again.

Also, does it crash when you use the interface available via:

Start > Programs > AutoIt v3 > Compile Script to .exe

?

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

  • Developers

That works! I don't have the beta version installed (in response to an earlier suggestion).

So.. what gives?

Let break this down to a few simple steps to see if we can make sense of it all.

Create a new au3 file lets say Test.au3.

Add this to it: MsgBox(0."test"."test")

Save and close the file.

Now do a right mouse click and select Edit.

SciTE will open the script.

Now compile it in the following ways:

1. Press F7 from within SciTE and tell us the result .... verify if Test.exe is created

2. Close SciTE, Delete Test.exe. Now RigthMouseClick on Test.au3 and select "Compile Script" and tell us the result....verify if Test.exe is created

3. Delete Test.exe and goto Start > Programs > AutoIt v3 > Compile Script to .exe . This will start aut2exe. Click on Browse and Select test.au3. Now click on Convert and tell us the result .... verify if Test.exe is created

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

That works! I don't have the beta version installed (in response to an earlier suggestion).

So.. what gives?

Well it would be easier to guess if you posted the results of my other suggested tests.......So, let's try again:

Stick with the right-click compile option to generate a crash:

Does it crash when the au3 file is empty?

If yes,

turn off AV SW

also turn off any SW watching for malware.

Attempt to compile the same empty au3 file.

Did it crash?

If no,

then keep your AV and anti-malware SW turned off

and test for crash when the au3 file contains the code from your first post.

Did it crash?

Edit: Doh - too slow

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Now compile it in the following ways...

All of those steps work, and compiling my script from inside SciTE works too, only right click compile makes it crash. Right click compiling test.au3 works.
Link to comment
Share on other sites

Post your script which causes the crash as an attachment. Then download the attachment yourself and verify that the downloaded copy also crashes. If it does that, then surely somebody else can reproduce it, otherwise it will be a problem specific only to you.

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