Leak Using rvActionOpen

General TRichView support forum. Please post your questions here
Post Reply
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

Leak Using rvActionOpen

Post 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 148869 times
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Leak Using rvActionOpen

Post by Sergey Tkachenko »

Can you send me a DocX file where it happens?
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

Re: Leak Using rvActionOpen

Post 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
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

Re: Leak Using rvActionOpen

Post by standay »

Sergey, Here's a typical docx file I had trouble with:
Hyperthyroidism.docx
(15.98 KiB) Downloaded 6831 times
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Leak Using rvActionOpen

Post 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
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

Re: Leak Using rvActionOpen

Post by standay »

Thanks Sergey, that seems to have fixed it!

Stan
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Leak Using rvActionOpen

Post by Sergey Tkachenko »

The fix is included in TRichView 22.1.1 (currently available only for registered users)
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

Re: Leak Using rvActionOpen

Post by standay »

Thanks Sergey. You probably mean it's in 22.1.1?

Stan
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Leak Using rvActionOpen

Post by Sergey Tkachenko »

Yes, you are right. I corrected it.
Post Reply