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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fox2.6 for DOS Invalid File Descriptor Problem 1

Status
Not open for further replies.

naishD

Programmer
Feb 23, 2010
3
0
0
GB
I support an application written in FoxPro 2.6 for DOS, that runs on a number of different Win-XP and Win-98 PC's without problem

I have recently started getting a problem on one system, where the application fails with the error 'Invalid File Descriptor'.

I have tried running under TAME, and changing memory allocation in config.fp (MEMLIMIT) and the short-cut properties but cannot correct the problem.

When the error occurs the TAME process view shows that there are 20 file handles open (not such a large number when FILES in CONFIG.SYS is set to 250), but one of the tables used by the program shows the compound index CDX open but no file handle for the DBF.

At the command prompt after the error, LIST STATUS doesn't show this DBF, yet it shows in a work area after a SET command. If I try to access the table at this point FoxPro locks up.

It appears as if Fox has 'lost' the reference to the table.
The table is not closed by the application, and if it were the CDX would be closed automatically.

The problem occurs in both the development and run-time environments.

I would appreciate any help.
 
I am not sure it will help, but instead of CONFIG.SYS it should be CONFIG.NT where you set FILES=250 (actually, I read somewhere that the maximum should be set to 225, but that is the case when you get "Too many files opened" error).
 
Sorry I was just using the generic 'CONFIG.SYS' name.

In fact, I use a specific version for the application in the advanced settings of the PIF file that runs the program.
 

Firstly, I agree with The Rambler about config.nt

Second you can disable virus checking to see if thta makes any diffeence



Thirdly please check the following:

Article ID: 108633 - Last Review: March 3, 2005 - Revision: 1.2
BUG: "Invalid File Descriptor" When Saving Read-Only Query
View products that this article applies to.
This article was previously published under Q108633
 
Hurray !!!

Many thanks cricket. The problem was indeed being caused by my anti-virus program. Once I turned it off all was well.

I use Kaspersky Internet Security 2010, and contacted them about the issue. They came back to me very quickly and advised how to turn off specific program monitoring. I applied this to NTVDM, and now I'm running fine with Internet Security turned on.

I must admit I've been caught out by anti-virus programs in the past, but this has until now been around internet communications tasks like FTP or Remote Access. This is a first where it's interferred with a straight forward application program.

Thanks once again cricket for the invaluable advice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top