Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-12 Thread Marcos Douglas B. Santos
On Wed, May 9, 2018 at 10:48 AM, Michael Van Canneyt
 wrote:
>
>
> On Wed, 9 May 2018, Marcos Douglas B. Santos wrote:
>
 OK sorry for didn't find this bugreport.
 Is this fix in fixes_3_0 ?
>>>
>>>
>>>
>>> I do not know, presumably not.
>>
>>
>> For "new things" I use to use the last version published, just to see
>> that works.
>> Then, I start to use fixes_3_0.
>> I supposed that any fixes in trunk must be applied in fixes, don't?
>
>
> Not necessarily. It depends on the plans for the next release.
>
>>
>> Well, if I'm wrong, could you do that to this bug?
>
>
> Marco Van de Voort usually handles this.

Just for you and others know, it already was applied in fixes_3_0.
My FPC rev is 38816.

Regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Michael Van Canneyt



On Wed, 9 May 2018, Marcos Douglas B. Santos wrote:


On Wed, May 9, 2018 at 9:31 AM, Michael Van Canneyt
 wrote:




OK sorry for didn't find this bugreport.
Is this fix in fixes_3_0 ?



I do not know, presumably not.


For "new things" I use to use the last version published, just to see
that works.
Then, I start to use fixes_3_0.
I supposed that any fixes in trunk must be applied in fixes, don't?


Not necessarily. It depends on the plans for the next release.



Well, if I'm wrong, could you do that to this bug?


Marco Van de Voort usually handles this.

Michael.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Marcos Douglas B. Santos
On Wed, May 9, 2018 at 9:31 AM, Michael Van Canneyt
 wrote:
>
>>
>> OK sorry for didn't find this bugreport.
>> Is this fix in fixes_3_0 ?
>
>
> I do not know, presumably not.

For "new things" I use to use the last version published, just to see
that works.
Then, I start to use fixes_3_0.
I supposed that any fixes in trunk must be applied in fixes, don't?

Well, if I'm wrong, could you do that to this bug?

Regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Michael Van Canneyt



On Wed, 9 May 2018, Marcos Douglas B. Santos wrote:


The memleak is present only in 3.0.4, no longer in trunk.

I remembered a similar bugreport by African Wild Dog:

https://bugs.freepascal.org/view.php?id=33535

where I had the same conclusion.


OK sorry for didn't find this bugreport.
Is this fix in fixes_3_0 ?


I do not know, presumably not.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Marcos Douglas B. Santos
On Wed, May 9, 2018 at 3:47 AM, Michael Van Canneyt
 wrote:
>
>
> On Tue, 8 May 2018, Marcos Douglas B. Santos wrote:
>
>> On Mon, May 7, 2018 at 6:05 PM, Michael Van Canneyt
>>  wrote:
>>>
>>>
>>>
>>> On Mon, 7 May 2018, Marcos Douglas B. Santos wrote:
>>>
>   Application.Run;
> end.
>
> ===END===
>
> My environment is:  Lazarus 1.8.3 r57764 FPC 3.0.4
> i386-win32-win32/win64
>
> Best regards,
> Marcos Douglas



 Michael,
 Would you want that I open a issue for it?
>>>
>>>
>>>
>>> Allow me to test first, please.
>>
>>
>> All right.
>> Let me know if you need a tester or more information.
>
>
> I tested it.
>
> The memleak is present only in 3.0.4, no longer in trunk.
>
> I remembered a similar bugreport by African Wild Dog:
>
> https://bugs.freepascal.org/view.php?id=33535
>
> where I had the same conclusion.

OK sorry for didn't find this bugreport.
Is this fix in fixes_3_0 ?


On Wed, May 9, 2018 at 4:38 AM, Michael Van Canneyt
 wrote:
>
> [...]
> Small addendum: someone reported that in the transition to the use of
> routes, the registering of modules suddenly became case sensitive.
>
> I have fixed this, they are now case insensitive, but with the option to
> make it case sensitive. Also added the option to let an empty pattern match
> all URLS. Rev. 38956

All right, thanks for the info.

Regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Michael Van Canneyt



On Wed, 9 May 2018, Michael Van Canneyt wrote:


Let me know if you need a tester or more information.


I tested it.

The memleak is present only in 3.0.4, no longer in trunk.

I remembered a similar bugreport by African Wild Dog:

https://bugs.freepascal.org/view.php?id=33535

where I had the same conclusion.


Small addendum: someone reported that in the transition to the use of
routes, the registering of modules suddenly became case sensitive.

I have fixed this, they are now case insensitive, but with the option to
make it case sensitive. Also added the option to let an empty pattern match
all URLS. Rev. 38956

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-09 Thread Michael Van Canneyt



On Tue, 8 May 2018, Marcos Douglas B. Santos wrote:


On Mon, May 7, 2018 at 6:05 PM, Michael Van Canneyt
 wrote:



On Mon, 7 May 2018, Marcos Douglas B. Santos wrote:


  Application.Run;
