V 2.9.0-6 SChartSeriesCrosshair Crashing Application


#1

I am trying to implement “SChartSeriesCrosshair” in my application, which is currently using SChartCrosshair to modify the crosshair properties… but my app is crashing during the chart loading process.

I have located and reviewed several threads with what appears to be the same problem, but it was stated as resolved in 2.5.x. My version is much newer than that.

Line chart using SChartCategoryAxis (xAxis) and SChartNumberAxis (yAxis) with user-defined tick mark label text.

*** Terminating app due to uncaught exception ‘NSRangeException’, reason: ‘*** -[__NSArrayM objectAtIndex:]: index 9223372036854775806 beyond bounds for empty array’

*** First throw call stack:
(
0 CoreFoundation 0x0000000113ae3d4b __exceptionPreprocess +
1 libobjc.A.dylib 0x0000000112e0f21e objc_exception_throw +
2 CoreFoundation 0x0000000113a152eb -[__NSArrayM objectAtIndex:] +

0x000000010f831c83 -[SChartInterpolatingHitDetection interpolatePoint:forCoord:] + 1155
0x000000010f832b49 -[SChartInterpolatingHitDetection distanceInfoToPoint:isOnlySeries:chart:] + 393
0x000000010f872b08 -[SChartPixelToPointMapper distanceInfoForSeries:binProvider:toPixelPoint:isOnlySeries:chart:] + 1224
0x000000010f87254e -[SChartPixelToPointMapper closestSeriesToPixelPoint:searchingSeries:binProviders:chart:] + 510
0x000000010f8739a8 -[SChartPixelToPointMapper mappingForPoint:searchingSeries:binProviders:onChart:] + 168
0x000000010f808f6b +[SChartCrosshairSharedUtility mappingForTrackedSeries:locationInChart:isInterpolating:chart:] + 395
0x000000010f803293 -[SChartSeriesCrosshair moveToPoint:inChart:] + 195
0x000000010f7fd168 -[SChartCrosshairController repositionCrosshairInChart:] + 120
0x000000010f7caba7 -[SChartCanvasOverlay positionCrosshairIfVisible] + 183
0x000000010f7ed2e6 -[ShinobiChart redrawChartIncludePlotArea:recalcTickLabels:] + 1462
0x000000010f7ed3af -[ShinobiChart redrawChartIncludePlotArea:] + 63
0x000000010f7ed3ed -[ShinobiChart redrawChart] + 45
0x00000001128ff92d -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 1102
0x000000010f7ed48c -[ShinobiChart redrawChartOnMainThread] + 60
0x000000010f7ebbdc -[ShinobiChart setXAxis:] + 268


#2

Hi RC51,

What version of ShinobiCharts are you using?

You can find out by printing ShinobiCharts.getInfo().

As I’m struggling to replicate your issue on our latest version (2.9.3).

Is it possible for you to manipulate our sample to replicate your issue and send it to us at info@shinobicontrols.com?

This would really help us identify the source of your issue.

Kind regards,
Andrew Polkinghorn.