Jump to content

AI 3.3.6.1 compiled error line number


Recommended Posts

Hi,

Iv seen that since in updated the 3.3.6.1 that i get a line number on compiled script crashes but it dont correspond to my code , i assume it because all the includes are , well included , thus making the code much longer.

how can i use this line number returned from a compiled script ?

--------------------------- AutoIt Error --------------------------- Line 31795 (File "C:\Program Files\JDAST\JDAutoSpeedTester.exe"): Error: Subscript used with non-Array variable. --------------------------- OK ---------------------------

iv done a couple of searches but cant see anything, could some give me a pointer in the right direction please .

Many thx.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

Have you tried running the script from Scite without compiling it? Do you get an error when you run it that way? That would be the only way I can think of to fix the problem.

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 Gude
How 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

aye if only it was that simple :unsure: , na this is a case of one of my apps users who has just updated it.

I have just updated fro autoit 3.3.0.0 to 3.3.6.1 and this is the first release of my app using this version of AI, so im hopping its nothing to do with that.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

  • Moderators

31k + lines of code ( using yashields WinAPIEx.au3??? )? :unsure:

I suppose you could concat all the includes into one file then put your script at the bottom of all those concats, and debug that way. But this could be hit or miss (never tried it, and I'd certainly not do it manually ).

Personally, I'd use my own type of debugging ( dbgview.exe I generally use, but that's a lot of code ), you could use SciTe -> Tools -> Debug To Console/MsgBox, or even try stumpii's "Graphical AutoIt Debugger" ... maybe you'll find some luck there.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Or try something else ... Debug_Mini.au3

+ enable the dllcall parts & get Debugview tool.

---

mmm, probably better to give Debugview to that user together with a newly compiled version that tracks function use.

Edited by singularity

"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 ...
 

Link to comment
Share on other sites

yea i could have thought about all this and built in the debugging with such things as _DeBug management before i started over 2 years ago (on this app) really, but its a doubling/tripling of the code length and how to decide what to debug and what not to :-/

Iv looked at the compiled debugers and they are great but still show the line number + all the includes line numbers.

so what about if i could somehow count how many lines are added by the includes and subtract it, maybe i could cause a purposeful error immediately after the end of all the includes , find out what line its returning when compiled, remove the purposeful error, recompile & then subtract that number from any real errors.

p.s. yea i am using WinAPIEx.au3 :unsure:

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

well that idea dident quite work, its close but obviously things dont quite work that way :> , ahhhh all i want is the line number of my non compiled script when the compiled .exe crashes , is that sooo hard to retrieve :unsure: i mean yea so they added the crash report to .exe's with a line number to this version of AI but how do you use it ?

yea i could ask this user to install AI, send him all my user includes & my source etc etc but its all just to much to ask of a user.

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

well that idea dident quite work, its close but obviously things dont quite work that way :> ,

- what idea was that ?

- what did not work ?

ahhhh all i want is the line number of my non compiled script when the compiled .exe crashes , is that sooo hard to retrieve :unsure: i mean yea so they added the crash report to .exe's with a line number to this version of AI but how do you use it ?

