Welcome, Guest
Username: Password: Remember me
Components and Libraries for Database Development, discussions, problems and suggestions
  • Page:
  • 1
  • 2

TOPIC:

ZeOS DBO with PostgreSQL memory leak :( 8 years 1 month ago #9108

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Good morning @Javor

ALL are OK
on Windows 10 Pro Typhon64
and on Fedora 23 Typhon64

I make some small changes to test project
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

ZeOS DBO with PostgreSQL memory leak :( 8 years 1 month ago #9109

  • Michael Hiergeist
  • Michael Hiergeist's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 24
  • Thank you received: 7
Looks great, Sir.

Now did check your changes. Some like dynloading the SQLite dll are unknown to me.
Apart from this:

Sir i've noticed you commented out the heaptrc unit. May i ask why? Is there a known issue?
In addition some questions:
I've commented the heaptrc unit too in the Zeos-Test suites which we're using by default. The tests do run no leak reported. OK for my first impression.
Note the ZTestall.Exe is a console app which runs with TGUITestRunner and TTestRunner optional. (ZTestall -b runs the console output if -b is not set the GUI testrunner cames to shove)

Now i've simply added a
var
MyPointer: Pointer and Called a GetMem(MyPointer, 1024) on startup ... no leak reported. Not very helpful.
So i don't feel ready here. I just want to know how to trace possible leaks with a console app and commenting the heaptrc unit?

Please Log in or Create an account to join the conversation.

ZeOS DBO with PostgreSQL memory leak :( 8 years 1 month ago #9110

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Sir
console app or not, my suggestion is to use project debug options



"heaptrc" procedure is Typhon-IDE debugging procedure, NOT project procedure.

If you make "heaptrc" part of your project, you must know and the CT debugging working model
and this is NOT simple...
PilotLogic Architect and Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

ZeOS DBO with PostgreSQL memory leak :( 8 years 1 month ago #9111

  • Michael Hiergeist
  • Michael Hiergeist's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 24
  • Thank you received: 7
Thanks Sir!
I'm glad to anaunce with the comming CT5.7 all leaks are gone:

Heap dump by heaptrc unit
8966285 memory blocks allocated : 56353887/82534432
8966284 memory blocks freed : 56352863/82533408
1 unfreed memory blocks : 1024
True heap size : 1245184
True free heap : 1243872
Should be : 1244096
Call trace for block $07E7DBF8 size 1024
$00442D0E
$0044315C
$00451234
$00452FA6
$007D3189 ZTESTBUGCOMPCORE_$$_init, line 1906 of D:/Developer/Delphi XE/Components/ZEOS/test/bugreport/ZTestBugCompCore.pas
$00410D14

Just my added 1024 bytes to proof leaks. :) :)
So i'll change the project options. Suppress the heaptrc unit for FPC >=3 with a define. Even if it's not clear for me to understand the differences..

However, thank you very much for your time! This was a helphuf FPC lesson for me.
Now i'll switch to CT5.6 on a VM again and check if the Leaks do return again.

Please Log in or Create an account to join the conversation.

ZeOS DBO with PostgreSQL memory leak :( 8 years 1 month ago #9112

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Have fun Sir
always we are here for help and thanks for your excellent work :)

Again for us, ZEOS is Extreme Important library
PilotLogic Architect and Core Programmer
The following user(s) said Thank You: Michael Hiergeist

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

ZeOS DBO with PostgreSQL memory leak :( 8 years 1 month ago #9113

  • Michael Hiergeist
  • Michael Hiergeist's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 24
  • Thank you received: 7
Same to you and the whole CT Team. Thanks again. For me CT is the most importent FPC IDE.

Have fun guys! Be patient waiting for official released CT5.7 :kiss:

Please Log in or Create an account to join the conversation.

ZeOS DBO with PostgreSQL memory leak :( 8 years 1 month ago #9114

  • Michael Hiergeist
  • Michael Hiergeist's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 24
  • Thank you received: 7
Hello sir, after trying to run deep tests with recreating my database.. i'm in new trouble with the System.SetString of FPC.

Now i made a very little sample project because with this FPC RawByteString concatations seems to be broken if the concat string is initialized by System.SetString.
May i ask if you're able to successfully run my little template app and the CT57 FPC?

Looks to me like next ticket for the FPC bugtracker.. But is not a unresolvable issue like the mem-leaks. This issue i've resolved by a define.

So guys again: Have fun with upcomming CT5.7 Zeos can be used like a stable candidate.
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Michael Hiergeist.
  • Page:
  • 1
  • 2