Lucid Posted November 12, 2015 Share Posted November 12, 2015 I'm hoping someone can shed some light on something for me...I've got a larger block of code that is hiccupping, and I narrowed it down to what seems to be an offending piece of math.If I compile the following code for x64, and I run it under 64-bit Windows PE, it works just fine on a Dell OptiPlex 980. However, if I boot up into the exact same 64-bit Windows PE environment on a new Dell OptiPlex 7020, it causes an illegal exception. What gives? Is there some sort of hardware, RAM, or BIOS setting that makes the math not work out, or spit out some odd integer that the message box can't handle or something? I'm weak on high level math, so maybe I'm overlooking something obvious?Can anyone help shed some light on this?Thanks!#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_x64=Test.exe #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Global $iHigh = 669650608 * 2 ^ 32 MsgBox(64, "testing", $iHigh)I'm using Autoit 3.3.14.2 with SciTE 3.6.0 Link to comment Share on other sites More sharing options...
AndyG Posted November 12, 2015 Share Posted November 12, 2015 it causes an illegal exception.Can you show us the exact error / error window? Is the exception caused by AutoIt or Windows? Link to comment Share on other sites More sharing options...
Lucid Posted November 12, 2015 Author Share Posted November 12, 2015 The error message that pops up is: TITLE: AutoIt v3: Test.exe - Application ErrorMESSAGE: The exception Illegal InstructionAn attempt was made to execute an illegal instruction.(0xc000001d) occurred in the application at location 0x00007FF6CE279FD1.Click OK to terminate the program Link to comment Share on other sites More sharing options...
czardas Posted November 13, 2015 Share Posted November 13, 2015 (edited) I fail to understand this. It's not possible for me to reproduce your error for two reasons. Firstly you haven't provided the code which causes this problem (or is the message box code you posted not working when compiled and exported to a new system - I'm confused). Secondly I don't have two Dell Optiplex 7020's available to test it. However it is plausible that the discrepancy is caused by a Windows bug.You seem to have narrowed down the problem to a numeric expression, but that might not be the issue. I didn't see a problem with the expression you provided, which returns 2876127461106515968. You might want to take a look at operator64 in my signature: which may provide a little insight, but then again it might not. There are some inconsistencies occurring when using standard operators, especially with large integers (ODD MATH RESULTS). Please be aware that the functions in operator64 are a lot slower than standard operators, so they should only be used sparingly. If you get an unexpected result from a mathematical expression - it might be worth testing the same expression using the UDF functions to see if there is a difference.I'm still doubtful that this is a maths error - you haven't given enough details. The code you posted works fine on my machine. Edited November 13, 2015 by czardas more detail Radiance 1 operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Lucid Posted November 13, 2015 Author Share Posted November 13, 2015 czardas, the code in my first post IS the code that causes the error.And yes, I know it's aggravating and seems odd that it blows up - it works on one machine, but not another.I went back and did more tests and think this is some sort of bug with using Autoit 3.3.14.2 with SciTE 3.6.0. If I compile that same code from my first post using AutoIt 3.3.12.0 with SciTE 3.4.4 it works just fine with no errors. Link to comment Share on other sites More sharing options...
Bowmore Posted November 13, 2015 Share Posted November 13, 2015 I'm using AutoIt 3.3.14.2 with Scite4AutoIT 3.6.0 on Windows 10 Pro and your little script works as expected when run from Scite or compiled to exe and run, both as 32bit and 64bit. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
JohnOne Posted November 13, 2015 Share Posted November 13, 2015 Win 7, 32 bit, 3.3.14.2, works fine. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
czardas Posted November 13, 2015 Share Posted November 13, 2015 So what happens when you change the value of $iHigh? operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
PACaleala Posted November 14, 2015 Share Posted November 14, 2015 In my opinion this is not an Autoit or math problem. Windows PE is not right (suitable) for running Autoit .Microsoft says : " Windows PE is a minimal Win32 operating system with limited services"More information can be found on this page: https://technet.microsoft.com/en-au/library/cc766093(v=ws.10).aspx Skysnake 1 Link to comment Share on other sites More sharing options...
Lucid Posted November 16, 2015 Author Share Posted November 16, 2015 I can change the value and such just fine. And the code works just fine on one test machine running Windows PE (and my older code has run on several hundred instances of Windows PE without a hiccup). It just seems to blow up on another, newer test PC running the exact same 64-bit Windows PE environment (32-bit seems to be just fine on both machines).If I compile with an older version of Autoit, it works just fine on both machines. So just getting a success on a single machine isn't an indicator that the x64 compiled code is working. Sorry, all I can say is that to me, this seems to point at either the hardware or Autoit as being the culprit. I'm functioning fine after dropping back to the older Autoit, so I just wanted to share the above for anyone else experiencing weirdness too. And if anyone has any ideas they want me to try, I'm happy to do so. Link to comment Share on other sites More sharing options...
BrewManNH Posted November 16, 2015 Share Posted November 16, 2015 It points at hardware to me, because it works on one but not another it's not AutoIt. If it failed across all machines then it might be 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 GudeHow 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 Link to comment Share on other sites More sharing options...
gr1fter Posted February 9, 2016 Share Posted February 9, 2016 just wanted to report that I am experiencing the same issue in WinPE x64 environment and only appears when compiled Autoit 3.3.14. If i go back to AutoIt 3.3.12.0 the script works perfect. So something changed in the version that is preventing it to run in this environment. My workaround for now is to use AutoIt 3.3.12.0 to compile these type of scripts (which is minimal for me). MESSAGE: The exception Illegal Instruction An attempt was made to execute an illegal instruction. (0xc000001d) occurred in the application at location 0x00007FF6CE279FD1. Click OK to terminate the program Like this Quote Link to comment Share on other sites More sharing options...
jchd Posted February 9, 2016 Share Posted February 9, 2016 AFAIK WinPE isn't in the list of supported OSes of AutoIt. And I seem to recall that a change of the (internal) math library was necessary to fix issues with the library previously in use, but after thinking at that again this might be predating 3.3.12.0. OTOH the issue might very well be the consequence of a change of compiler (or compile options) used to produce the AutoIt code interpreter. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
NDog Posted December 13, 2017 Share Posted December 13, 2017 I can confirm this same bug today with later version of autoit than 3.3.12.0 Since all my code requires Windows PE support, I will be sticking to 3.3.12.0 for now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now