Well, Yes and No. (Yes: if you prepped yourself for it, No: if not prepped for it, ergo: still possible, but with some work.

Did you noted the problem in "all i want is the line number of my non compiled script when the compiled .exe crashes" ?.

Ok, now that we got that out of the way ... IF, and only IF you have not changed your source, or have a exact copy of the source that was used to compile the compiled exe can you get the correct line number to your error in the source. But there is one thing that needs to be knows first (to be sure). You did compile it without making use of Obfuscator and or scite4autoit? (even better is to tell how you comiled the exe, and if done with scite4autoit what settings where active. ... etc, etc. I don't think you like to go that way ... neither I'm I. (someone else might, but I doubt it.)

But ... if you only need a general indication of where to look (like probably function's), you could try to compile your source with obfuscator options:

#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/cs=0 /cn=0 /cf=0 /cv=0 /sf=0 /sv=0
And than take a look at the Obfuscator created script -> (<scriptname>_Obfuscated.au3) ... and start playing around (debug fun) with the function's around the indicated position (after making a educated guess what function is the most likely candidate of course.) Edited by singularity

"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 ...
 

Link to comment
Share on other sites

  • Moderators

JackDinn,

As suggested earlier in the thread, when compiling your script, run Obfuscator using the /STRIPONLY parameter. That way the compiler uses an au3 file which has the include files included, but all unused functions, variables, comments and blank lines removed. It is saved in the same folder as the source and named YourScriptName_Obfuscated.au3. You need to add these directives to the top of your script:

#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/so

Then when the error occurs, it is easy to see which line gave the fault as it is this Obfuscated file which has been compiled - just scroll to the indicated location. The only problem we know of is that using the line continuation operator screws up the count, but apart from that it works fine. :unsure:

Of course, you need the full SciTE4AutoIt3 package, which you can download from here if you do not already use it. :>

M23

Edit: I see singularity has proposed the same solution - /STRIPONLY is shorthand for his suggested parameters. ;)

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

ok what your saying has finally sunk in Posted Image , i was missing the fact that i could get access to the obfuscated /so script , iv only ever used obfuscate in the compilation process and never realized / noticed it also outputs the non compiled script (suppose it was obvious really as it must use it to compile after) dont know how i missed that :idiot:dumb ass, lol

suddenly everything becomes a little clearer !

Think i can work with this now, many thx all of you, sorry its taken so many posts to drum it into my cognitively challenged mind ! but im sure its not the last time i ask something that i should be able to figure out myself.

Cheers all.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

Edit: I see singularity has proposed the same solution - /STRIPONLY is shorthand for his suggested parameters. :unsure:

Nope. Depending on if he used obfuscator to generate the exe in the first place. He will need to block the stripping parts (if Obf. was not used). -> "... /sf=0 /sv=0" instead of "... /sf=1 /sv=1" -> "/So"

(Just a easy way to generate a general merged source-script mind you, to get a general location.)

Edit: I see OP has seen the light. :>

Edited by singularity

"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 ...
 

Link to comment
Share on other sites

  • Moderators

singularity,

You are quite correct. :unsure:

Personally I always use:

#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0

to get reduced size variable and function names as well. You cannot mix /so with /om as the former takes precedence. :>

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

ok so a couple more questions,

using /striponly would rather not include the other 30K lines if i dont have to :-

firstly is there a better way to include a func that obfuscation dont like , in my case $ret = Call($FunctionToCall, $result) where FunctionToCall does not get included.

I could do this where FunctionToCall = UploadProgress

UploadProgress (1) ; stick at top of file somewhere
...
...
...


UploadProgress ($include=0)
if $include=1 then return

blah
blah
blah

Endfunc

But is there a better way to trick obfuscator to include it ?

second , yea it kinda works. As has been said its not exact and that could be a problem but i suppose it does point me towards the correct area / func but one of my funcs is full of array manipulation so it would be nearly impossible to tell which line was causing the problem.

I suppose i could find out the area of the problem and then re-script with debuging covering that area but is a real pity it cant point to the exact line number :unsure:

any enlightenment on this ?

Cheers all.

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

  • Moderators

JackDinn,

Some of the more exotic commands (Call, Execute, etc) will always cause problems to Obfuscator as it cannot read your mind and decide at compile-time what function names a variable might contain at run-time. Read the Obfuscator thread for more details - it seems to be a difficult point to get across given the number of times Jos has had to explain it! :>

yea it kinda works. As has been said its not exact

I have always found it to be absolutely exact - the line number matches the line number in the Obfuscated script. As I mentioned above, the only exception we have found is when the line extension operator is used:

$Var = "This is a very long line " & _
"split by the line extension operator"

Then all subsequent lines will be off by the number of lines lost when the interpreter reads that as a single line. :unsure:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

ahh, thats the last piece of the jigsaw , yea it was mentioned but when it comes to the technical names and terms i have a terrible memory. I use these things every day but if someone says something like "extension operator" I just see bleerb :unsure:

as for the forcing a func to be included, my method works fine and is no problem so that will do the job for me.

many thx for all your help here .

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

sorry , im full of questions today

i just cant find the right expression to search with Scite for the extension operator ?

tried a stringRegExp of

_\r

_\n

_\f

_\r\n

_\b

EDIT, i found :- _$

sorry , only took 2 hours, lol , ahh well :unsure:

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

Better try a other editor (notepad++ for example) for search/replace with RE's. RE's is not SciTE's strong point (at least not for the version currently included with scite4autoit3).

"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 ...
 

Link to comment
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
 Share

  • Recently Browsing   0 members

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