end.

===END===

My environment is:  Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64

Best regards,
Marcos Douglas



Michael,
Would you want that I open a issue for it?



Allow me to test first, please.


All right.
Let me know if you need a tester or more information.


I tested it.

The memleak is present only in 3.0.4, no longer in trunk.

I remembered a similar bugreport by African Wild Dog:

https://bugs.freepascal.org/view.php?id=33535

where I had the same conclusion.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-08 Thread Marcos Douglas B. Santos
On Mon, May 7, 2018 at 6:05 PM, Michael Van Canneyt
 wrote:
>
>
> On Mon, 7 May 2018, Marcos Douglas B. Santos wrote:
>
>>>   Application.Run;
>>> end.
>>>
>>> ===END===
>>>
>>> My environment is:  Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64
>>>
>>> Best regards,
>>> Marcos Douglas
>>
>>
>> Michael,
>> Would you want that I open a issue for it?
>
>
> Allow me to test first, please.

All right.
Let me know if you need a tester or more information.
Thanks for your time.

Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-07 Thread Michael Van Canneyt



On Mon, 7 May 2018, Marcos Douglas B. Santos wrote:


  Application.Run;
end.

===END===

My environment is:  Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64

Best regards,
Marcos Douglas


Michael,
Would you want that I open a issue for it?


Allow me to test first, please.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-07 Thread Marcos Douglas B. Santos
On Sun, May 6, 2018 at 5:44 PM, Marcos Douglas B. Santos  
wrote:
> On Sat, May 5, 2018 at 11:51 AM, Michael Van Canneyt
>  wrote:
>>
>>
>> On Sat, 5 May 2018, Marcos Douglas B. Santos wrote:
>>
>>> I'm using fpWeb in standalone mode (fphttpapp unit) to develop and debug.
>>> I would like to see the heaptrc log in the end, as we can do in normal
>>> desktop applications.
>>>
>>> So, in one route I create an object and don't release it to simulate a
>>> memleak.
>>>
>>> I've tried to set heaptrc.SetHeapTraceOutput('log.txt'). The app
>>> creates the file, but there is no log there.
>>
>>
>> This is definitely necessary.
>>
>>>
>>> I've tried to execute using F9 IDE and by command-line too.
>>> I think the problem is that we need to kill the server (Ctrl+C) and,
>>> because that, no log is created.
>>>
>>> So, how can I see the log?
>>
>>
>> Create a call that calls Application.Terminate.
>
> Michael,
>
> I believe there is a memleak but I couldn't found.
> I've just created a route that calls Application.Terminate and I got this:
>
> ===BEGIN===
> Heap dump by heaptrc unit
> 387 memory blocks allocated : 18658/19944
> 385 memory blocks freed : 18626/19912
> 2 unfreed memory blocks : 32
> True heap size : 196608 (96 used in System startup)
> True free heap : 196320
> Should be : 196352
> Call trace for block $034CA470 size 16
>   $0042D3C1
>   $00438926
>   $004375AA
>   $00437268
>   $004265FB
>   $BAADF00D
>   $BAADF00D
>   $BAADF00D
> Call trace for block $034CA410 size 16
>   $0042CE3B
>   $0042D3C1
>   $00438926
>   $004375AA
>   $00437268
>   $004265FB
>   $BAADF00D
>   $BAADF00D
>
> ===END===
>
>
> Here is my test program:
>
> ===BEGIN===
> program demo;
>
> {$define STANDALONE}
>
> uses
>   SysUtils,
>   httpdefs, httproute,
> {$ifdef STANDALONE}
>   fphttpapp,
> {$endif}
> {$ifdef FCGI}
>   fpfcgi,
> {$endif}
>   IniFiles;
>
> {$ifdef STANDALONE}
> procedure TerminateCallBack({%H-}ARequest: TRequest; {%H-}AResponse: 
> TResponse);
> begin
>   Application.Terminate;
> end;
>
> procedure ConfigureStandalone;
> begin
>   heaptrc.SetHeapTraceOutput('log.txt');
>   heaptrc.GlobalSkipIfNoLeaks := True;
>   heaptrc.HaltOnError := False;
>   with TIniFile.Create('demo.ini') do
>   try
> Application.Port := ReadInteger('Standalone','Port',8080);
>   finally
> Free;
>   end;
>   HTTPRouter.RegisterRoute('quit', rmAll, @TerminateCallBack, True);
> end;
> {$endif}
>
> begin
> {$ifdef STANDALONE}
>   ConfigureStandalone;
> {$endif}
>   Application.Initialize;
>   Application.Run;
> end.
>
> ===END===
>
> My environment is:  Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64
>
> Best regards,
> Marcos Douglas

Michael,
Would you want that I open a issue for it?

Regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-06 Thread Marcos Douglas B. Santos
On Sun, May 6, 2018 at 6:26 PM, Marcos Douglas B. Santos  
wrote:
> On Sun, May 6, 2018 at 6:05 PM, leledumbo via fpc-pascal
>  wrote:
>>> Create a call that calls Application.Terminate.
>>
>> I just call DumpHeap(false); instead
>
> Where is this function or method? Could you give so more information
> how is this works with heaptrc?

