From my habitual lurking in the APro group, I thought of something
that may apply. An FAQ there is how to handle port closing &
re-opening, and they advise a delay (?4 ticks?) to allow the hardware
& Comport drivers to finish closing completely.
I'd try just adding a delay after the 'FCamera.Free' call and see if
it helps.
Good Luck!
Richard Atwater
On Thu, 26 Dec 2002 15:09:51 +1300, "Roy Granich" <R...@fsd-nzl.com>
wrote:
>I have searched Borlands groups but am none the wiser as to even which group
>would now address the subject. I would appreciate some direction of exactly
>where to look, or maybe even some gems of wisdom from within here.
>
>I have been thrown an App that closes very ungracefully under normal
>conditions.
>
>Very broadly, given the two lines
>
>FCamera.Free;
>FCamera := Nil
>
>if I set a break point on the first then step over the second it will close
>down as expected. Let it run normally and it is a mess.
>
>To complicate matters, this ONLY happens IF an image has been sent by modem.
>The camera(s) is active at all times and continuously saves to disk, and as
>long the image has not been transmitted via modem all is fine, even an
>unrelated message to the modem prior to closing does not cause problems.
>
>In approximatly 1 in 50 attempts it will close down correctly without the
>break point. This leads me to suspect that it not in fact the FCamera Object
>but rather something in the COM Object that is used for communications
>(forgive me in advance for swearing but I understand that it was originally
>written in VB). Maybe a timing issue, maybe holding open something.
>
>Any pointers on where to look would be greatly appreciated - even from that
>nation who don't have the foggiest of how to play cricket (isn't it supposed
>to be a gentlemens game, where each side get to win occasionally) - they
>just make every other nation look like they don't know the game exists.
>
>Regards
>
>
>Roy Granich
>