bgrabitmap / lazpaint

🎨 Cross-platform image editor with raster and vector layers similar to Paint.Net written in Lazarus (Free Pascal)
https://lazpaint.github.io/
GNU General Public License v3.0
404 stars 57 forks source link

Invalid argument index in format #17

Closed lainz closed 6 years ago

lainz commented 7 years ago

When the image list is empty and you scroll-up an error is shown. lazpainterror

circular17 commented 7 years ago

Thanks for reporting.

circular17 commented 6 years ago

Hi Lainz. Does this still happen with development version? How to reproduce exactly?

lainz commented 6 years ago

Hi, I will try today

lainz commented 6 years ago

Hi, it still happens, I get an exception here:

function TVirtualGrid.GetCells(Col, Row: Integer): PCellProps;
begin
  // todo: Check range
  Result:=nil;
  if (Col<0) or (Row<0) or (Col>=ColCount) or (Row>=RowCount) then
    raise EGridException.CreateFmt(rsIndexOutOfRange, [Col, Row]);
  Result:=FCells[Col,Row];
end;

Just do View > Image List. Then with no image loaded on that, scroll up and down several times, and then it happens.

lainz commented 6 years ago

I see it's a bug on the LCL...

circular17 commented 6 years ago

Thanks very much now I understand. I have fixed in dev branch of LazPaint by disabling the grid in that case.