开发者

UIDatePicker crash on iOS 4.2.1

i've a problem with ios 4.2.1 and uidatepicker. My app is running on iPad and the picker is inside an UIPopoverController. On iOS 3.2 the app works fine. When i spin any wheel of the picker, the app crash with this stack trace:

* Terminating app due to uncaught exception 'NSRangeException', reason: ' -[NSMutableArray objectAtIndex:]: index 2147483647 beyond bounds [0 .. 2]' ** Call stack at first throw: ( 0 CoreFoundation 0x01165be9 exceptionPreprocess + 185 1 libobjc.A.dylib 0x012ba5c2 objc_exception_throw + 47 2 CoreFoundation 0x0115b6e5 -[__NSArrayM objectAtIndex:] + 261 3 UIKit 0x002e9b74 -[UIPickerView reloadComponent:] + 62 4 UIKit 0x004cb6a9 -[UIDatePickerView _updateDateOrTime] + 1273 5 UIKit 0x004cb114 -[UIDatePickerView pickerView:didSelectRow:inComponent:] + 42 6 UIKit 0x002e9194 -[UIPickerView _sendSelectionChangedForComponent:] + 100 7 UIKit 0x002e8f75 -[UIPickerView scrollerDidEndSmoothScrolling:] + 75 8 UIKit 0x004924c7 -[UIScroller(Internal) _stopScrollingNotify:dealloc:pin:] + 692 9 UIKit 0x00493ed0 -[UIScroller(Static) _smoothScroll:] + 4743 10 UIKit 0x0048a188 ScrollerHeartbeatCallback + 129 11 GraphicsServices 0x01a9d447 HeartbeatTimerCallback + 35 12 CoreFoundation 0x01146fe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 19 13 CoreFoundation 0x01148594 __CFRunLoopDoTimer + 1220 14 CoreFoundation 0x010a4cc9 __CFRunLoopRun + 1817 15 CoreFoundation 0x010a4240 CFRunLoopRunSpecific + 208 16 CoreFoundation 0x010a4161 CFRunLoopRunInMode + 97 17 GraphicsServices 0x01a9a268 GSEventRunModal + 217 18 GraphicsServices 0x01a9a32d GSEventRun + 115 19 UIKit 0x0030242e UIApplicationMain + 1160 20 Agenda 0x0000245c main + 102 21 Agenda 0x000023ed start + 53 ) terminate called after throwing an instance of 'NSException开发者_运维知识库' Program received signal: “SIGABRT”.

Any ideas?


The problem is with your array range.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