Sign in Join

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

Mailing lists / lazarus / 2021-02

LHelp memory leak

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Juha Manninen

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 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 ---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210215/a0e66b43/attachment.html>

Reply by email

Marco van de Voort
to Juha Manninen

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

Show quoted text 22 lines
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.

Reply by email

Juha Manninen
to Marco van de Voort

On Mon, Feb 15, 2021 at 2:16 PM Marco van de Voort via lazarus <

Show quoted text 5 lines
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210215/7d43f345/attachment-0001.html>

Reply by email

Juha Manninen
to Juha Manninen: I finally configured LHelp as a CHM help viewer in my development Lazarus. I downloaded…
PM Juha Manninen wrote
I downloaded Marco's CHM snapshots linked here: https://forum.lazarus.freepascal.org/index.php/topic,52437.0.html 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210215/ad8188fc/attachment.html>

Reply by email

Andrey Sobol
to Juha Manninen: I finally configured LHelp as a CHM help viewer in my development Lazarus. I downloaded…

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.

Juha Manninen wrote 24 lines
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

Reply by email