Re: [Lazarus] Leakview+lazarus 0.9.26+WinXP

2008-12-12 Thread Raistware
dmitry boyarintsev escribió:
 The solution is even simplier: heaptrc doesn't handle quoted
 parameters correctly.
 You can solve the problem by specifying file log parameter WITHOUT quotes, 
 i.e.:
 C:\  set HEAPTRC=log=myheap.log
 C:\  application.exe

   
Thanks you a lot, exactly without the quotes it works like a charm.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leakview+lazarus 0.9.26+WinXP

2008-12-11 Thread dmitry boyarintsev
Seems like some bug with file access.

As a temporary solution you can specify the heaptrc output at the
run-time, rather than using environment variable.

if you're using Lazarus projects you can do it in the following way:
* remove Linking option Use heaptrc unit (-gh). You'll use the unit manually.
* Open your projects source (Project-Source) add 'heaptrc' to your
uses section.
* Add SetHeapTraceOutput(outputfilename) call as the first line of the
program. After your application is closed, the specified file, will be
filled with debug data.
* do NOT SET envirnoment variable. Run the application.

It's also good to delete the file, otherwise information will be
appended to the file, and leakview might double-read the leaks

program test;

{$mode objfpc}{$H+}

uses
  heaptrc, {1 heaptrc must be used}
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms
  { you can add units after this }, mainform, SysUtils, LResources;

{$IFDEF WINDOWS}{$R test.rc}{$ENDIF}

begin
  // this is optional file cleaning, uncomment next line to delete the file
  // if FileExists('test.txt') then DeleteFile('test.txt');
  SetHeapTraceOutput('test.txt');
  {$I test.lrs}
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Leakview+lazarus 0.9.26+WinXP

2008-12-11 Thread dmitry boyarintsev
The solution is even simplier: heaptrc doesn't handle quoted
parameters correctly.
You can solve the problem by specifying file log parameter WITHOUT quotes, i.e.:
C:\  set HEAPTRC=log=myheap.log
C:\  application.exe
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus