Jump to content

Latest Beta


Jon
 Share

Recommended Posts

Jon, I think you've broke something pretty fundamental. See #1387 for yet another claim that AutoIt is crashing (that I cannot reproduce). I'm testing on Windows XP SP3 (32-bit) with ANSI files. wraithdu, can you please list your OS and file encoding for the script you are trying to run? Jon, did you test that the "hack of doom" stuff works okay with non-ANSI script files?

Link to comment
Share on other sites

That's not in the beta version, just my local copy.

Well shit, that would have been too easy, I guess.

I just tried the script in #1387 saved under UTF-8, UTF-8 with BOM, UTF-16 LE and UTF-16 BE (verified that the BOM is present, if applicable) and received no crash. So its either a 64-bit issue (which I would have thought you would have found) or we're all losing our minds.

Link to comment
Share on other sites

Well you're onto something with the ANSI vs Unicode. I converted the script that was crashing (just a single ConsoleWrite() line) to UTF-16LE with BOM (it was previously an ANSI script file) and it no longer crashes. It doesn't matter whether AutoIt3Wrapper was ANSI or Unicode before compiling with 3.3.3.0.

With Scite4AutoIt3 installed, running a script from Scite via F5 runs it through AutoIt3Wrapper, FYI. I'm also testing this with the lastest beta of AI3Wrapper from the beta download location.

Windows 7 Pro 32-bit

Edited by wraithdu
Link to comment
Share on other sites

I should have been more specific to avoid confusion. It is AutoIt3Wrapper itself that is crashing, not the test script. Unfortunately I have been unable to put together a simple reproduceable script to exhibit the crash. The only way I have been able to get the crash consistently, is to recompile AI3Wrapper against AutoIt 3.3.3.0 and run any ANSI script file from Scite via F5. I'm finding it almost impossible to figure out exactly what in AI3Wrapper is crashing. I thought it was the Run() command at first, but then a simple call to MsgBox() was doing it was well.

Link to comment
Share on other sites

  • Administrators

I can't repro either yet. So let's be clear. Your final repro steps are:

1. Install release version of autoit

2. Install beta version of autoit

3. Install scite

4. Overwrite the version of autoit3wrapper.exe with the one from the scite beta site

5. Create an ANSI test script (apparently anything, or that processclose() one you posted)

6. Open the script in scite and press F5

Doesn't F5 use the 3.3.2.0 version of autoit to run and not the beta? Which on my system gives the output:

<BR>C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Jonathan\Desktop\test.au3" /autoit3dir "C:\Program Files (x86)\AutoIt3" /UserParams <BR>

If all my assumptions are correct then the problem has to be either the way that AutoIt3wrapper.au3 is processed and compiled (line read incorrectly or something). Or, the fileread/filewrite functions that are used in autoit3wrapper are showing up a bug. I notice that within autoit3wrapper there is BOM detection logic so it's immediately clear that different paths are taken depending on the script file format.

Edit: More questions.

- What happens if you use 3.3.3.0 to recompile the OLD version of the autoit3wrapper?

- What happens if you use 3.3.2.0 to recompile the NEW version of the autoit3wrapper.

There are massive changes to autoit3wrapper. File read/writes/dll calls - the lot. >.<

Link to comment
Share on other sites

So here's how I did it and my upgrade path.

1) Install release AutoIt 3.3.2.0

2) Install Scite4AutoIt3

3) Unpack beta 3.3.3.0 sfx archive, replacing release 3.3.2.0. I did not use the install procedure on the beta to do any upgrade.

4) Manually replace the keywords and API files in Scite\Defs\Production, update the 'versioninfo.ini' file to 'Production=v3.3.3.0', and run UpdateDefs.exe. This completes the upgrade. For all intents and purposes, I'm running *production* 3.3.3.0.

5) Compile latest beta of AutoIt3Wrapper.au3 with 3.3.3.0 (it doesn't matter if the script file is ANSI or Unicode).

6) Try to run any ANSI script from Scite via F5 (uses AutoIt 3.3.3.0 and the new AutoIt3Wrapper) and it will crash AutoIt3Wrapper. Convert the script to Unicode and it will work fine.

A) I have to grab the OLD version of AI3Wrapper to test this...

;) A 3.3.2.0 compiled version of the NEW AI3Wrapper works perfectly.

Most of the changes to AI3Wrapper are mine, and only have to do with resource updates on compile. I'm pretty sure the F5-to-run code path is fundamentally unchanged.

Link to comment
Share on other sites

Ok, so yes, a 3.3.3.0 compiled version of the ORIGINAL (ie from the Scite4AutoIt3 installer release) of AutoIt3Wrapper also crashes in the same way. Similarly it does not crash if the target script file is converted to UTF-16LE.

Link to comment
Share on other sites

Here's a fun new ripple. If I add this directive to the top of the ANSI script which was crashing AutoIt3Wrapper:

#AutoIt3Wrapper_Run_Au3check=n

then F5-to-run skips au3check, and AutoIt3Wrapper does not crash anymore.

I think converting the script to UTF-16LE works because it forces AutoIt3Wrapper to skip running au3check, as it says au3check does not support unicode scripts.

Edited by wraithdu
Link to comment
Share on other sites

Ok, FINALLY!! I have a reproducer that crashes directly from a right-click -> Run Script. Hopefully it crashes for you too.

$pid = Run("notepad.exe", "", @SW_SHOW, 0x6)
Sleep(500)
StdioClose($pid)
ProcessClose($pid)
$pid = Run("notepad.exe", "", @SW_SHOW, 0x6)
Sleep(500)
StdioClose($pid)
ProcessClose($pid)

I'm guessing AutoIt3Wrapper was crashing because it is running multiple programs with stdio redirection, which seems to be the key here.

Edited by wraithdu
Link to comment
Share on other sites

  • Administrators

Yes. That crashes. Thanks, now we can have the debugger running on it.

Valik, the only even tiny changes between the release and last beta in stdio related code are 5471, 5473, 5480, and 5481. Any likely suspects in there?

Edited by Jon
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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