[Lazarus] LHelp memory leak

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] LHelp memory leak

Free Pascal - Lazarus mailing list
I finally configured LHelp as a CHM help viewer in my development Lazarus.
I downloaded Marco's CHM snapshots linked here:
There are 2 updates from Andrey Sobol. I downloaded them, too.
LHelp opens correctly, although slowly for the first time. 
There is a strange flicker. First an empty window shows up, then it disappears. A little later the actual help window with contents shows.
Anyway, then it works well and the documentation itself has improved, too. Nice!

When I close LHelp, it asks if I really want to do it. Yes, I want it.
Then LHelp leaks memory. See below.
IIRC it does not leak when I start it standalone. It is caused by the IDE integration.
Andrey Sobol and everybody who develops LHelp, please use the Debug buildmode I added there some time ago. All debug flags should be on when developing code.

I tested with Linux 64-bit. IDE is built with LCL-QT5, I guess the same is used for LHelp.

Juha

---
Heap dump by heaptrc unit of /home/juha/SW/lazarus_trunk/components/chmhelp/lhelp/lhelp
2104258 memory blocks allocated : 408948350/417932920
2104238 memory blocks freed     : 408947390/417931960
20 unfreed memory blocks : 960
True heap size : 2686976
True free heap : 2681536
Should be : 2682176
Call trace for block $00007FE448ECC900 size 96
  $000000000051AEEA  PROCESSASYNCCALLQUEUE,  line 1066 of include/application.inc
  $0000000000518ABB  PROCESSMESSAGES,  line 419 of include/application.inc
  $000000000089ED50  DOLOADURI,  line 458 of chmcontentprovider.pas
  $00000000008A28FC  LOADURL,  line 1299 of chmcontentprovider.pas
  $000000000052C828  OPENURL,  line 1110 of lhelpcore.pas
  $000000000052AE5D  SERVERMESSAGE,  line 813 of lhelpcore.pas
  $00000000006F26AE  DOONTIMER,  line 179 of customtimer.pas
  $00000000006F2519  TIMER,  line 151 of customtimer.pas
  $00000000007513D1  SIGNALTIMEOUT,  line 4706 of qt5/qtobjects.pas
  $00007FE4713AFE10
  $00007FE4713B3E4B
  $00007FE4713B3E4B
  $00007FE4713B3E4B
Call trace for block $00007FE448ECBF00 size 96
  $000000000051AEEA  PROCESSASYNCCALLQUEUE,  line 1066 of include/application.inc
  $0000000000518ABB  PROCESSMESSAGES,  line 419 of include/application.inc
  $000000000089F6D9  QUEUEFILLTOC,  line 602 of chmcontentprovider.pas
  $000000000089F290  NEWCHMOPENED,  line 539 of chmcontentprovider.pas
  $00000000008DB878
  $00000000008A27E7  LOADURL,  line 1278 of chmcontentprovider.pas
  $000000000052CA58  OPENURL,  line 1137 of lhelpcore.pas
  $000000000052AE5D  SERVERMESSAGE,  line 813 of lhelpcore.pas
  $00000000006F26AE  DOONTIMER,  line 179 of customtimer.pas
  $00000000006F2519  TIMER,  line 151 of customtimer.pas
  $00000000007513D1  SIGNALTIMEOUT,  line 4706 of qt5/qtobjects.pas
  $00007FE4713AFE10
  $00007FE4713B3E4B
  $00007FE4713B3E4B
Call trace for block $00007FE4484FC600 size 32
  $000000000051AEEA  PROCESSASYNCCALLQUEUE,  line 1066 of include/application.inc
  $0000000000518ABB  PROCESSMESSAGES,  line 419 of include/application.inc
  $000000000089ED50  DOLOADURI,  line 458 of chmcontentprovider.pas
  $00000000008A28FC  LOADURL,  line 1299 of chmcontentprovider.pas
  $000000000052CA58  OPENURL,  line 1137 of lhelpcore.pas
  $000000000052AE5D  SERVERMESSAGE,  line 813 of lhelpcore.pas
  $00000000006F26AE  DOONTIMER,  line 179 of customtimer.pas
  $00000000006F2519  TIMER,  line 151 of customtimer.pas
  $00000000007513D1  SIGNALTIMEOUT,  line 4706 of qt5/qtobjects.pas
  $00007FE4713AFE10
  $00007FE4713B3E4B
  $00007FE4713AFE10
  $00007FE4713B3E4B
