Sign in to follow this  
Followers 0
DrParko

Error line numbers??

9 posts in this topic

Hey all,

I have searched for an answer on this, but did not find an answer. Is there a way to determine which line an error from a compiled program is referring to? I get an error like the one attached, indicating line # 11593. My AutoIT script contains the following Includes:

#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <EditConstants.au3>
#include <GUIConstants.au3>
#include <Clipboard.au3>
#include "ExtMsgBox.au3"
#Include <Outlook.au3>
#Include <GuiAVI.au3>
#include <String.au3>
#include <Array.au3>
#include <File.au3>
#include <Date.au3>
#include <Misc.au3>

and the last line of code in my script is 3957.

I guess that when compiled, all if the includes are lined up with my code, but I cannot figure out how. Is there a way to make SciTE show the code lines as they would be compiled?

Any help would be greatly appreciated!!

post-30479-12700588107331_thumb.png

Share this post


Link to post
Share on other sites



A compiled script has no lines hence the return of -1


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

A compiled script has no lines hence the return of -1

Then why did it say Line 11593? Please see attachment of the error box.

Share this post


Link to post
Share on other sites

As far as I know, giving the line number from compiled must have been added in v3.4.0.0

Not sure though if there is a way to save a copy of script just before its compiled.

I know this happens when you used obfuscator but dont know an option to get it if not using it.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Not sure when this came in but in the latest version 3.3.6.0 Autoit is returning line numbers with error messages in compiled scripts. The line numbers relate to the script after any include files have been included in place. If you have used obfuscater the numbers relate to the *_obsfucated.au3 version of your script. If you are having problems with errors in a compiled script, you should compile with the StripOnly option in obfuscater you will then be able to see exactly where the problem is from the line number given in the error message.   


"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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

whatever Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Not sure though if there is a way to save a copy of script just before its compiled.

#AutoIt3Wrapper_Run_Before=<SaveCombinedSourceBackup.exe> "%scriptdir%" "%scriptfile%<.au3>" %fileversion% ...

ErrorLine = (combined source) code line - full remark/empty lines - split code lines.

(#directive's are counted as code line)

Thanks MvGulik, appreciated.

Edit: Thanks too Bowmore, I missed your post, sorry.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Turn my back for a second and along comes the dev team to make changes, curses.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Thanks MvGulik and Bowmore. I have been pulled to another project, so I have not had a chance to try this, but I will soon and get back with the results. I really appreciate the help!

Ron

Share this post


Link to post
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
Sign in to follow this  
Followers 0