List index out of bounds when copying and pasting

General TRichView support forum. Please post your questions here
Post Reply
krimsoniuss
Posts: 5
Joined: Thu Apr 26, 2018 2:14 pm

List index out of bounds when copying and pasting

Post by krimsoniuss » Wed Aug 07, 2019 11:06 am

Hi,

when I paste text into a TRichviewEdit it throws a "List index out of bounds" error. I seems to depend on the length and/or contents of the text that is pasted.

Please assist....

Maikel

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

Re: List index out of bounds when copying and pasting

Post by Sergey Tkachenko » Thu Aug 08, 2019 7:02 am

Please check, maybe you process some events and the crash is in the code of these events.
If not, please give step-by-step instructions how to reproduce?

krimsoniuss
Posts: 5
Joined: Thu Apr 26, 2018 2:14 pm

Re: List index out of bounds when copying and pasting

Post by krimsoniuss » Thu Aug 08, 2019 1:02 pm

I disabled all events..... I load some text, then put the caret at the bottom and paste a large email communication history.

The error happens here:

function TCustomRVData.GetItemStyle(ItemNo: Integer): Integer;
begin
Result := GetActualStyle(GetItem(ItemNo));
end;

--> List Index Out of Bounds(251)

Maikel

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

Re: List index out of bounds when copying and pasting

Post by Sergey Tkachenko » Thu Aug 08, 2019 3:56 pm

Can you reproduce it in ActionTest demo?
Version of TRichView?
Version of Delphi?
Please send the exact text you paste to richviewgmailcom.

krimsoniuss
Posts: 5
Joined: Thu Apr 26, 2018 2:14 pm

Re: List index out of bounds when copying and pasting

Post by krimsoniuss » Tue Aug 20, 2019 12:57 pm

I have rebuilt my application using your ActionTest as the base for my email composer copying and pasting seems better now. I am now getting the same error (ListIndexOutOfBounds(391)) here:

TCustomRichView.SaveHTMLToStreamEx --> TCustomRVData.GetItem line 10834

What is causing these issues? I need to get this fixed as many users are affected.

Maikel

krimsoniuss
Posts: 5
Joined: Thu Apr 26, 2018 2:14 pm

Re: List index out of bounds when copying and pasting

Post by krimsoniuss » Tue Aug 20, 2019 12:59 pm

Delphi Tokyo
Richview version 17

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

Re: List index out of bounds when copying and pasting

Post by Sergey Tkachenko » Tue Aug 20, 2019 3:40 pm

Please give me step-by-step instructions how to reproduce this problem.
Or send me a test project to richviewgmailcom

Post Reply