Re: C5 woes. How stable is VFP really?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



The files are read-only, no updates are done.

The app looks stable now after tweaking something as described in another post in this thread.

Robert.

"Paul Pedersen" <nospam@xxxxxxx> wrote in message news:uZ%23OBYBXHHA.3592@xxxxxxxxxxxxxxxxxxxxxxx
How can you be sure that "nothing" is happening to those cursors, even in
your own app? You did use them for something at one time, right? Perhaps
there's a delayed execution of something that you don't know about. I don't
know much about the internals of VFP, but such a thing wouldn't surprise me.

Are the cursors in a different datasession than the code that is running
when the timer is called? Yes, I know that shouldn't matter, but I have had
strange things happen when rapidly switching datasessions.

No, timer code and program code don't run simultaneously, in theory. But
again referring to VFP internals, there are certainly things going on behind
the scenes that you don't know about.

Yes, of course you "should" never get C5. However, ...

The timer scheme is still my chief suspect. It could be causing the problem,
even if it is logically faultless. From what you've told me, that's the only
thing that seems unusual in your code, and you are getting unusual errors.




"RobertVanGeel" <robert@xxxxxxx> wrote in message
news:OB4mZx2WHHA.4832@xxxxxxxxxxxxxxxxxxxxxxx
Thanks four your thoughts on this.

No, the files are local cursors in the local tempdir, so "scoped" to the
running application, I'm absolutely sure nothing is happening to them and
nothing is modifying these files. The timer code is cleanup code that only
gets called once the program is ready with the files.

One thing is that one of the files is the result of a query to SQL Server, I
changed that now to a create cursor / append from (the sql server cursor)
setup. Even so, also other files created with 'create cursor' experience the
problem.

Anyway, I don't think timer event code and regular program code do not run
simultaneously in the same executable unless you do something like DoEvents
or so and even then it shouldn't C5.

Robert


"Paul Pedersen" <nospam@xxxxxxx> wrote in message
news:%23rTAPB2WHHA.4252@xxxxxxxxxxxxxxxxxxxxxxx
It's been very stable for me, at least starting with VFP8. But I don't
think
I have any code that routinely runs tens of thousands of times per day.

Closing cursors in a timer event seems unusual to me. Is there a way to
track which cursors are being used, then just close them by hand when
you're
done with them? It seems to me that using a timer could conceivably
(perhaps
one time out of 10,000?) attempt to close a table that some other process
is
working on at the time That's not a risk I would take.

Think about it. It could even be some system process that you're unaware
of,
which perhaps a timer interrupts. But even if it's your program doing a
REPLACE ALL or something in a loop or similar when that timer event fires,
that might be doing it.



"RobertVanGeel" <robert@xxxxxxx> wrote in message
news:OJJHaP1WHHA.4632@xxxxxxxxxxxxxxxxxxxxxxx
I'm having these C5 crashes, on multiple machines. It occurs once in about
10.000 times a certain piece of code runs, sometimes I don't experience it
in days, sometimes multiple times per day.

Often it occurs in this code in a function called CloseTable:

lnSelect = Select(lcAliasName)
If lnSelect > 0
Use in (lnSelect) <-- this is the problematic statement
EndIf
I've reworked it in several ways, eg:
If Used(lcAliasName)
Use in (lcAliasName) <-- still this bugger
EndIf

I've gone over all the usual suspects: indices (dropped them, re-created
them, dropped them again etc.), foxuser.dbf, removed all printer drivers,
changed a switch, created my project again, completely re-created my prg
file, packed all my vcx and scx files, manually removed all compiled code
from all my project and did re-compiles etc..

The only thing special is that my code creates a lot of cursors and issues
use-again's on them. During a timer event (once in a minute) it flushes
certain cursors, trying to close them with the code in question.

Now, I can understand that crappy hardware or software can cause problems
but why does Word keep running, and Excel, and whatever other pogram
except
VFP? imho msft can't keep blaming this on VFP when all other stuff runs
all
right.

Thruth is, I've got big steaks in this application (basically my career),
I've been using foxpro since 2.5 and I'm starting to lose my faith that
this
is really a stable programming environment. I'm using VFP9sp1 on a couple
of
windows 2003 servers.

My question is: how stable is VFP really, what is your experience? I've
seen
quite a few posts here and there about these C5 errors, are we just coping
with them or are they really an exception?

Robert




.



Relevant Pages

  • Re: Problem creating 24 bit secondary buffer...
    ... > us stick with the timer. ... > stick to WAVEFORMATEX format descriptions, ... > sure who) is bound and determined to minimize latency at all costs. ... > cursors up to within a few ms of our user cursor. ...
    (microsoft.public.win32.programmer.directx.audio)
  • Timer hang clicking in Text/Edit box ! Please help !
    ... I'm getting a strange error in VFP when using a timer control. ... doesn't fire the timer event. ... To the ActiveX to fire events I set the AutoYield to .f. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: C5 woes. How stable is VFP really?
    ... know much about the internals of VFP, but such a thing wouldn't surprise me. ... Are the cursors in a different datasession than the code that is running ... No, timer code and program code don't run simultaneously, in theory. ... Closing cursors in a timer event seems unusual to me. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: C5 woes. How stable is VFP really?
    ... Closing cursors in a timer event seems unusual to me. ... lnSelect = Select ... imho msft can't keep blaming this on VFP when all other stuff runs all ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Timer Count Down
    ... Try putting a break-point inside the Timer event. ... Doug Steele, Microsoft Access MVP ... ExpiryDtm field in table Countdown when the form opens. ...
    (microsoft.public.access.formscoding)