freesuraj/SPAnalogClock

Crashed by unrecognized selector timeIntervalSinceReferenceDate.

Closed this issue · 4 comments

Crashed by
-[__NSCFCalendar timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x7fb0f861eff0

*** First throw call stack:
(
0 CoreFoundation 0x000000010d926f35 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010d5bfbb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010d92e04d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010d88627c __forwarding
+ 988
4 CoreFoundation 0x000000010d885e18 _CF_forwarding_prep_0 + 120
5 CoreFoundation 0x000000010d86c180 -[__NSCFCalendar components:fromDate:] + 208
6 CoreFoundation 0x000000010d86c03e -[_NSCopyOnWriteCalendarWrapper components:fromDate:] + 78
7 Clock 0x000000010bb7ec6c -[SPClockView timerFired:] + 284
8 QuartzCore 0x000000010de2f747 _ZN2CA7Display15DisplayLinkItem8dispatchEv + 37
9 QuartzCore 0x000000010de2f60f _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 315
10 CoreFoundation 0x000000010d88ef64 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
11 CoreFoundation 0x000000010d88eb25 __CFRunLoopDoTimer + 1045
12 CoreFoundation 0x000000010d851e5d __CFRunLoopRun + 1901
13 CoreFoundation 0x000000010d851486 CFRunLoopRunSpecific + 470
14 GraphicsServices 0x00000001102029f0 GSEventRunModal + 161
15 UIKit 0x000000010be68420 UIApplicationMain + 1282
16 Clock 0x000000010bb79643 main + 115
17 libdyld.dylib 0x000000010e1da145 start + 1
18 ??? 0x0000000000000001 0x0 + 1
)

any help?

@InjayTseng does it crash on simulator? which IOS and which device?

Thank you for reply.
on both device (iPhone 6/ iOS8.1) and all simulators.

Am i missing something?

@InjayTseng change both instances of:
@property (assign, nonatomic) NSDate *time;

to this
@property (nonatomic, readwrite) NSDate *time;
in SPClockView.m

Perfect, works for me!
Thanks a lot !!