Hello,
ShinobiCharts - Version: 2.8.5-3, Edition: Premium, Release Date: Nov 10 2015
Having single LineSeries displayed AND crosshair displayed.
If we try to display another LineSeries, which will use secondary Y axis - application will crash.
If second lineseries use the same Y axis, app will not crash.
If there is no crosshair displayed, app will not crash.
I believe this bug was not present in Shinobi 2.7
Basically, I prepare datasource and once it is ready (i.e. contains 2 series, info about axes etc) I call
[self reloadData];
[_lineChart redrawChartIncludePlotArea:YES];
The program crashes inside redrawChartIncludePlotArea:
2015-11-18 15:06:46.992 bi[20500:4199300] ShinobiCharts: Couldn't find axis for series "<SChartLineSeries: 0x7872d000>"
From: ShinobiChart at 0x7d98c660
(lldb) bt
* thread #1: tid = 0x401384, 0x043e462a libsystem_kernel.dylib`__pthread_kill + 10, name = '1.4 rv:15', queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x043e462a libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x043ad664 libsystem_pthread.dylib`pthread_kill + 101
frame #2: 0x0415b39d libsystem_c.dylib`abort + 156
frame #3: 0x0052956e bi`+[ShinobiChartLog fatalLogMessage:fromSource:] + 78
frame #4: 0x005296cc bi`-[ShinobiChartLog handleFatalErrorWithMessage:fromSource:] + 76
frame #5: 0x004f2462 bi`-[ShinobiChart axesForSeries:storeX:andStoreY:] + 1506
frame #6: 0x005614b9 bi`-[SChartPixelToPointMapper distanceInfoForSeries:binProvider:toPixelPoint:isOnlySeries:chart:] + 265
frame #7: 0x00562e2f bi`-[SChartPixelToPointMapper mappingForPoint:lockedToSeries:binProvider:onChart:] + 271
frame #8: 0x00513193 bi`+[SChartCrosshairSharedUtility mappingForTrackedSeries:locationInChart:isInterpolating:chart:] + 323
frame #9: 0x0047a232 bi`-[SChartCrosshair moveToPoint:inChart:] + 354
frame #10: 0x0050681b bi`-[SChartCrosshairController repositionCrosshairInChart:] + 139
frame #11: 0x004ddaf0 bi`-[SChartCanvasOverlay positionCrosshairIfVisible] + 144
frame #12: 0x004f371a bi`-[ShinobiChart redrawChartIncludePlotArea:recalcTickLabels:] + 1882
frame #13: 0x0045ee4f bi`-[SChartAxis animateRangeChange] + 2415
frame #14: 0x00469b67 bi`-[SChartAxis cancelGestures] + 423
frame #15: 0x0046a5c8 bi`-[SChartAxis resetZoomLevelWithAnimation:] + 56
frame #16: 0x0045de26 bi`-[SChartAxis setupInitialRange] + 214
frame #17: 0x004f5b8b bi`-[ShinobiChart updateChartWithNewChartSeries:newSeriesGroups:] + 2459
frame #18: 0x004f690f bi`-[ShinobiChart layoutSubviews] + 895
frame #19: 0x01c5eeb7 UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 813
frame #20: 0x033d3059 libobjc.A.dylib`-[NSObject performSelector:withObject:] + 70
frame #21: 0x0193080a QuartzCore`-[CALayer layoutSublayers] + 144
frame #22: 0x019244ee QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 388
frame #23: 0x01924352 QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 26
frame #24: 0x01916e8b QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 317
frame #25: 0x0194ae03 QuartzCore`CA::Transaction::commit() + 561
frame #26: 0x0194c674 QuartzCore`CA::Transaction::flush_transaction() + 50
frame #27: 0x01bc5c8a UIKit`_afterCACommitHandler + 197
frame #28: 0x0381761e CoreFoundation` __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
frame #29: 0x0381757e CoreFoundation`__CFRunLoopDoObservers + 398
frame #30: 0x0380cefc CoreFoundation`__CFRunLoopRun + 1340
frame #31: 0x0380c706 CoreFoundation`CFRunLoopRunSpecific + 470
frame #32: 0x0380c51b CoreFoundation`CFRunLoopRunInMode + 123
frame #33: 0x062ac664 GraphicsServices`GSEventRunModal + 192
frame #34: 0x062ac4a1 GraphicsServices`GSEventRun + 104
frame #35: 0x01b951eb UIKit`UIApplicationMain + 160
* frame #36: 0x002d150a bi`main(argc=9, argv=0xbff088e8) + 138 at main.m:16
frame #37: 0x040b4a21 libdyld.dylib`start +
Interesting thing is that
SChartLineSeries: 0x7872d000
was not created by me, but somehow exists in the chart.seriesGroups