Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-03

[heaptrc] no output for weblaz projects.

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Thierry B.

Hi,

I use heaptrc unit without any problem, using Lazarus project options.

Now I try fcl-web applications (curently fphttpapp) and... heaptrc does not work. I see the heap.trc file creation in the project directory, but the file in simply empty.

I wonder if it is working for someone else.

Linux 64bits Lazarus 1.6.1 fpc 3.0.1 HEAPTRC="log=heap.trc nohalt"

Reply by email

Thierry B.
to Graeme Geldenhuys
Graeme Geldenhuys wrote
add the fcl-web source path to your project

Thanks, I tried that but it still does not work. But I discovered that's because the program is never terminated gracefully. Stopping the debugger after the html page is displayed (if ran from Lazarus) or using Ctrl+C (if ran from the command line) does not fill heap.trc.

However using Application.Terminate (as explained in Lelelumbo Basic fpWeb Tutorial) does fill heap.trc (without the need to add the fcl-web path).

Reply by email

leledumbo
to Thierry B.
Show quoted text 8 lines
Thanks, I tried that but it still does not work. But I discovered that's because the program is never terminated gracefully. Stopping the debugger after the html page is displayed (if ran from Lazarus) or using Ctrl+C (if ran from the command line) does not fill heap.trc. However using Application.Terminate (as explained in Lelelumbo Basic fpWeb Tutorial) does fill heap.trc (without the need to add the fcl-web path).

Certainly. HeapTrc only does automatic writing at the end of your program, which must terminate gracefully (unit finalization section only executes that way). You can actually call DumpHeap anytime in the program flow, but that displays leaks only until that point, might be good to have an endpoint for this so you can check for leaks anytime.

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/heaptrc-no-output-for-weblaz-projects-tp5724639p5724645.html Sent from the Free Pascal - General mailing list .

Reply by email