Page 1 of 1

Leak Using rvActionOpen

Posted: Thu Dec 07, 2023 7:53 pm
by standay
Sergey,

I'm still using rve version 21.7.3. When using an rvActionOpen to open a Word docx file, it opens OK, but I'm getting a leak reported by madexcept in TRVCPInfo (see attached screenshot) when I close the app. This seems to only happen with Word files, but I haven't tried it with every possible file type. Seems to be OK using a text or rvf file. Just docx files are causing the leak whether I open them or drag and drop them in.

I used the ActionTestUni demo to make sure it wasn't something I introduced in the code.

Thanks Sergey

Stan

Image8.png
Image8.png (86.7 KiB) Viewed 150603 times

Re: Leak Using rvActionOpen

Posted: Fri Dec 08, 2023 8:28 am
by Sergey Tkachenko
Can you send me a DocX file where it happens?

Re: Leak Using rvActionOpen

Posted: Fri Dec 08, 2023 10:59 am
by standay
Sergey Tkachenko wrote: Fri Dec 08, 2023 8:28 am Can you send me a DocX file where it happens?
Hi Sergey,

I sent one to the richview gmail account.

Stan

Re: Leak Using rvActionOpen

Posted: Sat Dec 16, 2023 11:42 am
by standay
Sergey, Here's a typical docx file I had trouble with:
Hyperthyroidism.docx
(15.98 KiB) Downloaded 7091 times

Re: Leak Using rvActionOpen

Posted: Sun Dec 17, 2023 6:23 pm
by Sergey Tkachenko
I confirm the problem.

Quick fix (VCL/LCL version):

Open RVRTFProps.pas
Change the code starting from the line 2764 from

Code: Select all

      if (InsertPoint > 0) and item.SameAsPrev and (item.StyleNo >= 0) and
        (CurrentRVData.GetItemStyle(InsertPoint - 1)= item.StyleNo)
       then
to

Code: Select all

      if (InsertPoint > 0) and item.SameAsPrev and (item.StyleNo >= 0) and
        (CurrentRVData.GetItemStyle(InsertPoint - 1) = item.StyleNo) and
        (item.Checkpoint = nil) then

Re: Leak Using rvActionOpen

Posted: Sun Dec 17, 2023 7:00 pm
by standay
Thanks Sergey, that seems to have fixed it!

Stan

Re: Leak Using rvActionOpen

Posted: Sat Dec 30, 2023 7:25 pm
by Sergey Tkachenko
The fix is included in TRichView 22.1.1 (currently available only for registered users)

Re: Leak Using rvActionOpen

Posted: Sat Dec 30, 2023 7:46 pm
by standay
Thanks Sergey. You probably mean it's in 22.1.1?

Stan

Re: Leak Using rvActionOpen

Posted: Sat Dec 30, 2023 8:14 pm
by Sergey Tkachenko
Yes, you are right. I corrected it.