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

Strange error 1

SitesMasstec

Programmer
Joined
Sep 26, 2010
Messages
574
Location
Brasil
Dear colleagues:

Sometimes I got an error when running VFP programs, in the development environment.

When this happens I write these lines in the command window:
Code:
CANCEL
CLOSE DATABESES
CLEAR ALL
SET VIEW TO VFPlimpo    && The first time I opened VFP, I write the command CREATE VIEW VFPlimpo

After the above commands, I make corrections in the program I was running, and run it again.
Sometimes and error appear (just sometimes):
Readint.prg doesn't exist.
and if I ignore the error, I got Writeint.prg doesn't exist.
When this occur, I have to close VFP through Windows Task Manager, and initiate VFP again.

Please note that Readint.prg and Writeint.prg are programs I have never saved.

Thank you.
 
Looking for references of any routines, methods, functions called ReadInt and WriteInt I find they are contained in Christian Ehlscheidts vfp2c32 FLL.

If SET('LIBRARY') does not contain that FLL you'll get this error, as VFP won't know from code calling these FLL functions whether they are FLL functions, or PRGs. Not finding the functions, the error trigerred will report it doesn't find these as PRGs.

Whatever you use that makes use of the vfp2c32 FLL isn't finding it and not self initializing itself after a VFP restart and then fails on that dependency. Well, it's hard to say what you use that has that dependency. And this conclusion may not even be right, as such functions could be defined in any other tools you may use in your development, too.

So the only conclusion I can give you at hand is that this error is not telling you that REdint.prg or Writeint.prg exists, when something is called it can be a function of a DLL, FLL or a PRG, not only a PRG. So you could also be missing some other FLL or DLL that has these functions or actually prgs.

What you can do is use code references to find SET LIBRARY calls and DECLARE calls that could define to VFP to use some FLL or DLL and then look further into it.

As you say this problem occurs within the IDE and you may not have any project open when it happens, then it could be part of any extension you use for the IDE and didn't restart yet. Any part of an application framework loading into VFP when you start it or the VFP IDE extension Thor, for example.

What you should not do is CLEAR ALL. If you start VFP new, anything that loads at start and requires declarations, fLL libraries, any classes (vcx), too, to add to the IDE with additional menu items, assistants (builders and wizards) that depends on DECLARES, SET LIBRARY or also SET CLASSLIB, SET PROCEDURE to add to the native functionalities you remove with CLEAR ALL.

When you restart VFP you already did more than CLEAR ALL and there's no reason to do that. It's what you can use when you had a crash but are still in the IDE and could recover from a bad state. But usally even in such cases quitting VFP and restarting it puts the IDE in a cleaner state than anything else can.
 
Last edited:
Hello!

Chriss: as I had issued CLEAR ALL before the error appeared, according to what you have said above, it may have caused VFP to miss VFP2C32.FLL (ctl32_vfp2c32.prg is in my project and has reference to VFP2C32.FLL)!

So, from now on, I will not use CLEAR ALL anymore.

Thank you.
 
Well, I have to move back a bit from that, as even CLEAR ALL EXTENDED does not remove anything from SET('LIBRARY').

Anyway, CLEAR ALL is a repair tool when you're in an IDE that crashed from an error, it can do more harm than good, though, after an IDE restart. Even when CLEAR ALL helps instead of doing a restart, you will have lost some SET PROCEDURE, SET CLASSLIB and other things, so after a CLEAR ALL you need to reinitialize anything that you need during your session in the IDE.

CLEAR ALL is not interfereing with FLLs, something else has to have happened. For example you don't have a start routine that SETs LIBRARY to the VFP2C32.FLL (likely done by the ctl32_vfp2c32.prg), so right after a restart of VFP one of the first things you should be doing is that prg to let all code work that relies on that FLL.
 
Chriss:

So, when that error appears, the best thing to do is to quit VFP using Windows Task Manager.

I think other option is, after CLEAR ALL, to close the Project and open it again, so VFP will setup VFP2C32.FLL again... I can try this when the error occurs again.

Thank you.
 

Part and Inventory Search

Sponsor

Back
Top