Menu

#7 Prevent overflow exception from single point Inf/NaN data

open
nobody
None
5
2011-09-05
2011-09-05
C. Gleerup
No

small modification that checks input data and does nothing in case of NaN/Inf when drawing single point.
this prevents a possible stackOverflow exception from system drawing.

Discussion

  • C. Gleerup

    C. Gleerup - 2011-09-05
     
  • C. Gleerup

    C. Gleerup - 2011-09-05

    whopsi, i might add, the relevant file is:
    \src\LinePlot.cs
    line 109, just below PointF physical = t.Transform( data[0] );
    add
    if (float.IsNaN(physical.X) || float.IsInfinity(physical.X) || float.IsNaN(physical.Y) || float.IsInfinity(physical.Y))
    {
    return;
    }

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.