Sign in to follow this  
Followers 0
DevonNullman

Trying to find error

10 posts in this topic

I am brand new to AutoIt3, I have a script that is meant to dump the NTFS $MFT (Master File Table). It compiles with no errors but when I execute the program created I get this in a dialog:

Line 21644 (File "C:\Users\Devon\Documents\MFT Project\NTFS_Sysfiles_Extracter_v1.8\MFTDump.exe");

Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.

The script source is 2482 lines, I am wondering if there is any correlation between Line 21644 and a line in the source.

Using the AutoIt Debugger (Version 0.45.0.36843), I see no window open, only this in the Output pane of the debugger:

>Running AU3Check (1.54.22.0) from:C:\Program Files (x86)\AutoIt3

+>09:08:32 AU3Check ended.rc:0

>Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\Devon\Documents\MFT Project\NTFS_Sysfiles_Extracter_v1.8\MFTDump.au3"

+>09:08:34 AutoIT3.exe ended.rc:0

Cheers,

Devon

Share this post


Link to post
Share on other sites



DevonNullman,

Your script may only have 2482 lines, but you no doubt have some include files which increase the total number considerably. :D

I take it you have tried running this from within SciTE to see if the same error pops up? ;)

If it only appears when compiled, try running Obfuscator on your script with the /mergeonly parameter - then you will get a fully merged file where the line number reflects the error line. Once you have fixed the problem, you can return to your normal Obfuscator settings. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

Run your code from scite4autoit editor, it will give the true line in the console window.

I assume you mean "Go" (F5) ?

This is what I get from that command:

>"C:Program Files (x86)AutoIt3SciTE..autoit3.exe" /ErrorStdOut "C:UsersDevonDocumentsMFT ProjectNTFS_Sysfiles_Extracter_v1.8MFTDump.au3"

>Exit code: 0 Time: 2.980

Share this post


Link to post
Share on other sites

DevonNullman,

Your script may only have 2482 lines, but you no doubt have some include files which increase the total number considerably. :D

I take it you have tried running this from within SciTE to see if the same error pops up? ;)

If it only appears when compiled, try running Obfuscator on your script with the /mergeonly parameter - then you will get a fully merged file where the line number reflects the error line. Once you have fixed the problem, you can return to your normal Obfuscator settings. :)

M23

I obfuscated the script, using /mergeonly and the line number for the error changed of course to line #26972

That line in the obfuscated code reads as follows:

$A552328035C = ''

It is declared as local - Local $A552328035C and is used in a few places as a number:

If $A552328035C = StringLen($A3F13780431) Then

$A552328035C = Number($A1333482F5A)

Else

$A552328035C += Number($A2833581254)

EndIf

So I am still completely lost, been trying to match the obfuscated code to the plain code but so far no luck.

Share this post


Link to post
Share on other sites

As far as I can see Obfuscator just has a "/striponly" option but not a "/mergeonly".


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

As far as I can see Obfuscator just has a "/striponly" option but not a "/mergeonly".

I put these 2 lines at the top of the script below "#Region"

#Autoit3Wrapper_Run_Obfuscator=y ;Run Obfuscator before compilation. default=n

#Obfuscator_Parameters= /mergeonly

Edited by DevonNullman

Share this post


Link to post
Share on other sites

DevonNullman,

That snippet of your Obfuscated file looks as if it has been properly obfuscated - /mergeonly should not convert your variables like that. I have just tested and it does not for me. :)

Perhaps you do not have the latest beta Obfuscator version with the /mergeonly code and so are doing a standard obfuscation because the new parameter is not recognised - you can download the latest version here. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

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