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

Error reading file message but from WIndows

Status
Not open for further replies.

andrewlee

Programmer
May 28, 2000
31
NZ
Recently our users have reported 'Error Reading File' messages from our VFP9 Application. Strangely, these appear to be from Windows, not VFP. There is no mention of error code 1104.
Error messages come in a Windows error box headed "Program Error". Example text: Error reading file l:\custom\cmclassaliases.vct where cmclassaliases.vct is included in the exe. Program freezes and user has to crash out.
Similar read errors occur for other components in the exe : screens, procedure files etc yet users can log on OK. On only one occasion a data file was involved. One user who reported these problems does not use Citrix / TS.
It may be related somehow to multiple users as one client reported that one sole user had a 6 hour session with no problems.
Any help appreciated
Cheers
Andy From New Zealand

 
Hi Andy,

First, you say the message appears to come from Windows. I doubt if that's the case. The fact that there is no mention of error code 1104 doesn't mean that it is not a VFP message. What you describe sounds like a messagebox produced by a VFP error-handler rather than a native Windows message. (It's true that the standard message for error 1104 is "The operating system returned an error while Visual FoxPro was attempting to read the specified file", but nevertheless it is not the operating system that is displaying the error message.)

However, that's not really relevant to the actual problem.

You also say that the message gives the filename as, for example, l:\custom\cmclassaliases.vct. That would suggest that the file in question is not embedded in the EXE, as you would expect. If that was not so, why would it show the path to the file? Is it possible that the VCTs and similar files are free-standing files? And, if so, why?

Regarding your point that it might be connected with multiple users, the easiest way to verify that would be to give each user their own copy of the application, and to see if the problem goes away (they would still have shared access to the data, of course). Giving users private copies of the executable files will also improve overall performance.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi Mike

Thanks for the reply.

Re the file path : Interestingly, the drive letter is the local user's mapped drive and the path is the original path on my development machine where the class resides.

As I understand it, the project ( ergo the exe ) retains a relative path to the original file if that component is a class.

Where it's a compiled program, it retains the path to the temp folder of the development machine where the prg was compiled.

This is reflected in other File Read Errors e.g. where a procedure file cannot be read from the exe, the path shown is my own temp folder.

I guess the error message mechanism picks up the path info from the data in the exe although it's not relevant and possibly misleading.

In all cases the files that cannot be read are contained in the exe which is what makes it so weird.

Anyway, I shall try your good suggestion of distributing a copy of the exe to each user's machine.

Thanks Mike

Cheers
Andy

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top