jlf Posted May 6, 2014 Share Posted May 6, 2014 (edited) Hi. With latest tools versions (AutoIt 3.3.10.2 w/ or w/o 3.3.11.5-beta, SciTE 3.4.1), the AU3Stripper removes a true active line which result in creating an error when AU3Check parses the "stripped" file. This problem was encountered at least in two different functions, and the test-case (see attached 7z archive) reproduces this problem with only few code lines. Error occurs at line 59 in stripped file (attached). Original missing line is "./Processes_Threads_nDLLs/[includes]/_ProcessUndocumented.au3", line 160. As far as I can see, the stripped will remove (by mistake) the 3rd line if : 1st line : declarative code with optional return 2nd line : comment 3rd line : declarative code (both functions have DllStructCreate, is it a condition for this problem occurs ?) "Processes_Threads_nDLLs" sub-directory is a public au3 "library". See more detailed instructions in "ReadMe.txt" (also attached) Thanks in advance for your support strip.7z Edited May 6, 2014 by jlf Link to comment Share on other sites More sharing options...
BrewManNH Posted May 6, 2014 Share Posted May 6, 2014 Where is $stPBI declared? The only place I see it being declared is in the below code, which is a local variable. Func __PUDGetBasic($hProcess,$iInfo) If Not IsPtr($hProcess) Then Return SetError(1,0,-1) ; Process_Basic_Info: Exit Status, PEB Base Address, Affinity Mask, Base Priority, Process ID#, Parent Process ID# Local $stPBI=DllStructCreate("ulong_ptr;ptr;ulong_ptr;ulong_ptr;ulong_ptr;ulong_ptr") ; <<<<<<<<<<<<< __PUDQueryProcess($hProcess,0,DllStructGetPtr($stPBI),DllStructGetSize($stPBI)) If @error Then Return SetError(@error,@extended,-1) Return DllStructGetData($stPBI,$iInfo) EndFunc 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...
Developers Jos Posted May 6, 2014 Developers Share Posted May 6, 2014 (edited) Try the latest Beta of au3stripper to see if that fixes the issue (when there is one). Jos Edited May 6, 2014 by Jos 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 More sharing options...
jlf Posted May 6, 2014 Author Share Posted May 6, 2014 (edited) Yes, this local variable is declared where you put the "<<<" Original function : Func __PUDGetBasic($hProcess,$iInfo) ;line0 If Not IsPtr($hProcess) Then Return SetError(1,0,-1) ;line1 ; Process_Basic_Info: Exit Status, PEB Base Address, Affinity Mask, Base Priority, Process ID#, Parent Process ID# ;line2 Local $stPBI=DllStructCreate("ulong_ptr;ptr;ulong_ptr;ulong_ptr;ulong_ptr;ulong_ptr") ;line3 __PUDQueryProcess($hProcess,0,DllStructGetPtr($stPBI),DllStructGetSize($stPBI)) ;line4 If @error Then Return SetError(@error,@extended,-1) ;line5 Return DllStructGetData($stPBI,$iInfo) EndFunc After AU3Stripper : Func __PUDGetBasic($hProcess,$iInfo) ;line0 If Not IsPtr($hProcess) Then Return SetError(1,0,-1) ;line1 __PUDQueryProcess($hProcess,0,DllStructGetPtr($stPBI),DllStructGetSize($stPBI)) ;line4 If @error Then Return SetError(@error,@extended,-1) ;line5 Return DllStructGetData($stPBI,$iInfo) EndFunc Line2 removed (OK, it's a comment), but Line3 shall not be removed... Edited May 6, 2014 by jlf Link to comment Share on other sites More sharing options...
BrewManNH Posted May 6, 2014 Share Posted May 6, 2014 Try running the script through Tidy before stripping. There was an issue where lines got stripped when the code didn't have the right spacing around the variables and operators. 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...
jlf Posted May 6, 2014 Author Share Posted May 6, 2014 (edited) Jos : OK BrewManNH : exact, modified source line and it works (others problem later but will try later) My principal need is in fact having a script were the source line number matches with the "error at line number" when there is a bug in the script. Is there another way ? Edited May 6, 2014 by jlf Link to comment Share on other sites More sharing options...
Developers Jos Posted May 6, 2014 Developers Share Posted May 6, 2014 Cant look at your source, but when you have mixed /mo with any other option, it definately is a bug in the original distributed au3stripper that could cause issues. Jos 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 More sharing options...
jlf Posted May 7, 2014 Author Share Posted May 7, 2014 Hi. Compiling with latest tools (AutoIt 3.3.11.5 + SciTe 3.4.1) will not update the output file "test_stripped.au3". Source file is "test.au3" and creating an empty file "test_stripped.au3" avoid this output file being updated by AU3Stripper (all others flags are not affected). See attached 7z archive Thanks in advance for support 20140507 - stripped_not_updated.7z Link to comment Share on other sites More sharing options...
jlf Posted May 7, 2014 Author Share Posted May 7, 2014 Hi. Compiling with latest tools (AutoIt 3.3.11.5 + SciTe 3.4.1) and "/soi" switch will removed NOT useless functions. These functions are called by "OnAutoItExitRegister" and/or "TrayItemSetOnEvent", but as far I can see AU3Stripper doesn't detect these both function are really called, removed them, and then AU3Check returns errors due to this missing functions. Test-case(see attached 7z archive) include lots of (empty) functions, but I can't reduce because this will not reproduce this problem. Thanks in advance for support. 20140507 - MissingFunctions_soi.7z Link to comment Share on other sites More sharing options...
JohnOne Posted May 7, 2014 Share Posted May 7, 2014 Why don't you just put all these in the same thread? Will make it easier for the developer of the tools involved to view and respond. 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...
jlf Posted May 7, 2014 Author Share Posted May 7, 2014 Was just to simplify (i think it is two different problems, so wanted to make it easier). Mistake ? => sorry Link to comment Share on other sites More sharing options...
Developers Jos Posted May 7, 2014 Developers Share Posted May 7, 2014 (edited) Please stop creating threads and answer my last post in your original thread: Try using the current Beta version to see if that solves it! Jos the 3 topics are now merged. Edited May 7, 2014 by Jos 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 More sharing options...
jlf Posted May 7, 2014 Author Share Posted May 7, 2014 (edited) Jos : sorry about this, was thinking doing in the good way... The newest AU3Stripper I see is the 1.2.0.0 (which is already installed & used). You told me about beta script, newer that 1.2.0.0 ?! Where I can find it ? Edited May 7, 2014 by jlf Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 7, 2014 Moderators Share Posted May 7, 2014 http://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/ "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
jlf Posted May 7, 2014 Author Share Posted May 7, 2014 OK. Just tried with 1.2.0.6 (your link), and : stripped file is now updated missing function : unchanged I was just observating that these both missing functions are called through a string : TrayItemSetOnEvent("MyFunction1") and/or OnAutoItExitRegister("MyFunction2"). Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted May 7, 2014 Developers Share Posted May 7, 2014 Will have a look at your submitted reproducer to see what is happening. Jos 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 More sharing options...
Developers Solution Jos Posted May 7, 2014 Developers Solution Share Posted May 7, 2014 (edited) Uploaded v 1.2.0.7 to the Beta directory which fixes your issue when using the amount of includes like you do. Jos Edited May 7, 2014 by Jos 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 More sharing options...
jlf Posted May 7, 2014 Author Share Posted May 7, 2014 (edited) Woh, quick & efficient ! Nice job Thanks ! Edited May 7, 2014 by jlf 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