So, i've just updated my xcode and started building my app for iOS 7.1. But now i find out that my SDWebImage is broken. Whenever i try to set an ImageWithUrl for a UIImageView my app crashes with the following exception and stacktrace:
2014-03-11 12:55:36.647 Wiggle[1983:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:placeholderImage:options:]: unrecognized selector sent to instance 0x10fa12890'
*** First throw call stack:
(
0 CoreFoundation 0x0000000103188795 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000102eeb991 objc_exception_throw + 43
2 CoreFoundation 0x0000000103219bad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010317a09d ___forwarding___ + 973
4 CoreFoundation 0x0000000103179c48 _CF_forwarding_prep_0 + 120
5 Wiggle 0x000000010001fe94 -[MenuTableViewController tableView:viewForHeaderInSection:] + 1316
6 UIKit 0x000000010182cdb3 __84-[UITableView _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:]_block_invoke + 112
7 UIKit 0x00000001017b60ac +[UIView(Animation) performWithoutAnimation:] + 70
8 UIKit 0x000000010182ccc5 -[UITableView _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:] + 223
9 UIKit 0x00000001018149cf -[UITableView _updateVisibleHeadersAndFootersNow:] + 2596
10 UIKit 0x0000000101815b6f -[UITableView _updateVisibleCellsNow:] + 3122
11 UIKit 0x0000000101826381 -[UITableView layoutSubviews] + 207
12 UIKit 0x00000001017bdb27 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 354
13 QuartzCore 0x0000000100bb7a22 -[CALayer layoutSublayers] + 151
14 QuartzCore 0x0000000100bac589 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 363
15 QuartzCore 0x0000000100bac40a _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
16 QuartzCore 0x0000000100b21694 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 252
17 QuartzCore 0x0000000100b2270c _ZN2CA11Transaction6commitEv + 394
18 UIKit 0x0000000101779444 _afterCACommitHandler + 128
19 CoreFoundation 0x0000000103153ff7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
20 CoreFoundation 0x0000000103153f67 __CFRunLoopDoObservers + 391
21 CoreFoundation 0x00000001031336d2 __CFRunLoopRun + 946
22 CoreFoundation 0x0000000103132f33 CFRunLoopRunSpecific + 467
23 GraphicsServices 0x00000001036a53a0 GSEventRunModal + 161
24 UIKit 0x0000000101762043 UIApplicationMain + 1010
I'm not sure what to do, can anybody help?
Thanks to Amar I found the answer.
SDWebImage with Base SDK iOS 7.1 requires you to exclude arm64 in
Project > BuildSettings > Architectures> Valid Architectures.
You might also need to set Build Active Architectures Only to NO for it to work.
Obviously now that there are lots of 64 bit devices out there you don't want to do this anymore, you instead want to download the latests SDWeb library that is compatible with the new architecture.
Related
After iOS update version 10.3.3, a bug appeared in some devices, not all. that is..
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSLayoutConstraint constant is not finite! That's illegal. constant:inf firstAnchor:<NSLayoutXAxisAnchor:0x608000679c80 "_UINavigationBarContentView:0x7fce8d57aee0.right"> secondAnchor:<NSLayoutXAxisAnchor:0x608000679d00 "UILayoutGuide:0x6080001be680'UIViewLayoutMarginsGuide'.right">'
*** First throw call stack:
(
0 CoreFoundation 0x0000000110e3126b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000114a67f41 objc_exception_throw + 48
2 CoreFoundation 0x0000000110e36402 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000111a5b749 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 Foundation 0x00000001119df92c -[NSLayoutConstraint _setSymbolicConstant:constant:] + 629
5 Foundation 0x00000001119df689 -[NSLayoutConstraint setConstant:] + 68
6 UIKit 0x0000000112a6dc52 -[UIView _updateLayoutMarginsGuideConstraintsIfNecessary] + 358
7 UIKit 0x0000000112a6de5e -[UIView _layoutMarginsDidChangeFromOldMargins:] + 194
8 UIKit 0x0000000112a6e849 -[UIView _updateInferredLayoutMarginsFromSuperview:] + 850
9 UIKit 0x0000000112a6fc03 -[UIView setSafeAreaInsets:] + 446
10 UIKit 0x0000000112a6f2a5 -[UIView _updateSafeAreaInsets] + 125
11 UIKit 0x0000000112a9c30e -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1571
12 UIKit 0x0000000112adc343 -[UINavigationBar layoutSublayersOfLayer:] + 178
13 QuartzCore 0x000000011264cc92 -[CALayer layoutSublayers] + 153
14 QuartzCore 0x0000000112650d79 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 401
15 QuartzCore 0x00000001125d9851 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 385
16 QuartzCore 0x00000001126051c2 _ZN2CA11Transaction6commitEv + 500
17 QuartzCore 0x0000000112605f14 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 76
18 CoreFoundation 0x0000000110dd3e57 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
19 CoreFoundation 0x0000000110dd3dae __CFRunLoopDoObservers + 430
20 CoreFoundation 0x0000000110db83c4 __CFRunLoopRun + 1572
21 CoreFoundation 0x0000000110db7b29 CFRunLoopRunSpecific + 409
22 GraphicsServices 0x000000011a8dd9c6 GSEventRunModal + 62
23 UIKit 0x00000001129ce9a4 UIApplicationMain + 159
24 APP NAME 0x000000010f8c1847 main + 55
25 libdyld.dylib 0x0000000117f8d621 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Funny thing is that this error doesn't make any sense to all the equipment. There was no error in my device (iOS 10.3.3)
so I tried running this app in Xcode 9 beta 5, iOS 11 beta 5 to get some error and appeared this assertion failure. I think There is a doubt about navigationBarItem.
Please help.
In my case I was getting an "infinite" origin for a valid UITextRange when trying to get UITextField.firstRect(). That was causing the constraint update to fail.
I would recommend to get Xcode 9 and debug your code there.
The UITableView works fine when I am trying to use it through Xcode6.4, but when I'm trying it through Xcode 7.1.1 it crashes. I guess it's because of the iOS versions. I am attaching the crash log. Kindly suggest what the best way to fix it is. I am quite sure that:
1) Datasource and Delegates are working fine.
2) Numberofrows and heightOfRow methods are also getting called, but it crashes before the cellForRowAtIndexPath gets called.
Here is the log:
2016-02-05 15:34:27.400 Autograph24[3720:87023] * Assertion failure
in -[UITableViewRowData _assertValidIndexPath:allowEmptySection:],
/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.29.5/UITableViewRowData.m:2310
2016-02-05 15:34:27.506 Autograph24[3720:87023] * Terminating app
due to uncaught exception 'NSInternalInconsistencyException', reason:
'Invalid indexPath'
*** First throw call stack: ( 0 CoreFoundation 0x00000001075c9f45 exceptionPreprocess + 165 1 libobjc.A.dylib
0x0000000107956deb objc_exception_throw + 48 2 CoreFoundation
0x00000001075c9daa +[NSException raise:format:arguments:] + 106 3
Foundation 0x0000000106e9b5ee
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198 4
UIKit 0x0000000108d11412
-[UITableViewRowData _assertValidIndexPath:allowEmptySection:] + 963 5 UIKit 0x0000000108d11465
-[UITableViewRowData ensureHeightsFaultedInForIndexPath:availHeight:edgeInset:scrollPosition:]
+ 55 6 UIKit 0x0000000108af50c6 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:] + 2510 7 UIKit 0x0000000108af59b9
-[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 39 8 Autograph24 0x0000000106b1b2ad
-[DashboardVC scrollToToday] + 685 9 Autograph24 0x0000000106b20289 -[DashboardVC changeCalendarStyle] + 313 10
Autograph24 0x0000000106b20144 -[DashboardVC
resizeScreenForPortrait] + 788 11 Autograph24
0x0000000106b1f6a0 -[DashboardVC rotateScreen] + 176 12 Autograph24
0x0000000106b15e76 -[DashboardVC viewDidLoad] + 166 13 UIKit
0x0000000108b49cc4 -[UIViewController loadViewIfRequired] + 1198 14
UIKit 0x0000000108b4fc7b
-[UIViewController __viewWillAppear:] + 120 15 UIKit 0x0000000108b7fa37 -[UINavigationController _startCustomTransition:] +
1203 16 UIKit 0x0000000108b8fcdb
-[UINavigationController _startDeferredTransitionIfNeeded:] + 712 17 UIKit 0x0000000108b90cea
-[UINavigationController __viewWillLayoutSubviews] + 57 18 UIKit 0x0000000108d36c85 -[UILayoutContainerView layoutSubviews] + 248 19
UIKit 0x0000000108a6be40
-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710 20 QuartzCore 0x000000010736359a -[CALayer
layoutSublayers] + 146 21 QuartzCore
0x0000000107357e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE +
366 22 QuartzCore 0x0000000107357cee
_ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 23 QuartzCore 0x000000010734c475
_ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277 24 QuartzCore 0x0000000107379c0a
_ZN2CA11Transaction6commitEv + 486 25 QuartzCore 0x000000010737a37c
_ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92 26 CoreFoundation 0x00000001074f5947
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 27 CoreFoundation 0x00000001074f58b7
__CFRunLoopDoObservers + 391 28 CoreFoundation 0x00000001074eb50b __CFRunLoopRun + 1147 29 CoreFoundation
0x00000001074eae08 CFRunLoopRunSpecific + 488 30 GraphicsServices
0x000000010b1b5ad2 GSEventRunModal + 161 31 UIKit
0x00000001089b730d UIApplicationMain + 171 32 Autograph24
0x0000000106b15d9f main + 111 33 libdyld.dylib
0x000000010aac192d start + 1 34 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException
You have an invalid indexpath. That means that either the section or the row or both is not right. If you have a table with 2 sections and 2 rows per section then indexpath 0-3 is invalid, because section 0 does not provide a row 3. Similarly, indexpath 2-1 would be invalid, because section 2 does not exist (only 0 and 1).
As for how to fix this, first double check if all required methods are called and your data is correctly initialised. Then sprinkle breakpoints around your class. Mainly where you use any kind of indexpath, and see where it tries to read from outside your data.
Learn to read crash logs. In most cases and certainly in this case, they contain all the relevant information:
2016-02-05 15:34:27.400 Autograph24[3720:87023] * Assertion failure in -[UITableViewRowData _assertValidIndexPath:allowEmptySection:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.29.5/UITableViewRowData.m:2310
2016-02-05 15:34:27.506 Autograph24[3720:87023] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid indexPath'
It clearly says: reason: 'Invalid indexPath'
So first hint: an invalid index path (which is a well known thing if you work with UITableViews) was involved.
Next follows the stack trace where the error ocurred. The first few stack locations are within Apple's code. Usually skip them. But occasionally, they contain interesting hints. Here a function assertValidIndexPath:allowEmptySection:. That again shows that the index path is the problem.
*** First throw call stack: (
0 CoreFoundation 0x00000001075c9f45 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000107956deb objc_exception_throw + 48
2 CoreFoundation 0x00000001075c9daa +[NSException raise:format:arguments:] + 106
3 Foundation 0x0000000106e9b5ee -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 UIKit 0x0000000108d11412 -[UITableViewRowData _assertValidIndexPath:allowEmptySection:] + 963
5 UIKit 0x0000000108d11465 -[UITableViewRowData ensureHeightsFaultedInForIndexPath:availHeight:edgeInset:scrollPosition:] + 55
6 UIKit 0x0000000108af50c6 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:] + 2510
7 UIKit 0x0000000108af59b9 -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 39
Here your code follows. Look at the line above and below. It says that your function [DashboardVC scrollToToday] has called the function [UITableView scrollToRowAtIndexPath:atScrollPosition:animated:]. This is where the error was triggered in your code.
8 Autograph24 0x0000000106b1b2ad -[DashboardVC scrollToToday] + 685
9 Autograph24 0x0000000106b20289 -[DashboardVC changeCalendarStyle] + 313
10 Autograph24 0x0000000106b20144 -[DashboardVC resizeScreenForPortrait] + 788
11 Autograph24 0x0000000106b1f6a0 -[DashboardVC rotateScreen] + 176
12 Autograph24 0x0000000106b15e76 -[DashboardVC viewDidLoad] + 166
This is the next interesting location. Here Apple's UIKit called your [DashboardVC viewDidLoad]. So that gives a lot of context. It happend early during the construction of you view in the viewDidLoad phase.
13 UIKit 0x0000000108b49cc4 -[UIViewController loadViewIfRequired] + 1198
14 UIKit 0x0000000108b4fc7b -[UIViewController __viewWillAppear:] + 120
15 UIKit 0x0000000108b7fa37 -[UINavigationController _startCustomTransition:] + 1203
16 UIKit 0x0000000108b8fcdb -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
17 UIKit 0x0000000108b90cea -[UINavigationController __viewWillLayoutSubviews] + 57
18 UIKit 0x0000000108d36c85 -[UILayoutContainerView layoutSubviews] + 248
19 UIKit 0x0000000108a6be40 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710
20 QuartzCore 0x000000010736359a -[CALayer layoutSublayers] + 146
21 QuartzCore 0x0000000107357e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
22 QuartzCore 0x0000000107357cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
23 QuartzCore 0x000000010734c475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
24 QuartzCore 0x0000000107379c0a _ZN2CA11Transaction6commitEv + 486
25 QuartzCore 0x000000010737a37c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
26 CoreFoundation 0x00000001074f5947 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
27 CoreFoundation 0x00000001074f58b7 __CFRunLoopDoObservers + 391
28 CoreFoundation 0x00000001074eb50b __CFRunLoopRun + 1147
29 CoreFoundation 0x00000001074eae08 CFRunLoopRunSpecific + 488
30 GraphicsServices 0x000000010b1b5ad2 GSEventRunModal + 161
31 UIKit 0x00000001089b730d UIApplicationMain + 171
32 Autograph24 0x0000000106b15d9f main + 111
33 libdyld.dylib 0x000000010aac192d start + 1
34 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib:
terminating with uncaught exception of type NSException
Combining this information I would conclude that you call [UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] from within [DashboardVC viewDidLoad], which is bound to fail with any index path because the UITableView is not properly constructed at this time of the view controller's lifecycle.
Earlier iOS versions were more lenient here; but later versions are rather restrictive about what you can do before the view controller is fully constructed.
You will need to move your [UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] call to either viewWillAppear: or even viewDidAppear:.
I'm facing a problem with UIViewController containment via MFSideMenu.
Problem is, on ViewControllers that support orientation, opening the side menu and selecting a different menu option (when the device is in landscape mode) causes the app to crash. This behavior worked perfectly in iOS 6, but is now failing in iOS 7.
Here's the stack trace:
2014-03-05 14:40:00.335 MyApp[21890:70b]
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'custom navigation transition - no popping between different orientations!'
*** First throw call stack:
(
0 CoreFoundation 0x024515e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x021098b6 objc_exception_throw + 44
2 CoreFoundation 0x024513bb +[NSException raise:format:] + 139
3 UIKit 0x009434b4 -[UINavigationController _startCustomTransition:] + 988
4 UIKit 0x009500c7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 688
5 UIKit 0x00950cb9 -[UINavigationController __viewWillLayoutSubviews] + 57
6 UIKit 0x00a8a181 -[UILayoutContainerView layoutSubviews] + 213
7 UIKit 0x00880267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
8 libobjc.A.dylib 0x0211b81f -[NSObject performSelector:withObject:] + 70
9 QuartzCore 0x01ecd2ea -[CALayer layoutSublayers] + 148
10 QuartzCore 0x01ec10d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
11 QuartzCore 0x01ec0f40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
12 QuartzCore 0x01e28ae6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
13 QuartzCore 0x01e29e71 _ZN2CA11Transaction6commitEv + 393
14 QuartzCore 0x01e2a544 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
15 CoreFoundation 0x024194ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
16 CoreFoundation 0x0241941f __CFRunLoopDoObservers + 399
17 CoreFoundation 0x023f7344 __CFRunLoopRun + 1076
18 CoreFoundation 0x023f6ac3 CFRunLoopRunSpecific + 467
19 CoreFoundation 0x023f68db CFRunLoopRunInMode + 123
20 GraphicsServices 0x036979e2 GSEventRunModal + 192
21 GraphicsServices 0x03697809 GSEventRun + 104
22 UIKit 0x00815d3b UIApplicationMain + 1225
23 MyApp 0x000022aa main + 138
24 libdyld.dylib 0x02e9f701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Any help in debugging this is appreciate.
P/S: Note the spelling mistake for "orientation" in the console log. I'm leaving it misspelt in case others stumble upon this problem as well.
Please check whether you are having the below functions.If then, please disable those and try,
(BOOL) shouldAutoRotate;
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation;
remove all orientation related methods.
Thanks,
ithay.
I have created an app that is running great on 5.0 and above but when I test on devices lower I have ran into a few issues that I am unsure of how to tackle and correct.
The first big issue is when saving to core data I use a error method that I believe is apples default error method that is created when you make a core data model. The app just crashes when below 5.0 but if I block out the error code everything works fine. Below is the code used to find and error and handle it.
NSError *error;
if (![managedObjectContext save:&error]) { // crash here
// This is a serious error saying the record could not be saved.
// Advise the user to restart the application
}
//crash log below
2012-05-13 10:17:22.062 PreviewMaker[41595:207] -[UIImage encodeWithCoder:]:
unrecognized selector sent to instance 0x5e7ce80
2012-05-13 10:17:22.064 PreviewMaker[41595:207] *** Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason: '-[UIImage encodeWithCoder:]:
unrecognized selector sent to instance 0x5e7ce80'
*** Call stack at first throw:
(
0 CoreFoundation 0x013fc5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0178b313 objc_exception_throw + 44
2 CoreFoundation 0x013fe0bb -[NSObject(NSObject)
doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x0136d966 ___forwarding___ + 966
4 CoreFoundation 0x0136d522 _CF_forwarding_prep_0 + 50
5 Foundation 0x00c45b3e _encodeObject + 1076
6 Foundation 0x00c50f89 +[NSKeyedArchiver
archivedDataWithRootObject:] + 206
7 CoreData 0x01122cb5 -[NSSQLiteConnection execute] +
2677
8 CoreData 0x011771d6 -[NSSQLiteConnection insertRow:]
+ 262
9 CoreData 0x01173e64 -[NSSQLConnection
performAdapterOperations:] + 180
10 CoreData 0x01173b0e -[NSSQLCore
_performChangesWithAdapterOps:] + 494
11 CoreData 0x011725ea -[NSSQLCore performChanges] + 410
12 CoreData 0x0116c038 -[NSSQLCore saveChanges:] + 216
13 CoreData 0x0112a199 -[NSSQLCore
executeRequest:withContext:error:] + 409
14 CoreData 0x011da70b -[NSPersistentStoreCoordinator
executeRequest:withContext:error:] + 3691
15 CoreData 0x01162948 -[NSManagedObjectContext save:] +
712
16 PreviewMaker 0x0000a0c0 -[MainViewController
noUploadJustSaveImage:] + 331
17 PreviewMaker 0x00009d3c -[MainViewController
UserConfirmedToSaveImage] + 756
18 UIKit 0x004774fd -[UIApplication
sendAction:to:from:forEvent:] + 119
19 UIKit 0x00507799 -[UIControl
sendAction:to:forEvent:] + 67
20 UIKit 0x00509c2b -[UIControl(Internal)
_sendActionsForEvents:withEvent:] + 527
21 UIKit 0x005087d8 -[UIControl
touchesEnded:withEvent:] + 458
22 UIKit 0x0049bded -[UIWindow _sendTouchesForEvent:]
+ 567
23 UIKit 0x0047cc37 -[UIApplication sendEvent:] + 447
24 UIKit 0x00481f2e _UIApplicationHandleEvent + 7576
25 GraphicsServices 0x01eb8992 PurpleEventCallback + 1550
26 CoreFoundation 0x013dd944
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
27 CoreFoundation 0x0133dcf7 __CFRunLoopDoSource1 + 215
28 CoreFoundation 0x0133af83 __CFRunLoopRun + 979
29 CoreFoundation 0x0133a840 CFRunLoopRunSpecific + 208
30 CoreFoundation 0x0133a761 CFRunLoopRunInMode + 97
31 GraphicsServices 0x01eb71c4 GSEventRunModal + 217
32 GraphicsServices 0x01eb7289 GSEventRun + 115
33 UIKit 0x00485c93 UIApplicationMain + 1160
34 PreviewMaker 0x00002e07 main + 121
35 PreviewMaker 0x00002d85 start + 53
)
terminate called after throwing an instance of 'NSException'
Another issue I am running into is setting tintColor on UI objects such as the UISwitch. I have a settings controller that has several UISwitches and such which just about all have a tint color set on, but once agin anything below 5.0 crashes. How can I handle the two and not have to re-write the code just to be compatible with devices below 5.0.
shineSwitch = [[[UISwitch alloc] initWithFrame:CGRectZero] autorelease];
[cell.contentView addSubview:shineSwitch];
cell.accessoryView = shineSwitch;
[shineSwitch addTarget:self action:#selector(switchChanged:)
forControlEvents:UIControlEventValueChanged];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
shineSwitch.onTintColor = [UIColor colorWithRed:0.0 green:0.61 blue:0.99 alpha:1.0];
//crash Log below
2012-05-13 10:19:45.033 PreviewMaker[41611:207] -[UISwitch setOnTintColor:]:
unrecognized selector sent to instance 0x5eab860
2012-05-13 10:19:45.034 PreviewMaker[41611:207] *** Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason: '-[UISwitch setOnTintColor:]:
unrecognized selector sent to instance 0x5eab860'
*** Call stack at first throw:
(
0 CoreFoundation 0x013fc5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0178b313 objc_exception_throw + 44
2 CoreFoundation 0x013fe0bb -[NSObject(NSObject)
doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x0136d966 ___forwarding___ + 966
4 CoreFoundation 0x0136d522 _CF_forwarding_prep_0 + 50
5 PreviewMaker 0x0000f6fb -[FlipsideViewController
tableView:cellForRowAtIndexPath:] + 1353
6 UIKit 0x004ecb98 -
[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 634
7 UIKit 0x004e24cc -
[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
8 UIKit 0x004f78cc -
[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
9 UIKit 0x004ef90c -[UITableView layoutSubviews] +
242
10 QuartzCore 0x001e2a5a -[CALayer layoutSublayers] + 181
11 QuartzCore 0x001e4ddc CALayerLayoutIfNeeded + 220
12 QuartzCore 0x0018a0b4
_ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
13 QuartzCore 0x0018b294 _ZN2CA11Transaction6commitEv +
292
14 QuartzCore 0x0018b46d
_ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
15 CoreFoundation 0x013dd89b
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
16 CoreFoundation 0x013726e7 __CFRunLoopDoObservers + 295
17 CoreFoundation 0x0133b1d7 __CFRunLoopRun + 1575
18 CoreFoundation 0x0133a840 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x0133a761 CFRunLoopRunInMode + 97
20 GraphicsServices 0x01eb71c4 GSEventRunModal + 217
21 GraphicsServices 0x01eb7289 GSEventRun + 115
22 UIKit 0x00485c93 UIApplicationMain + 1160
23 PreviewMaker 0x00002e07 main + 121
24 PreviewMaker 0x00002d85 start + 53
)
terminate called after throwing an instance of 'NSException'
Any help would be greatly appreciated!
Can anyone help me make sense of the crash log below? It came from Apple after inquiring further about a crash my app had. They rejected the app because of this crash, but I have never once been able to make it occur on my end or with 10+ beta testers. So basically, it is only occurring for them for some reason. It looks like it has to do with presenting a view, but that's weird because, like I said, this view is coming up perfectly fine.
Mar 11 14:46:09 unknown StageBloc[2309] <Error>: *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[AccountOverviewViewController popupViewController]: unrecognized selector sent to instance 0x2c7820'
*** Call stack at first throw:
(
0 CoreFoundation 0x3291964f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x36b5cc5d objc_exception_throw + 24
2 CoreFoundation 0x3291d1bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x3291c649 ___forwarding___ + 508
4 CoreFoundation 0x32893180 _CF_forwarding_prep_0 + 48
5 AppName 0x0004b56d -[TTBaseViewController shouldAutorotateToInterfaceOrientation:] + 36
6 UIKit 0x35b0dead -[UIViewController _isSupportedInterfaceOrientation:] + 48
7 UIKit 0x35b76e51 -[UIViewController _preferredInterfaceOrientationGivenCurrentOrientation:] + 68
8 UIKit 0x35b75f07 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 794
9 UIKit 0x35b756f7 -[UIViewController presentModalViewController:withTransition:] + 2378
10 UIKit 0x35b74cd7 -[UIViewController presentModalViewController:animated:] + 58
11 StageBloc 0x00009bb1 -[StageBlocViewController loginSuccessful] + 196
12 StageBloc 0x00004c21 -[StageBlocAppDelegate successfulAttempt:] + 288
13 CoreFoundation 0x32886f03 -[NSObject(NSObject) performSelector:withObject:] + 22
14 AppName 0x0002aa75 -[ASIHTTPRequest reportFinished] + 60
15 CoreFoundation 0x32886f03 -[NSObject(NSObject) performSelector:withObject:] + 22
16 Foundation 0x325707a9 __NSThreadPerformPerform + 268
17 CoreFoundation 0x328f0a79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
18 CoreFoundation 0x328f275f __CFRunLoopDoSources0 + 382
19 CoreFoundation 0x328f34eb __CFRunLoopRun + 230
20 CoreFoundation 0x32883ec3 CFRunLoopRunSpecific + 230
21 CoreFoundation 0x32883dcb CFRunLoopRunInMode + 58
22 GraphicsServices 0x30b2b41f GSEventRunModal + 114
23 GraphicsServices 0x30b2b4cb GSEventRun + 62
24 UIKit 0x35af9d69 -[UIApplication _run] + 404
25 UIKit 0x35af7807 UIApplicationMain + 670
26 AppName 0x00002ae1 main + 48
27 AppName 0x00002aac start + 40
)
This had to do with forgetting to add some required built variables to my project that the Three20 libraries use. I didn't notice it because you can't run App Store release builds locally.