C5 errors are caused by memory leaks in VFP applications. Memory leaks can happen all the time. As noted on the Wiki, doing your own memory variable garbage collection is a great way of reducing them but C5s also occur for all kinds of reasons.
I’d love to make a list of them here but first I want to rant:
I just had an older app that has run for years just fine on Windows XP machines all over the place C5 at a customer location. C5 in all versions (VFP 6 through 8).
Tracing the code led me to one line that said myVar = SET(“MESSAGE”)
Surely it couldn’t be the culprit- could it? It was. I even tested it by running a single 5 line application that did a SET(“MESSAGE”).
Changing the line to myVar = “” and the application worked just fine.
Now why didn’t this error out on every machine for the past few years? It was a brand new machine (Dell). Not quite sure what to think but definitely not the way to end the weekend.
Any ideas? Anyone got one to trump that one?