Recent

Author Topic: Crash on deleting ChartDataItem (x=NaN)  (Read 3627 times)

wp

  • Hero Member
  • *****
  • Posts: 13210
Crash on deleting ChartDataItem (x=NaN)
« on: November 06, 2011, 03:47:51 pm »
When attempting to delete a ChartDataItem from a TListChartSource containing a NaN results in a crash in TListChartSource.Delete.

See the attached project to verify the bug. The chart source of the line series is constructed to have a NaN for the x value of data item #0. Clicking on the "Delete Point #0" tries do delete this point from the series. This causes a crash because TListChartSource.Delete compares the Extent with NaN.

[Edit] There are also NaN related issues in TListChartSourceStrings.Get (not demonstrated in the attached project).
« Last Edit: November 06, 2011, 04:55:05 pm by wp »

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: Crash on deleting ChartDataItem (x=NaN)
« Reply #1 on: November 06, 2011, 08:40:44 pm »
I am travelling now, so I will not be able to fix this until the next week.
The fix for this particular issue is simple, but the general tendency somewhat worries me --
too many IsNan checks might hurt performance... or maybe this effect will be insignificant
and is nothing to worry about.

 

TinyPortal © 2005-2018