Call trace for block $00007FE4484FD600 size 24
  $000000000051AEEA  PROCESSASYNCCALLQUEUE,  line 1066 of include/application.inc
  $0000000000518ABB  PROCESSMESSAGES,  line 419 of include/application.inc
  $000000000089ED50  DOLOADURI,  line 458 of chmcontentprovider.pas
  $00000000008A28FC  LOADURL,  line 1299 of chmcontentprovider.pas
  $000000000052CA58  OPENURL,  line 1137 of lhelpcore.pas
  $000000000052AE5D  SERVERMESSAGE,  line 813 of lhelpcore.pas
  $00000000006F26AE  DOONTIMER,  line 179 of customtimer.pas
  $00000000006F2519  TIMER,  line 151 of customtimer.pas
  $00000000007513D1  SIGNALTIMEOUT,  line 4706 of qt5/qtobjects.pas
  $00007FE4713AFE10
  $00007FE4713B3E4B
  $00007FE4713B3E4B
  $00007FE4713AFE10
  $00007FE4713B3E4B
Call trace for block $00007FE4484FDB00 size 40
  $000000000051AEEA  PROCESSASYNCCALLQUEUE,  line 1066 of include/application.inc
  $0000000000518ABB  PROCESSMESSAGES,  line 419 of include/application.inc
  $000000000089ED50  DOLOADURI,  line 458 of chmcontentprovider.pas
  $00000000008A28FC  LOADURL,  line 1299 of chmcontentprovider.pas
  $000000000052CA58  OPENURL,  line 1137 of lhelpcore.pas
  $000000000052AE5D  SERVERMESSAGE,  line 813 of lhelpcore.pas
  $00000000006F26AE  DOONTIMER,  line 179 of customtimer.pas
  $00000000006F2519  TIMER,  line 151 of customtimer.pas
  $00000000007513D1  SIGNALTIMEOUT,  line 4706 of qt5/qtobjects.pas
  $00007FE4713AFE10
  $00007FE4713B3E4B
  $00007FE4713B3E4B
  $00007FE4713AFE10
  $00007FE4713B3E4B
Call trace for block $00007FE450058A00 size 96
  $000000000051AEEA  PROCESSASYNCCALLQUEUE,  line 1066 of include/application.inc
  $0000000000518ABB  PROCESSMESSAGES,  line 419 of include/application.inc
  $000000000089F6D9  QUEUEFILLTOC,  line 602 of chmcontentprovider.pas
  $000000000089F290  NEWCHMOPENED,  line 539 of chmcontentprovider.pas
  $00000000008DB878
  $00000000008A27E7  LOADURL,  line 1278 of chmcontentprovider.pas
  $000000000052CA58  OPENURL,  line 1137 of lhelpcore.pas
  $000000000052AE5D  SERVERMESSAGE,  line 813 of lhelpcore.pas
  $00000000006F26AE  DOONTIMER,  line 179 of customtimer.pas
  $00000000006F2519  TIMER,  line 151 of customtimer.pas
  $00000000007513D1  SIGNALTIMEOUT,  line 4706 of qt5/qtobjects.pas
  $00007FE4713AFE10
  $00007FE4713B3E4B
  $00007FE4713B3E4B
Call trace for block $00007FE4500D8780 size 96
  $000000000051AEEA  PROCESSASYNCCALLQUEUE,  line 1066 of include/application.inc
  $0000000000518ABB  PROCESSMESSAGES,  line 419 of include/application.inc
  $000000000089F6D9  QUEUEFILLTOC,  line 602 of chmcontentprovider.pas
  $000000000089F290  NEWCHMOPENED,  line 539 of chmcontentprovider.pas
  $00000000008DB878
  $00000000008A27E7  LOADURL,  line 1278 of chmcontentprovider.pas
  $000000000052CA58  OPENURL,  line 1137 of lhelpcore.pas
  $000000000052AE5D  SERVERMESSAGE,  line 813 of lhelpcore.pas
  $00000000006F26AE  DOONTIMER,  line 179 of customtimer.pas
  $00000000006F2519  TIMER,  line 151 of customtimer.pas
  $00000000007513D1  SIGNALTIMEOUT,  line 4706 of qt5/qtobjects.pas
  $00007FE4713AFE10
  $00007FE4713B3E4B
  $00007FE4713B3E4B
Call trace for block $00007FE413581100 size 32
  $000000000051AEEA  PROCESSASYNCCALLQUEUE,  line 1066 of include/application.inc
  $0000000000518ABB  PROCESSMESSAGES,  line 419 of include/application.inc
  $000000000089ED50  DOLOADURI,  line 458 of chmcontentprovider.pas
  $00000000008A28FC  LOADURL,  line 1299 of chmcontentprovider.pas
  $000000000052CA58  OPENURL,  line 1137 of lhelpcore.pas
  $000000000052AE5D  SERVERMESSAGE,  line 813 of lhelpcore.pas
  $00000000006F26AE  DOONTIMER,  line 179 of customtimer.pas
  $00000000006F2519  TIMER,  line 151 of customtimer.pas
  $00000000007513D1  SIGNALTIMEOUT,  line 4706 of qt5/qtobjects.pas
  $00007FE4713AFE10
  $00007FE4713B3E4B
  $00007FE4713B3E4B
  $00007FE4713AFE10
  $00007FE4713B3E4B
--- and so on ---


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LHelp memory leak

Free Pascal - Lazarus mailing list

Op 2021-02-15 om 12:36 schreef Juha Manninen via lazarus:

> I finally configured LHelp as a CHM help viewer in my development Lazarus.
> I downloaded Marco's CHM snapshots linked here:
> https://forum.lazarus.freepascal.org/index.php/topic,52437.0.html 
> <https://forum.lazarus.freepascal.org/index.php/topic,52437.0.html>
> There are 2 updates from Andrey Sobol. I downloaded them, too.
> LHelp opens correctly, although slowly for the first time.
> There is a strange flicker. First an empty window shows up, then it
> disappears. A little later the actual help window with contents shows.
> Anyway, then it works well and the documentation itself has improved,
> too. Nice!
>
> When I close LHelp, it asks if I really want to do it. Yes, I want it.
> Then LHelp leaks memory. See below.
> IIRC it does not leak when I start it standalone. It is caused by the
> IDE integration.
> Andrey Sobol and everybody who develops LHelp, please use the Debug
> buildmode I added there some time ago. All debug flags should be on
> when developing code.
>
> I tested with Linux 64-bit. IDE is built with LCL-QT5, I guess the
> same is used for LHelp.
>
Some memory leaks were fixed FPC side, retest with a stable branch compiler.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LHelp memory leak

Free Pascal - Lazarus mailing list
On Mon, Feb 15, 2021 at 2:16 PM Marco van de Voort via lazarus <[hidden email]> wrote:
Some memory leaks were fixed FPC side, retest with a stable branch compiler.

Ok, I was using FPC 3.2 release.
Do you mean testing with the 3.2.1 fixes branch?
BTW, people are anxiously waiting for 3.2.2 release. I hope it happens reasonably soon.

Regards,
Juha


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LHelp memory leak

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Mon, Feb 15, 2021 at 1:36 PM Juha Manninen <[hidden email]> wrote:
I downloaded Marco's CHM snapshots linked here:
There are 2 updates from Andrey Sobol. I downloaded them, too.

Now I learned they are also in Lazarus binaries SVN directory.
https://svn.freepascal.org/svn/lazarus/binaries

Juha


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LHelp memory leak

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Hello,

I have tested with FPC 3.2.1, FPC trunc and Lazarus trunc
I don`t see any leaks.

P.S. The leaks checking I have an enabled always. I spent many time for
  a fixing leaks :)
Andrey.

On 15.02.2021 14:36, Juha Manninen via lazarus wrote:

> I finally configured LHelp as a CHM help viewer in my development Lazarus.
> I downloaded Marco's CHM snapshots linked here:
> https://forum.lazarus.freepascal.org/index.php/topic,52437.0.html 
> <https://forum.lazarus.freepascal.org/index.php/topic,52437.0.html>
> There are 2 updates from Andrey Sobol. I downloaded them, too.
> LHelp opens correctly, although slowly for the first time.
> There is a strange flicker. First an empty window shows up, then it
> disappears. A little later the actual help window with contents shows.
> Anyway, then it works well and the documentation itself has improved,
> too. Nice!
>
> When I close LHelp, it asks if I really want to do it. Yes, I want it.
> Then LHelp leaks memory. See below.
> IIRC it does not leak when I start it standalone. It is caused by the
> IDE integration.
> Andrey Sobol and everybody who develops LHelp, please use the Debug
> buildmode I added there some time ago. All debug flags should be on when
> developing code.
>
> I tested with Linux 64-bit. IDE is built with LCL-QT5, I guess the same
> is used for LHelp.
>
> Juha
>


--
Andrey
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus