Page 1 of 1

List index out of bounds when copying and pasting

Posted: Wed Aug 07, 2019 11:06 am
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

Re: List index out of bounds when copying and pasting

Posted: Thu Aug 08, 2019 7:02 am
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?

Re: List index out of bounds when copying and pasting

Posted: Thu Aug 08, 2019 1:02 pm
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

Re: List index out of bounds when copying and pasting

Posted: Thu Aug 08, 2019 3:56 pm
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.

Re: List index out of bounds when copying and pasting

Posted: Tue Aug 20, 2019 12:57 pm
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

Re: List index out of bounds when copying and pasting

Posted: Tue Aug 20, 2019 12:59 pm
by krimsoniuss
Delphi Tokyo
Richview version 17

Re: List index out of bounds when copying and pasting

Posted: Tue Aug 20, 2019 3:40 pm
by Sergey Tkachenko
Please give me step-by-step instructions how to reproduce this problem.
Or send me a test project to richviewgmailcom