Crosshair causing crash - CALayerInvalidGeometry', reason: 'CALayer position contains NaN'


#1

ShinobiChart Premium 2.7.3.

X Axis DateTime, Y Axis Number.

Line Series.

Everything works fine except when enabling the Crosshair.

The crash occurs when moving the crosshair to a datapoint where the actual datapoint and the very next datapoint share the same Time and Values (Any value, not necessarily 0’s).

Data Index: 3245        TimeLogged: 2014-10-02 09:00:00 +0000      Value: 0.000000           Moving crosshair to this datapoint is OK

Data Index: 3246        TimeLogged: 2014-10-02 09:00:01 +0000      Value: 0.000000           Moving crosshair to this datapoint is OK

Data Index: 3247        TimeLogged: 2014-10-02 09:00:02 +0000      Value: 0.000000           Moving crosshair to this datapoint is OK

Data Index: 3248        TimeLogged: 2014-10-02 09:00:04 +0000      Value: 0.000000           Moving crosshair to this datapoint is OK

Data Index: 3249        TimeLogged: 2014-10-02 09:00:05 +0000      Value: 0.000000       App crashes

Data Index: 3250        TimeLogged: 2014-10-02 09:00:05 +0000      Value: 0.000000

It seems that this issue is not handled properly. What can I do in the meantime?

Thanks


#2

Hi Rodrigo,

This looks like it could be an issue with division-by-zero - we’re not aware of any such issue, would you be able to upload a sample datasource that reproduces this problem?

Kind regards,

Rob


#3

Hi,

I am also getting the same issue and I have tried a lot to find out the solution but failed. Please see the issue below and providing the github link for the sample app where I am getting the issue. Please find and help me out.

The Issue is: The chart is creating fine. But If I use the below lines for crosshair enable, mainly the second line below then I am getting crash. 

lineSeries.style.pointStyle.showPoints = YES;

lineSeries.crosshairEnabled = YES;

lineSeries.selectionMode = SChartSelectionPoint;

See the github link below.

https://github.com/bankim/shinobi-chart.git

Regards,

Bankim.


#4

For anyone else who may be reading this thread, the issue appears to be resolved, details can be found at http://www.shinobicontrols.com/forum/shinobicontrols/2014/12/crosshair-causing-crash-calayerinvalidgeometry,-reason-calayer-position-contains-nan-[559-nan]

Thanks.