Valik Posted January 4, 2010 Posted January 4, 2010 AutoIt v3.3.3.0 (Beta) Released:Read the PM I sent you several days ago.Also, note to self. Update script-breaking changes to mention the removal of raw reading.
wraithdu Posted January 4, 2010 Posted January 4, 2010 (edited) Bad bug. Any of these crash AutoIt, just supply a non-existent PID: ProcessClose(1234) ProcessWaitClose(1234) StdioClose(1234) On the upside, the new AutoIt3Help.exe seems to be working well with all the keywords I've tried. Edited January 4, 2010 by wraithdu
Valik Posted January 4, 2010 Posted January 4, 2010 Bad bug. Any of these crash AutoIt, just supply a non-existent PID: ProcessClose(1234) ProcessWaitClose(1234) StdioClose(1234) Err, they do not crash for me. Nothing was changed in any of those areas.
wraithdu Posted January 4, 2010 Posted January 4, 2010 Damn, it must be something specific to running a script from Scite + AutoIt3Wrapper. Thought I found it, but I guess not, sorry. I'm still looking.
Administrators Jon Posted January 4, 2010 Author Administrators Posted January 4, 2010 Read the PM I sent you several days ago.I knew I'd read something somewhere... Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Valik Posted January 4, 2010 Posted January 4, 2010 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?
Administrators Jon Posted January 4, 2010 Author Administrators Posted January 4, 2010 Jon, did you test that the "hack of doom" stuff works okay with non-ANSI script files?That's not in the beta version, just my local copy. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Valik Posted January 4, 2010 Posted January 4, 2010 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.
wraithdu Posted January 4, 2010 Posted January 4, 2010 (edited) 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 January 4, 2010 by wraithdu
Valik Posted January 4, 2010 Posted January 4, 2010 Please try to reproduce the issue without external tools. Run AutoIt3.exe directly and try to get it crashing, otherwise we can't debug the issue.
wraithdu Posted January 4, 2010 Posted January 4, 2010 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.
Administrators Jon Posted January 4, 2010 Author Administrators Posted January 4, 2010 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. >.< Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Administrators Jon Posted January 4, 2010 Author Administrators Posted January 4, 2010 Also, try compiling autoit3wrapper.au3 manually using aut2exe. No resource hacking/changing/custom tags/directives or anything like that. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
wraithdu Posted January 4, 2010 Posted January 4, 2010 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.
wraithdu Posted January 4, 2010 Posted January 4, 2010 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.
wraithdu Posted January 4, 2010 Posted January 4, 2010 (edited) 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 January 4, 2010 by wraithdu
wraithdu Posted January 4, 2010 Posted January 4, 2010 (edited) 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 January 4, 2010 by wraithdu
Administrators Jon Posted January 4, 2010 Author Administrators Posted January 4, 2010 (edited) 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 January 4, 2010 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Valik Posted January 4, 2010 Posted January 4, 2010 I almost guarantee its a Critical Section issue. Either with your class or my AScopedLock class (possibly being at the wrong scope). I'll have a look.
Valik Posted January 4, 2010 Posted January 4, 2010 Fucking obvious bug that I realized before I even looked at the code.
Recommended Posts