Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
\\\ALERT/// Random calc/printing problem VFP9/8
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
\\\ALERT/// Random calc/printing problem VFP9/8
Miscellaneous
Thread ID:
01290588
Message ID:
01290588
Views:
86
Recently I posted a problem with random calculation and printing bug in VFP8/9 with one of my inventory apps. It would give strange results about every tenth time for some customers. But never happened on any of my PCs.

OK. I think I have resolved the problem. It has to do with VFP8/9 memory handling. One of my customers has two PC's: one with 384KB RAM memory (no problem) and the other with 1.25GB (YES random problems). The app has quite a bit of memory variables, public and private, and quite a bit of string handling and various complicated functions. Note that I never had any problems on my PC's - but none of my PCs have RAM over 1GB. It seems that VFP8/9 does not manage memory properly with PCs over 1GB. The same previous version of the app used VFP5 with no problems - could it was in the < 1GB memory era.

Here is the way I resolved it. I put the following code at beginning of my program:

SYS(3050, 1, Min(536870912,VAL(SYS(3050, 1, 0))))
SYS(3050, 2, Min(536870912,VAL(SYS(3050, 1, 0))))

That limits VFP buffer memory to lesser of available and 1/2 GB.

My one 1GB PC had no problems and its VFP had about 0.75 available memory, so I put it at 1/2 GB max to be safe.
-----------------------------------------------------------------
Paul Lee ........... Abri Technologies ......... http://abri.com/
'Recover' - top rated FoxPro/dBase file repair utility.
Next
Reply
Map
View

Click here to load this message in the networking platform