Skip to content

fixed: Exception "TList<System.Integer> is empty" #262

@ma3as

Description

@ma3as

With create a new project there seems no problem.

When I open my project with the SynEdit component, the IDE shows me an error, before the Designer is ready.
Also when run the project, while create the form where the SynEdit is placed on (sorry is german):

Exception: EArgumentOutOfRangeException mit der Meldung 'Listenindex außerhalb des gültigen Bereichs (0). TList<System.Integer> ist leer' aufgetreten.

It happens in the unit SynEditWordWrap, here:

function TSynWordWrapPlugin.RowCount: integer;
begin
  if fLineCount > 0 then
    Result := fLineOffsets[fLineCount - 1]   // here it crashing
  else
    Result := 0;
  Assert(fRowLengths.Count = Result);
end;

Compiled with Delphi 10.1 Berlin there was no problem - now I use 12.2 Athens and it shows the error.

How to fix?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions