Ios 该应用程序可在iphone 6plus模拟器上运行,但不能在iphone 6模拟器上运行
我正在开发一个应用程序,它使用SQLITE,在iPhone6plus模拟器上运行非常完美,但在Iphone6模拟器和Iphone5上崩溃。我不确定是什么问题。有人能帮我吗? 这是我从Xcode得到的调试错误Ios 该应用程序可在iphone 6plus模拟器上运行,但不能在iphone 6模拟器上运行,ios,objective-c,iphone,crash,Ios,Objective C,Iphone,Crash,我正在开发一个应用程序,它使用SQLITE,在iPhone6plus模拟器上运行非常完美,但在Iphone6模拟器和Iphone5上崩溃。我不确定是什么问题。有人能帮我吗? 这是我从Xcode得到的调试错误 *** Terminating app due to uncaught exception 'NSRangeException', reason: *** -[__NSArrayM objectAtIndex:]: index 9223372036854775807 beyond boun
*** Terminating app due to uncaught exception 'NSRangeException', reason:
*** -[__NSArrayM objectAtIndex:]: index 9223372036854775807 beyond bounds [0 .. 10]'
*** First throw call stack:
(
0 CoreFoundation 0x000000010492ae65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001043a3deb objc_exception_throw + 48
2 CoreFoundation 0x000000010480e404 -[__NSArrayM objectAtIndex:] + 212
3 ILFCalc 0x0000000103d85cf8 -[EditInfoViewController loadInfoToEdit] + 424
4 ILFCalc 0x0000000103d83f76 -[EditInfoViewController viewDidLoad] + 1174
5 UIKit 0x0000000104e6df98 -[UIViewController loadViewIfRequired] + 1198
6 UIKit 0x0000000104e73f4f -[UIViewController __viewWillAppear:] + 120
7 UIKit 0x0000000104ea3e44 -[UINavigationController _startCustomTransition:] + 1203
8 UIKit 0x0000000104eb423f -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
9 UIKit 0x0000000104eb53af -[UINavigationController __viewWillLayoutSubviews] + 57
10 UIKit 0x000000010505bff7 -[UILayoutContainerView layoutSubviews] + 248
11 UIKit 0x0000000104d8e4a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
12 QuartzCore 0x000000010874559a -[CALayer layoutSublayers] + 146
13 QuartzCore 0x0000000108739e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
14 QuartzCore 0x0000000108739cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
15 QuartzCore 0x000000010872e475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
16 QuartzCore 0x000000010875bc0a _ZN2CA11Transaction6commitEv + 486
17 QuartzCore 0x000000010875c37c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
18 CoreFoundation 0x0000000104856367 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
19 CoreFoundation 0x00000001048562d7 __CFRunLoopDoObservers + 391
20 CoreFoundation 0x000000010484bf2b __CFRunLoopRun + 1147
21 CoreFoundation 0x000000010484b828 CFRunLoopRunSpecific + 488
22 GraphicsServices 0x0000000107fd2ad2 GSEventRunModal + 161
23 UIKit 0x0000000104cd7610 UIApplicationMain + 171
24 ILFCalc 0x0000000103d898af main + 111
25 libdyld.dylib 0x000000010631a92d start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
张贴
loadInfoToEdit
函数的代码。看起来您正试图用NSNotFound
为数组下标。要了解如何调试崩溃,请首先查看您需要确保传入objectAtIndex
的索引是int
或NSInteger
。有时ios版本会忽略这一点或无法纠正,我有时会发生这种情况。非常感谢raywenderlich的网页帮助我解决了很多问题。。。我非常感谢你在这方面的帮助!!