I saw that it's part or webutil unit... it is not the case here. But thanks.

> About my test, do you have the same memleak?

Could you please do the same test?

Regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-06 Thread Marcos Douglas B. Santos
On Sun, May 6, 2018 at 6:05 PM, leledumbo via fpc-pascal
 wrote:
>> Create a call that calls Application.Terminate.
>
> I just call DumpHeap(false); instead

Where is this function or method? Could you give so more information
how is this works with heaptrc?

About my test, do you have the same memleak?

Thanks.

Best,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-06 Thread leledumbo via fpc-pascal
> Create a call that calls Application.Terminate. 

I just call DumpHeap(false); instead



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-06 Thread Marcos Douglas B. Santos
On Sat, May 5, 2018 at 11:51 AM, Michael Van Canneyt
 wrote:
>
>
> On Sat, 5 May 2018, Marcos Douglas B. Santos wrote:
>
>> I'm using fpWeb in standalone mode (fphttpapp unit) to develop and debug.
>> I would like to see the heaptrc log in the end, as we can do in normal
>> desktop applications.
>>
>> So, in one route I create an object and don't release it to simulate a
>> memleak.
>>
>> I've tried to set heaptrc.SetHeapTraceOutput('log.txt'). The app
>> creates the file, but there is no log there.
>
>
> This is definitely necessary.
>
>>
>> I've tried to execute using F9 IDE and by command-line too.
>> I think the problem is that we need to kill the server (Ctrl+C) and,
>> because that, no log is created.
>>
>> So, how can I see the log?
>
>
> Create a call that calls Application.Terminate.

Michael,

I believe there is a memleak but I couldn't found.
I've just created a route that calls Application.Terminate and I got this:

===BEGIN===
Heap dump by heaptrc unit
387 memory blocks allocated : 18658/19944
385 memory blocks freed : 18626/19912
2 unfreed memory blocks : 32
True heap size : 196608 (96 used in System startup)
True free heap : 196320
Should be : 196352
Call trace for block $034CA470 size 16
  $0042D3C1
  $00438926
  $004375AA
  $00437268
  $004265FB
  $BAADF00D
  $BAADF00D
  $BAADF00D
Call trace for block $034CA410 size 16
  $0042CE3B
  $0042D3C1
  $00438926
  $004375AA
  $00437268
  $004265FB
  $BAADF00D
  $BAADF00D

===END===


Here is my test program:

===BEGIN===
program demo;

{$define STANDALONE}

uses
  SysUtils,
  httpdefs, httproute,
{$ifdef STANDALONE}
  fphttpapp,
{$endif}
{$ifdef FCGI}
  fpfcgi,
{$endif}
  IniFiles;

{$ifdef STANDALONE}
procedure TerminateCallBack({%H-}ARequest: TRequest; {%H-}AResponse: TResponse);
begin
  Application.Terminate;
end;

procedure ConfigureStandalone;
begin
  heaptrc.SetHeapTraceOutput('log.txt');
  heaptrc.GlobalSkipIfNoLeaks := True;
  heaptrc.HaltOnError := False;
  with TIniFile.Create('demo.ini') do
  try
Application.Port := ReadInteger('Standalone','Port',8080);
  finally
Free;
  end;
  HTTPRouter.RegisterRoute('quit', rmAll, @TerminateCallBack, True);
end;
{$endif}

begin
{$ifdef STANDALONE}
  ConfigureStandalone;
{$endif}
  Application.Initialize;
  Application.Run;
end.

===END===

My environment is:  Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64

Best regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-05 Thread Michael Van Canneyt



On Sat, 5 May 2018, Marcos Douglas B. Santos wrote:


I'm using fpWeb in standalone mode (fphttpapp unit) to develop and debug.
I would like to see the heaptrc log in the end, as we can do in normal
desktop applications.

So, in one route I create an object and don't release it to simulate a memleak.

I've tried to set heaptrc.SetHeapTraceOutput('log.txt'). The app
creates the file, but there is no log there.


This is definitely necessary.



I've tried to execute using F9 IDE and by command-line too.
I think the problem is that we need to kill the server (Ctrl+C) and,
because that, no log is created.

So, how can I see the log?


Create a call that calls Application.Terminate.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-05 Thread Marcos Douglas B. Santos
I'm using fpWeb in standalone mode (fphttpapp unit) to develop and debug.
I would like to see the heaptrc log in the end, as we can do in normal
desktop applications.

So, in one route I create an object and don't release it to simulate a memleak.

I've tried to set heaptrc.SetHeapTraceOutput('log.txt'). The app
creates the file, but there is no log there.

I've tried to execute using F9 IDE and by command-line too.
I think the problem is that we need to kill the server (Ctrl+C) and,
because that, no log is created.

So, how can I see the log?

Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64

Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal