List index out of bounds when copying and pasting

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

List index out of bounds when copying and pasting

Post by krimsoniuss »

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: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: List index out of bounds when copying and pasting

Post by Sergey Tkachenko »

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: 7
Joined: Thu Apr 26, 2018 2:14 pm

Re: List index out of bounds when copying and pasting

Post by krimsoniuss »

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: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: List index out of bounds when copying and pasting

Post by Sergey Tkachenko »

Can you reproduce it in ActionTest demo?
Version of TRichView?
Version of Delphi?
Please send the exact text you paste to richviewgmailcom.
krimsoniuss
Posts: 7
Joined: Thu Apr 26, 2018 2:14 pm

Re: List index out of bounds when copying and pasting

Post by krimsoniuss »

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: 7
Joined: Thu Apr 26, 2018 2:14 pm

Re: List index out of bounds when copying and pasting

Post by krimsoniuss »

Delphi Tokyo
Richview version 17
Sergey Tkachenko
Site Admin
Posts: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: List index out of bounds when copying and pasting

Post by Sergey Tkachenko »

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