The problem is only when the CriticalSection Enter/Leave is called from a callback of a windows thread such as DirectShow Grabber or VFW frame callback or a media timer callback. In all other cases TCriticalSection works fine. This is issue under Delphi. I have not confirmed if it exists under Lazarus yet, as I have just started to port to Lazarus.
To reproduce the bug in Delphi if you wish, start a media timer, and in the callback function call a Pascal calling convention function. It can be an empty body procedure as example. Run it for about 1H. Suddenly Delphi will stop and will report stack corruption. Change the procedure to be "cdecl", and it will run forever.
I state again, we are not at the point when we are running our code for hours under Lazarus. Once we are there I will report if the problem appears.
With best regards,
Boian Mitov
-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------
Earlier message 17 lines
----- Original Message -----
From: "Luca Olivetti"
To: "General mailing list"
Sent: Monday, June 23, 2008 12:30 AM
Subject: Re: [Lazarus] Anyone using LCLIntf critical section routines?
I don't get you here: I'm using SyncObjs.TCriticalSection under windows
(and linux) and I see no problem. I don't remember if I used it with
delphi though.
Bye
--
Luca Olivetti
Wetron Automatizaci?n S.A.
http://www.wetron.es/
Tel. +34 93 5883004 Fax +34 93 5883007