Problem when migrating to Shinobi 2.1.1


#1

Hello,

When I changed the shinobi framework with the new one (v 2.1.1), I’ve got this error with SChartDateTimeAxis only :

2013-03-01 10:30:34.084 xxxxxxxxxx[6837:907] *** -[__NSCFCalendar dateByAddingComponents:toDate:options:]: components cannot be nil
I mean really, what do you think that operation is supposed to mean with a nil components?
An exception has been avoided for now.
A few of these errors are going to be reported with this complaint, then further violations will simply silently do whatever random thing results from the nil.
Here is the backtrace where this occurred this time (some frames may be missing due to compiler optimizations):
(
	0 CoreFoundation 0x3a148911 <redacted> + 96
	1 xxxxxxxxxx 0x00180699 -[SChartDateTimeAxis dateFromApplyingComponents:toDate:goingBackwards:] + 48
	2 xxxxxxxxxx 0x0018061f -[SChartDateTimeAxis alterTickMarkValue:isMajor:negateComponents:] + 234
	3 xxxxxxxxxx 0x001806df -[SChartDateTimeAxis decrementTickMarkValue:isMajor:] + 30
	4 xxxxxxxxxx 0x0017ffeb -[SChartDateTimeAxis firstTickIsMajor:] + 422
	5 xxxxxxxxxx 0x00180113 -[SChartDateTimeAxis firstMinorTick] + 22
	6 xxxxxxxxxx 0x00177ccd -[SChartAxis autoGenerateTickMarks:] + 1628
	7 xxxxxxxxxx 0x00178099 -[SChartAxis generateTickMarks:] + 488
	8 xxxxxxxxxx 0x00179b97 -[SChartAxis drawTickMarksWithGLFrame:usingAxisDrawer:needToRedrawLabels:] + 710
	9 xxxxxxxxxx 0x001a74ff -[SChartCanvas layoutSubviews] + 1758
	10 UIKit 0x381ba803 <redacted> + 258
	11 QuartzCore 0x331d8d63 <redacted> + 214
	12 QuartzCore 0x331d8901 <redacted> + 460
	13 QuartzCore 0x331d9835 <redacted> + 16
	14 QuartzCore 0x331d921b <redacted> + 238
	15 QuartzCore 0x331d9029 <redacted> + 316
	16 UIKit 0x381c08eb <redacted> + 126
	17 CoreFoundation 0x3a1826cd <redacted> + 20
	18 CoreFoundation 0x3a1809c1 <redacted> + 276
	19 CoreFoundation 0x3a180d17 <redacted> + 742
	20 CoreFoundation 0x3a0f3ebd CFRunLoopRunSpecific + 356
	21 CoreFoundation 0x3a0f3d49 CFRunLoopRunInMode + 104
	22 GraphicsServices 0x3bff32eb GSEventRunModal + 74
	23 UIKit 0x3820b2f9 UIApplicationMain + 1120
	24 xxxxxxxxxx 0x000cc55f main + 166
	25 xxxxxxxxxx 0x000c8580 start + 40
)

After a while, I  figure out that this exception occure because of this ligne : 

xAxis.majorTickFrequency = [SChartDateFrequency dateFrequencyWithMonth:1];

Is this a bug in the new version or I’m missing somethings ?

Thanks in advance…


#2

Hi mahloui,

Yes, there’s a bug in this version, which triggers Apple’s rather strange exception message. However it’ll be fixed in the next release, due out soon, and there is a simple workaround, to set the minorTickFrequency as well as the major one.

Regards,

Robin Sillem

Lead Developer

ShinobiControls


#3

Hi Robin,

Thanks for your response.

Good job