I seem to be getting the following error popup from time to time, I've not narrowed it down to when as there are lots of factors.
List index out of bounds (18). TChartTools range is 0..17
I've not been able to trigger this error reliably yet.
I suspect it could be due to a group of TPointSeries graphs that have an associated TMarksTipTool assigned to them for hint popup.
It could be a thread creation timing issue. Is there a way to stop this error popping up ?
List Index out of bounds...TChartTools
Re: List Index out of bounds...TChartTools
Forgot to say this is with TChart v2025.43 and BDS 12.3 Update 3
Re: List Index out of bounds...TChartTools
Hello,
Difficult to say without the code.
I guess you may be accessing the list of tools with an out of range index. To prevent that, you can add an if condition before accessing it. Ie:
Difficult to say without the code.
I guess you may be accessing the list of tools with an out of range index. To prevent that, you can add an if condition before accessing it. Ie:
Code: Select all
var toolIndex: Integer;
begin
toolIndex:=myIndex;
if toolIndex >= Chart1.Tools.Count then Exit;
// Now it should be safe to get the tool at the toolIndex
Chart1.Tools[toolIndex]...
end;
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |