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

Buffer Overflow in Memo Field

Status
Not open for further replies.

mjprust

Programmer
May 10, 2007
9
GB
Hi

I have a system written in VFP 8 which contains a number of memo fields.

Everything has been working fine until we installed on Vista machines.

We now get occasional Buffer Overflow Detected errors when the user tries to maintain a memo field.

Can anyone tell me why this is happening and if there is anything I can do to stop it.

Thanks.

Malcolm.
 
Hi Malcom,

Is this a Visual FoxPro error, or is it issued by the operating system?

Can you see which line of code is causing the error?

You say it happens when the user is maintaining a memo field. Do you mean the user is interactively typing into a control that is bound to a memo field? Or what?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Are your FPT files close to 1GB? There is a 2GB limit, but problems with locking - both manually and automatic - can start at 1GB, as locks are done within the 2GB size limit and normally are done in a virtual nonexisting file byte (VFP is tricky here), but when you reach 1GB file, locks can be done on physical bytes of the file and then lock bytes which don't belong to the locked record but other records.

You may get your FPT file down in size by SET BLOCKSIZE TO 0 and PACK MEMO.

I think I've seen what you mean with Buffer Overflow errors on Vista. That's an error about a memory management problem on the OS level, not a problem within VFP, but that can be triggered by VFP taking too much RAM for it's buffering purposes.

You should try to put SYS(3050) to something suitable. It's the buffer memory used for Cursors, Buffering, Indexing. If you do Reindexes or PACK on larger tables think of seperating these tasks to another app.

If your computers have 4 or more GB, VFP might take too much automatically, then limit it to 512 MB or whatever you need to maintain your needs.

Otherwise it simply may be a RAM problem for VISTA. 512 MB is minimum, 2GB++ are recommended. VFP can't cope with more anyway, but if there are other apps running, give the PC more RAM. And check if there are any limits for the profile's temp folder or the C Drive is low of diskspace.

Bye, Olaf.
 
Hi Mike and Olaf

Thanks for your responses.

The error is occurring when the user tries to edit data in a control that is bound to a memo field.

Unfortunately I cannot replicate the error on my system.

I have just logged on to one of my users who is experiencing the problem.

They have 978Mb of RAM.

As soon as we go to look at the memo data the following error window appears.

------------------------------------------------------------

Microsoft Visual C++ Runtime Library

Buffer Overrun detected!

Program c:\sal_Adv\shove.exe

A buffer overrun has been detected which has corrupted the programs's internal state.

The program cannot safely continue execution and must now be terminated.

------------------------------------------------------------


I have a small exe which allows me to brow each file and as soon as I opened the memo field the link to the system froze although the user was able to close down the browse.

As always any help most appreciated.

Regards, Malcolm
 
In that case it simply sounds like a corrupted FPT file. Some questions I had remain: How large is the memo file? Is it tending towards the 1 GB or even higher? Did you try to PACK MEMO?

As your little tool also freezes if you edit the memo, it's pointing toward some problem with the memo file, perhaps that single memo field contains a very large text, perhaps it's simply one byte regarding the size of that records memo text is wrong.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top