#1 Re: PDF Engine » Memory leak starting rev. 179 » 2020-09-11 15:24:30

IMT

Hi everybody! Just quick update on this. We updated to Delphi 10.4.1 and tried the newest SynPDF rev 187. The test showed no memory leak as I described in the beginning. Working with PDF also didn't show any leak report. Great news for us!

The problem can be considered as 'SOLVED'

#2 Re: PDF Engine » Memory leak starting rev. 179 » 2020-03-10 13:36:46

IMT
ab wrote:

This is not very useful.

I know but this is what I've got

ab wrote:

What is the object kind?

Currently have no idea. Had no chance to locate the problem module and its finalization section.

I traced all finalizations in SynPDF and no problems are found. After it is finalized, DevExpress units start to process. Is it possible that there is some incompatibility with it? I'll try to locate the particular unit later.

ab wrote:

Please download the whole framework, not just SynPDF, and try again.
(extract only the needed units)

I checked out https://github.com/synopse/SynPDF.git/trunk
It builds successfully. Do I need something else?

#3 Re: PDF Engine » Memory leak starting rev. 179 » 2020-03-10 05:35:06

IMT

I updated to the latest rev 180, checked Synopse.inc and ran again.

This is an Exception message:

First chance exception at $5005F928. Exception class $C0000005 with message 'access violation at 0x5005f928: read of address 0x2eea7554'

This is 32 bits call stack

rtl.System.TObject.Free
rtl.System.Variants.ClearVariantTypeList
rtl.System.Variants.Finalization
rtl.System.FinalizeUnits
rtl.System._Halt0
:500619a9 @Halt0 + $B1
:75b16a14 KERNEL32.BaseThreadInitThunk + 0x24
:775badcf ntdll.RtlInitializeExceptionChain + 0x8f
:775bad9a ntdll.RtlInitializeExceptionChain + 0x5a

This is where I actually stopped:

procedure TObject.Free;
begin
// under ARC, this method isn't actually called since the compiler translates
// the call to be a mere nil assignment to the instance variable, which then calls _InstClear
{$IFNDEF AUTOREFCOUNT}
  if Self <> nil then
    Destroy; <<< HERE
{$ENDIF}
end;

I set the breakpoint in System.FinalizeUnits() and saw that all our BPLs were successfully finalized. It seems like this error belongs to the main module finalization.

Another important note: I deleted all BPLs, there is nothing to load/unload and it starts to finalize successfully. I built the BPL contains SynPdf, ran the project and got this error.

#4 Re: PDF Engine » Memory leak starting rev. 179 » 2020-03-10 05:02:13

IMT
ab wrote:

Are you sure you did upgrade all files, including Synopse.inc ?

Please check that the Synopse.inc actually compiled includes the USERECORDWITHMETHODS conditional.

Thanks, I'll check. Synopse.inc is the part of the repository, so I pretty sure that it was updated.

#5 Re: PDF Engine » Memory leak starting rev. 179 » 2020-03-09 19:42:12

IMT

Today I tried to reproduce this situation with rev. 180 and simple project but no luck. Our main project consists of several BPLs and SynPdf is included into one of them. I had some time to try switching to 180 again, confirm the situation and revert back to 178 as a result. If I have possibility, I'll make the sample project.

#6 PDF Engine » Memory leak starting rev. 179 » 2020-03-07 06:07:18

IMT
Replies: 9

Hi! Thank you for doing such a great product, we love it from the very start. Last week https://github.com/synopse/SynPDF.git/trunk was updated to rev. 179 and there is a finalization access violation leading to the memory leak. No need to perform any actions to reproduce, just build with FastMM, start the application and close it. Current version of trunk is 180. Only rollback to 178 saves the situation. Hope this information is useful for fixing.

Board footer

Powered by FluxBB