It's written in Delphi 7. All the procedures are in the same unit but with different threads calling them.
I can't see the possibility of a double dispose. The problem only occurs after a seek, otherwise it works forever. It's being running for days without a seek. The crash is quite rare. It can handle over 3000 seeks sometimes without a crash, but other times it can happen after a few hundred. I may have to give up and use a common critical section around both functions. Thanks, Ross. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wu Adam Sent: Monday, 6 August 2007 6:13 To: [email protected] Subject: RE: Threading issue Hmmm, you are right... I noticed the Interlocked routine you are using is in "old interface" (newer Delphi uses var parameters with which you do not need the @), any chance that the seek procedure is located in another DLL and you are not using FastMM? Also, crashing inside memory allocation routine is likely to be caused by a previous "double free". .dlrow eht htiw thgir s'lla ,nevaeh sih ni si doG >From: "Ross Levis" <[EMAIL PROTECTED]> >Reply-To: Borland's Delphi Discussion List <[email protected]> >To: "'Borland's Delphi Discussion List'" <[email protected]> >Subject: RE: Threading issue >Date: Sun, 5 Aug 2007 18:12:39 +1200 > >The problem with that theory is that ReadBuf will not activate when >FBufferSize is 0, which it is after DeleteBuffers during a Seek. So a >WriteBuf must be executed first before a ReadBuf will do anything. >Therefore they should always be accessing different buffers. > >Thanks, >Ross. > _________________________________________________________________ 与世界各地的朋友进行交流,免费下载 Live Messenger; http://get.live.com/messenger/overview
_______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

