Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validatemetatable

Status
Not open for further replies.

doton

Programmer
Feb 27, 2019
14
MX
I am generating the .exe version and now get the error "Invalid subscript reference". Yesterday no problem, now doesnt work.
The program doesnt even start,
the apperror file shows
*********************************************
Error # 31
Program validatemetatable
Message La referencia al subíndice no es válida.
Line # 74
Session 1
DiskSpc **********
Screen 768 by 1366
OS Windows 6.02
Vers(1) Visual FoxPro 09.00.0000.5815 Biblioteca de soporte de EXE para Windows [Oct 15 2007 09:16:00] Id. de producto
Vers(2) 0
Vers(3) 34
SMode 4
(1016) 1319.0469 user object memory used
(1001) 1048576 pool available memory
CPU Pentium
Video Color/Color

==================================================
Calling Chain:

C:\FOXAHORRO\AHORRO.EXE
PROCEDURE APP_APPLICATION.SHOW C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\WIZARDS\_FRAMEWK.VCT
PROCEDURE APP_APPLICATION.VALIDATEMETATABLE C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\WIZARDS\_FRAMEWK.VCT[/color]
PROCEDURE APP_APPLICATION.ERROR C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\WIZARDS\_FRAMEWK.VCT
PROCEDURE APP_APPLICATION.CUSERROR.HANDLE C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\FFC\_APP.VCT
PROCEDURE APP_APPLICATION.CUSERROR.LOGERRORREPORT C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\FFC\_APP.VCT
PROCEDURE APP_APPLICATION.CUSERROR.FILLLOGRECORD C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\FFC\_APP.VCT
==================================================

==================================================
CONFIG file: C:\FOXAHORRO\CONFIG.FPW
==================================================
* CONFIG.FPW for C:\FOXAHORRO\TRANSFERDATA.PJX

* This file is a generated, framework-enabling component
* created by APPBUILDER
* (c) Microsoft Corporation

*********

I havent got the program, It is fox internal
 
Invalid subscript reference usually refers to something that you maybe thought was a function call, but VFP thinks is a reference to an array element

Or maybe a private variable that hasn't been initiated?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Can you show us the code for Program validatemetatable?
We need to see line 74 and it's environs...

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
I havent got the program, It is fox internal
 
I havent got the program, It is fox internal

Are you sure about that? You said that you had just generated the EXE. I'm not sure how you did that without the original program? (Or do you mean that you only have the compiled program, that is, the FXP, rather than the source, the PRG?)

And if you don't have the source, you are not going to be able to amend the program to fix the error.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
The line in question is
Code:
DIME laKeys[TAGCOUNT()]

Seems you copied some DBF without also copying the CDX.

Chriss
 
I havent copy any files. Th system was ok yesterday, just changed a line and compiled, the data is exactky the same same. Its got to be internal.
 
Well, the only explanation for the error is TGCOUNT() returns 0, you can't dimension an array to 0 elements.
And TAGCOUNT() only is zero, when there is no index tag in the CDX or the whole CX is missing, that would be the most common error people do, when thinking of a table as a DBF file.

No worry, I believe you didn't wanted to harm the whole system, but the point is some dbf is missing its indexes. If you only have a dbf in the project and include it, the cdx isn't internal.


Chriss
 
I got the following message:
[URL unfurl="true"]https://res.cloudinary.com/engineering-com/raw/upload/v1634050877/tips/Doc18_tqyzax.docx[/url]

and this is the start of apperror.fpt


...
Error # 31
Program validatemetatable
Message La referencia al subíndice no es válida.
Line # 74
Session 1
DiskSpc **********
Screen 768 by 1366
OS Windows 6.02
Vers(1) Visual FoxPro 09.00.0000.5815 Biblioteca de soporte de EXE para Windows [Oct 15 2007 09:16:00] Id. de producto
Vers(2) 0
Vers(3) 34
SMode 4
(1016) 1318.9492 user object memory used
(1001) 1048576 pool available memory
CPU Pentium
Video Color/Color

==================================================
Calling Chain:

C:\POC\MATRIZ\AHORRO.EXE
PROCEDURE APP_APPLICATION.SHOW C:\POC\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\WIZARDS\_FRAMEWK.VCT
PROCEDURE APP_APPLICATION.VALIDATEMETATABLE C:\POC\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\WIZARDS\_FRAMEWK.VCT
PROCEDURE APP_APPLICATION.ERROR C:\POC\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\WIZARDS\_FRAMEWK.VCT
PROCEDURE APP_APPLICATION.CUSERROR.HANDLE C:\POC\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\FFC\_APP.VCT
PROCEDURE APP_APPLICATION.CUSERROR.LOGERRORREPORT C:\POC\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\FFC\_APP.VCT
PROCEDURE APP_APPLICATION.CUSERROR.FILLLOGRECORD C:\POC\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 7\FFC\_APP.VCT
==================================================

==================================================
CONFIG file: C:\POC\MATRIZ\CONFIG.FPW
==================================================
* CONFIG.FPW for C:\FOXAHORRO\TRANSFERDATA.PJX
...


And the final part is

....

M_SUCURSALNAME
Púb C " "
CMBTITLE Priv C "Sistema de Ahorro y Prestamo" sistemadeahorr_app
CMBTITLEW Priv C "Sistema de Ahorro y Prestamo" sistemadeahorr_app
M_TESTMODEFORDTN
Priv L .F. sistemadeahorr_app
LCLASTSETTALK
Local C "OFF" sistemadeahorr_app
LLAPPRAN Local L .F. sistemadeahorr_app
LLSUCCESS Local L .T. show
TCTABLE Local L .F. validatemetatable
TLOMITFEEDBACK
Local L .F. validatemetatable
LCTABLE Local C "sistemadeahorr_app" validatemetatable
LCMESSAGE Local L .F. validatemetatable
LCALIAS Local C "M_6600L3QJ9" validatemetatable
LISELECT Local N 1 ( 1.00000000) validatemetatable
LLRETURN Local L .T. validatemetatable
LITAGCOUNT Local L .F. validatemetatable
LAREQUIRED Local A validatemetatable
( 1) C "DOC_OPEN"
( 2) C "DOC_NEW"
( 3) C "DOC_DESCR"
( 4) C "DOC_TYPE"
( 5) C "DELETED()"
LAKEYS Local A validatemetatable
( 1) L .F.
LIFOUND Local L .F. validatemetatable
LLEXACTOFF Local L .T. validatemetatable
NERROR Local N 31 ( 31.00000000) error
CMETHOD Local C "validatemetatable" error
NLINE Local N 74 ( 74.00000000) error
TIERROR Local N 31 ( 31.00000000) handle
TCMETHOD Local C "validatemetatable" handle
TILINE Local N 74 ( 74.00000000) handle
LCMESSAGE Local C ""La referencia al subíndice no es válida."
(
31)
validatemetatable, 74
C:\POC\MATRIZ\AHORRO
.EXE" logerrorreport
LCERRDATA Local C "C:\USERS\DAVID\APPDATA\LOCAL\TEMP\35450683.tm
p" filllogrecord
LIERRLEVEL Local N 8 ( 8.00000000) filllogrecord
LISELECT Local N 1 ( 1.00000000) filllogrecord
LISESSION Local N 1 ( 1.00000000) filllogrecord
LIFORMSESSION
Local N 1 ( 1.00000000) filllogrecord
2415 variables definidas, 18684 bytes usados
7610 variables disponibles

 
The problem is clear.

the data is exactky the same same. Its got to be internal.

The data is missing a CDX. If you include thee metadata into the exe, you only include the dbf and not the cdx.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top