Delphi Out of memory

0

Hello,

I have my application working smoothly in Delphi XE2 with BDE with PostgreSQL databse.
Now, it has been migrated to latest Delphi 10.2 update 3 with PostgreSQL database only.

This application is kept running continuously on the system 24*7*365. In a week or so, "Out of memory" error is displayed.

Earlier BDE was used which is replaced by FireDAC in this version. Windows socket has been replaced with INDY components.

Working of application is:

There are live instruments connected to the application, via UDP packets INDY receives data and on timer data is saved in the database.
Basically read methods of 3 INDY components are called again and again and timer in one minute to save this data.
INI files are created, read and freed on every read method.

It works fine for almost 8 days and after that it displays a message. The problem is, we cannot reproduce it on our end.
It needs live environment.
I tried with Fastmm4 and other tools. We have no leaks in our application as such.

Please suggest.

  • Accepted Answer

    Monday, April 16 2018, 10:53 PM - #Permalink
    0

    Yes, that can be one thing. But before having Indy, we were using windows socket.
    It was separate ocx file done deriving from TOleControl. But there was same issue.

    Only change now is BDE replacement with Firedac and Delphi latest version.

    The reply is currently minimized Show
  • Responses (3)
    • Accepted Answer

      Wednesday, April 18 2018, 11:31 AM - #Permalink
      0

      Working on the problem I've found that the problem is worst when compiling for Win64 target.

      Got to compile for C++ generating .LIB and .a for linking my programs.

      For Win32 target the memory leak was gone but for Win64 the problem remains.

       

      The reply is currently minimized Show
    • Accepted Answer

      Monday, April 16 2018, 10:54 PM - #Permalink
      0

      Yes, that can be one thing. But before having Indy, we were using windows socket.
      It was separate ocx file done deriving from TOleControl. But there was same issue.

      Only change now is BDE replacement with Firedac and Delphi latest version.

       

       

      The reply is currently minimized Show
    • Accepted Answer

      Saturday, April 14 2018, 05:26 AM - #Permalink
      0

      Hi

      I'm facing the same problem going from XE6 to 10.2.

      It seems that Indy has some "intentional" memory leaks.

      I found this link: https://forum.lazarus.freepascal.org/index.php?topic=14556.0

      I'm trying to find how to recompile Indy for Delphi and C++ after making the change. Hard to find.

      Hoping to help and maybe finding the solution together.

       

      Regards

      The reply is currently minimized Show
    Your Reply

    Please login to post a reply