Error Message
TurnipTruck
Junior Member
974: 01-16-2007 TUE 17:11:22 Interpreter Ref Error ? Index to large
975: 01-16-2007 TUE 17:11:09 Interpreter Ref Error ? Index to large
Any idea where to start with this?
975: 01-16-2007 TUE 17:11:09 Interpreter Ref Error ? Index to large
Any idea where to start with this?
Comments
-
A good place to start would be for AMX to repair the message to read "too large".
I think that somewhere you're probably trying to reference an element that doesn't exist in an array. Like trying to pull a value from (or assign a value to) nMyVar[5] when the variable was declared as having only 4 elements... INTEGER nMyVar[3]. The problem is that you're not given any indication as to where in the code it's happening so you have to search through every array that is referenced. I've seen that happen more commonly in feedback statements that have been copy/pasted and in FOR loops more commonly than anywhere else as I can remember. -
My initial thought would be to check were you are referencing arrays with varibles. Something like:
FOR(nCOUNTER = 1;nCOUNTER<10;nCOUNTER++) SEND_COMMAND dvTP,"'!T',nBUTTON_ARRAY[nCOUNTER],'UPDATING'"
Make sure that there is no chance that nCOUNTER can be higher than LENGTH_ARRAY(nBUTTON_ARRAY).
You can start monitoring communication to other devices and see when the error occurs and then start inserting temporary send_string 0,"VARIABLE INFO'" commands to narrow down the cause (if it's not obvious).
I had similar problems with index values being 0 because I forgot to initialize variables
Jeff -
I'd try compiling with debug info turned on so that it would tell you what line number the error was occuring on. Of course if you use a lot of include files or modules you'd then have to figure out which of them the error comes from.
-
alexanbo wrote:I'd try compiling with debug info turned on so that it would tell you what line number the error was occuring on.
Could you explain that process more closely? The only debugging I've used is variable watching. -
TurnipTruck wrote:Could you explain that process more closely? The only debugging I've used is variable watching.
In compiler options, there is a "Compile with debug info" check box. I leave it on all the time ... theoretically, your compiled code is going to run more efficiently without, but in practical terms, I haven't seen a difference since Axcent days, the processors are fast enough to make it come to nothing. Code size is smaller though, so if you are really tight for memory (again, not real likely these days) you can turn it off once the kinks are worked out.
However, there are still times, even with the debug data there, that line numbers are not present on error messages, or flat out wrong. It's a good place to start though. -
After compiling with debug, where will I view any information gathered?
-
It will show up in the Diagnostics tab and will just append the line number to the end of the error message
974: 01-16-2007 TUE 17:11:22 Interpreter Ref Error ? Index to large Line XXX
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums