Re: [Lazarus] Leakview+lazarus 0.9.26+WinXP
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
[Lazarus] Leakview+lazarus 0.9.26+WinXP
Hello I'm trying to use leakview at lazarus0.9.26 under WinXP (with leakview downloaded from svn) But when I try to launch the application with the environment variable set: C:\ set HEAPTRC=log=myheap.log C:\ application.exe It fails to run with this: --- Error --- Runtime error 123 at $00411F28 $00411F28 $0040FC90 --- Ok --- If I run without the environment variable it runs normally. Any advice ? ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Leakview+lazarus 0.9.26+WinXP
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
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