[Lazarus] Log4D weirdness

2014-12-19 Thread Mario R. Carro
Hello everyone, I've been debgging a weird problem I was having with a little app of mine. I'm using the latest stable Lazarus and FreePascal. The same project on Windows runs fine. On Linux (Debian Sid) fires an exception when running the finalization code. I narrowed the problem to the use o

Re: [Lazarus] Log4D weirdness

2014-12-27 Thread Marco van de Voort
On Fri, Dec 19, 2014 at 06:49:07PM -0300, Mario R. Carro wrote: > There's a LogLog variable that is destroyed in the finalization section > (and fails). The problem is that the TLogODSAppender created in the ctor > ends up destroyed inside the AddAppender call. This is the AddAppender code: > >

Re: [Lazarus] Log4D weirdness

2014-12-27 Thread Hans-Peter Diettrich
Am 27.12.2014 um 22:49 schrieb Marco van de Voort: On Fri, Dec 19, 2014 at 06:49:07PM -0300, Mario R. Carro wrote: There's a LogLog variable that is destroyed in the finalization section (and fails). The problem is that the TLogODSAppender created in the ctor ends up destroyed inside the AddAppe

Re: [Lazarus] Log4D weirdness

2014-12-28 Thread Marcos Douglas
On Sun, Dec 28, 2014 at 1:03 AM, Hans-Peter Diettrich wrote: > Am 27.12.2014 um 22:49 schrieb Marco van de Voort: >> >> On Fri, Dec 19, 2014 at 06:49:07PM -0300, Mario R. Carro wrote: >>> >>> There's a LogLog variable that is destroyed in the finalization section >>> (and fails). The problem is th

Re: [Lazarus] Log4D weirdness

2014-12-31 Thread Marco van de Voort
On Sun, Dec 28, 2014 at 04:03:07AM +0100, Hans-Peter Diettrich wrote: > > Like many cases, Delphi does not specify this behaviour, and in general for > > Delphi not much is known what of the implementation is intended, or what is > > coincidence. This is aggrevated by the fact that too much Delphi

Re: [Lazarus] Log4D weirdness

2014-12-31 Thread Marco van de Voort
On Sun, Dec 28, 2014 at 07:51:25PM -0200, Marcos Douglas wrote: > > Delphi. As a first try I remove the "const", in case of unexpected trouble. > > Delphi and FPC have problems with refcounting -- but I'm referring > only interfaces. > Circular references is a big problem too. This is totally new

Re: [Lazarus] Log4D weirdness

2014-12-31 Thread Marcos Douglas
On Wed, Dec 31, 2014 at 6:56 PM, Marco van de Voort wrote: > On Sun, Dec 28, 2014 at 07:51:25PM -0200, Marcos Douglas wrote: >> > Delphi. As a first try I remove the "const", in case of unexpected trouble. >> >> Delphi and FPC have problems with refcounting -- but I'm referring >> only interfaces.

Re: [Lazarus] Log4D weirdness

2015-01-01 Thread Marco van de Voort
On Thu, Jan 01, 2015 at 01:04:22AM -0200, Marcos Douglas wrote: > > > > This is totally new for me. I have used interfaces a lot, and while I had > > trouble from time to time, I haven't really encountered these. > > New? What do you mean? > This problem was talked in FPC list and here before. > I

Re: [Lazarus] Log4D weirdness

2015-01-01 Thread Marcos Douglas
On Thu, Jan 1, 2015 at 2:39 PM, Marco van de Voort wrote: > On Thu, Jan 01, 2015 at 01:04:22AM -0200, Marcos Douglas wrote: >> > >> > This is totally new for me. I have used interfaces a lot, and while I had >> > trouble from time to time, I haven't really encountered these. >> >> New? What do you

Re: [Lazarus] Log4D weirdness

2015-01-01 Thread Hans-Peter Diettrich
Am 31.12.2014 um 21:51 schrieb Marco van de Voort: Afaik the problem is that "const" as used in classic delphi is not very portable. In theory it is specified as immutable (can't be modified), but widely abused to mean "by reference". Const parameters exist for optimization, the compiler is all