In my iOS app, I am using both Swift and Obj-c with an external library but for some reason I am getting a crash when the library adds a subview.
[view addSubview:self];
The stacktrace is as follows, which is quite hard to track the error as its not near the top(i think).
*** Terminating app due to uncaught exception 'NSRangeException', reason:
'*** -[__NSArrayM objectAtIndex:]: index 4 beyond bounds [0 .. 1]'
*** First throw call stack:
(
0 CoreFoundation 0x000000010913ac65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108dd3bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000109024093 -[__NSArrayM objectAtIndex:] + 227
3 UIKit 0x0000000106fa1881 _UIViewTopDownSubtreeTraversal + 193
4 UIKit 0x00000001075c2fa3 -[UIView(UIConstraintBasedLayout_EngineDelegate) _invalidateSystemLayoutSizeFittingSizeAtEngineDelegateLevel] + 141
5 Foundation 0x00000001065e4d6f -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 915
6 Foundation 0x000000010676f1e8 -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 275
7 Foundation 0x00000001065d949a -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 220
8 UIKit 0x00000001075bfa34 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 474
9 Foundation 0x00000001065e71be -[NSISEngine withBehaviors:performModifications:] + 155
10 UIKit 0x00000001075bf83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
11 UIKit 0x00000001075bf64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
12 UIKit 0x00000001075bf933 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 217
13 Foundation 0x00000001065e71be -[NSISEngine withBehaviors:performModifications:] + 155
14 UIKit 0x00000001075bf83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
15 UIKit 0x00000001075bf64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
16 UIKit 0x00000001075bf2de -[UIView(AdditionalLayoutSupport) _initializeHostedLayoutEngine] + 404
17 UIKit 0x00000001075b426e -[UIView(UIConstraintBasedLayout) _layoutEngine_windowDidChange] + 126
18 UIKit 0x0000000106fbf561 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 209
19 UIKit 0x0000000106fb7ecf __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 125
20 UIKit 0x0000000106fb7e43 -[UIView(Hierarchy) _postMovedFromSuperview:] + 437
21 UIKit 0x0000000106fc1f48 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1660
22 UIKit 0x0000000106f3765a -[_UIParallaxDimmingView didMoveToWindow] + 123
23 UIKit 0x0000000106fbfa68 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1496
24 UIKit 0x0000000106fbf74a -[UIView(Internal) _didMoveFromWindow:toWindow:] + 698
25 UIKit 0x0000000106fb7ecf __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 125
26 UIKit 0x0000000106fb7e43 -[UIView(Hierarchy) _postMovedFromSuperview:] + 437
27 UIKit 0x0000000106fc1f48 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1660
28 UIKit 0x0000000106f33f08 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 2101
29 UIKit 0x0000000106fbc68e +[UIView(Animation) performWithoutAnimation:] + 65
30 UIKit 0x0000000106f33342 -[_UINavigationParallaxTransition animateTransition:] + 1225
31 UIKit 0x000000010709abfc -[UINavigationController _startCustomTransition:] + 3038
32 UIKit 0x00000001070a63bf -[UINavigationController _startDeferredTransitionIfNeeded:] + 386
33 UIKit 0x00000001070a6f0e -[UINavigationController __viewWillLayoutSubviews] + 43
34 UIKit 0x00000001071f1715 -[UILayoutContainerView layoutSubviews] + 202
35 UIKit 0x0000000106fc4a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
36 QuartzCore 0x00000001087e3ec2 -[CALayer layoutSublayers] + 146
37 QuartzCore 0x00000001087d86d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
38 QuartzCore 0x00000001087d8546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
39 QuartzCore 0x0000000108744886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
40 QuartzCore 0x0000000108745a3a _ZN2CA11Transaction6commitEv + 462
41 QuartzCore 0x00000001087460eb _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
42 CoreFoundation 0x000000010906dca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
43 CoreFoundation 0x000000010906dc00 __CFRunLoopDoObservers + 368
44 CoreFoundation 0x0000000109063a33 __CFRunLoopRun + 1123
45 CoreFoundation 0x0000000109063366 CFRunLoopRunSpecific + 470
46 GraphicsServices 0x000000010b1bfa3e GSEventRunModal + 161
47 UIKit 0x0000000106f44900 UIApplicationMain + 1282
48 HedgeEm 0x0000000104f1cfdf main + 111
49 libdyld.dylib 0x0000000109cff145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
My first thoughts were to look for anything that was using an array, but in my code there wasnt anything, I think its related to iOS adding the subview but failing.
Further investigation, the same implementation works in ios 7, I know its related to a possible constraint issue - maybe the compile time constraints that get added. I guess this serves me right for using an old library.
I was using the EAIntroView library EAIntroView - GitHub
It turns out that there is a problem with the library and the latest version causes a crash in iOS 8, GitHub - crash discussion So the solution is to downgrade to 2.6 and it works fine.
Related
I have a view,which consists a UIScrollView on which subviews would added in viewDidLoad after adding all subviews & after the execution of all custom methods it goes to viewWillappear,after that it crashes with the following traces:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString CIImage]: unrecognized selector sent to instance 0x7db5bb80'
*** First throw call stack:
(
0 CoreFoundation 0x04614946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x0429da97 objc_exception_throw + 44
2 CoreFoundation 0x0461c5c5 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x045653e7 ___forwarding___ + 1047
4 CoreFoundation 0x04564fae _CF_forwarding_prep_0 + 14
5 UIKit 0x02b589f1 -[UIImageView _shouldDrawImage:] + 33
6 UIKit 0x02b58aa2 -[UIImageView _canDrawContent] + 164
7 UIKit 0x02a2f750 -[UIView(Internal) _shouldInheritScreenScaleAsContentScaleFactor] + 83
8 UIKit 0x02a2f7e9 -[UIView(Internal) _applyScreenScaleToContentScaleFactorIfNotSpecifiedByDeveloper] + 35
9 UIKit 0x02a2f56e -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1628
10 UIKit 0x02b5d762 -[UIImageView _didMoveFromWindow:toWindow:] + 65
11 UIKit 0x02a2f23f -[UIView(Internal) _didMoveFromWindow:toWindow:] + 813
12 UIKit 0x02a423e1 -[UIScrollView _didMoveFromWindow:toWindow:] + 65
13 UIKit 0x02a2f23f -[UIView(Internal) _didMoveFromWindow:toWindow:] + 813
14 UIKit 0x02a2f23f -[UIView(Internal) _didMoveFromWindow:toWindow:] + 813
15 UIKit 0x02a26517 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 154
16 UIKit 0x02a26475 -[UIView(Hierarchy) _postMovedFromSuperview:] + 458
17 UIKit 0x02a31f0d -[UIView(Internal) _addSubview:positioned:relativeTo:] + 2018
18 UIKit 0x02a2486e -[UIView(Hierarchy) addSubview:] + 56
19 UIKit 0x0299d0fa __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 1849
20 UIKit 0x02a2b7af +[UIView(Animation) performWithoutAnimation:] + 82
21 UIKit 0x0299c5a6 -[_UINavigationParallaxTransition animateTransition:] + 1204
22 UIKit 0x02b2b64d -[UINavigationController _startCustomTransition:] + 3765
23 UIKit 0x02b38726 -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
24 UIKit 0x02b39372 -[UINavigationController __viewWillLayoutSubviews] + 57
25 UIKit 0x02cad04c -[UILayoutContainerView layoutSubviews] + 213
26 UIKit 0x02a34dd1 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608
27 libobjc.A.dylib 0x042b3771 -[NSObject performSelector:withObject:] + 70
28 QuartzCore 0x0215928f -[CALayer layoutSublayers] + 152
29 QuartzCore 0x0214d115 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
30 QuartzCore 0x0214cf70 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
31 QuartzCore 0x020ab3c6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
32 QuartzCore 0x020ac78c _ZN2CA11Transaction6commitEv + 392
33 QuartzCore 0x020ace58 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
34 CoreFoundation 0x045379de __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
35 CoreFoundation 0x04537920 __CFRunLoopDoObservers + 400
36 CoreFoundation 0x0452d35a __CFRunLoopRun + 1226
37 CoreFoundation 0x0452cbcb CFRunLoopRunSpecific + 443
38 CoreFoundation 0x0452c9fb CFRunLoopRunInMode + 123
39 GraphicsServices 0x05e6b24f GSEventRunModal + 192
40 GraphicsServices 0x05e6b08c GSEventRun + 104
41 UIKit 0x029a98b6 UIApplicationMain + 1526
42 POPCorn 0x000e9472 main + 130
43 libdyld.dylib 0x06193ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString CIImage]: unrecognized selector sent to instance 0x7db5bb80'
You're accessing the CIImage property of an NSString (perhaps its id and you just accessed this property thinking that the id object was a UIImage). Search for CIImage in your class and make sure the object you're getting the property from is an actual UIImage.
If you want to find out where the actual line of code that is causing i suggest creating an exception breakpoint. You can do this by going to the breakpoints tab and adding one for all exceptions. This along with the log you should see what you are passing an invalid argument to.
UITableView in view controller. While reload the tableView two times and click cell it crash with different errors. I declare in .h interface.
{
UITableView *tblRestaurantList;
}
// also change to #property (nonatomic, retain)UITableView *tblRestaurantList;
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 0;
}
error reason : -[UITableViewCell tableView:heightForHeaderInSection:]
error reason : [_UIAppearanceCustomizableClassInfo tableView:heightForHeaderInSection:]
Sometime it shows EXC_BAD_ACCESS(code=EXC_i386_GPFLT) or __NSCFArray or [_CTNativeGlyphStorage tableView:heightForHeaderInSection:].(With 40 line error message)
I change the height to 1.0f, 0.0,0.0001f,1;
I don't what happen its run successfully in iOS 7. I saw many questions in StackOverflow but no one post exact answer.
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_CTNativeGlyphStorage tableView:heightForHeaderInSection:]: unrecognized selector sent to instance 0x7fcdf0f1e6a0'
*** First throw call stack:
(
0 CoreFoundation 0x000000011376bf35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000112589bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000011377304d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001136cb27c ___forwarding___ + 988
4 CoreFoundation 0x00000001136cae18 _CF_forwarding_prep_0 + 120
5 UIKit 0x0000000110ce1f4e -[UITableView _delegateWantsHeaderForSection:] + 261
6 UIKit 0x0000000110e66983 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 162
7 UIKit 0x0000000110e6ce45 -[UITableViewRowData rectForFooterInSection:heightCanBeGuessed:] + 320
8 UIKit 0x0000000110e6cf3a -[UITableViewRowData heightForTable] + 56
9 UIKit 0x0000000110cbfaf0 -[UITableView _updateContentSize] + 381
10 UIKit 0x0000000110cdcecd -[UITableView didMoveToWindow] + 65
11 UIKit 0x0000000110c639a0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1482
12 UIKit 0x0000000110c74333 -[UIScrollView _didMoveFromWindow:toWindow:] + 55
13 UIKit 0x0000000110c6368e -[UIView(Internal) _didMoveFromWindow:toWindow:] + 696
14 UIKit 0x0000000110c6368e -[UIView(Internal) _didMoveFromWindow:toWindow:] + 696
15 UIKit 0x0000000110c6368e -[UIView(Internal) _didMoveFromWindow:toWindow:] + 696
16 UIKit 0x0000000110c5c112 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 125
17 UIKit 0x0000000110c5c086 -[UIView(Hierarchy) _postMovedFromSuperview:] + 437
18 UIKit 0x0000000110c65f4b -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1604
19 UIKit 0x0000000110be4bf1 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 2030
20 UIKit 0x0000000110c605ce +[UIView(Animation) performWithoutAnimation:] + 65
21 UIKit 0x0000000110be4072 -[_UINavigationParallaxTransition animateTransition:] + 1225
22 UIKit 0x0000000110d38e6c -[UINavigationController _startCustomTransition:] + 3038
23 UIKit 0x0000000110d443fe -[UINavigationController _startDeferredTransitionIfNeeded:] + 386
24 UIKit 0x0000000110d44f47 -[UINavigationController __viewWillLayoutSubviews] + 43
25 UIKit 0x0000000110e8a509 -[UILayoutContainerView layoutSubviews] + 202
26 UIKit 0x0000000110c68973 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 521
27 QuartzCore 0x0000000110347de8 -[CALayer layoutSublayers] + 150
28 QuartzCore 0x000000011033ca0e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
29 QuartzCore 0x000000011033c87e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
30 QuartzCore 0x00000001102aa63e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
31 QuartzCore 0x00000001102ab74a _ZN2CA11Transaction6commitEv + 390
32 QuartzCore 0x00000001102abdb5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
33 CoreFoundation 0x00000001136a0dc7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
34 CoreFoundation 0x00000001136a0d20 __CFRunLoopDoObservers + 368
35 CoreFoundation 0x0000000113696b53 __CFRunLoopRun + 1123
36 CoreFoundation 0x0000000113696486 CFRunLoopRunSpecific + 470
37 GraphicsServices 0x00000001144d09f0 GSEventRunModal + 161
38 UIKit 0x0000000110bef420 UIApplicationMain + 1282
39 Restaurant 0x000000010f466193 main + 115
40 libdyld.dylib 0x0000000112c10145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I am using OS X Yosemite ver 10.10, xcode Version 6.1 (6A1052d), iPhone simulator iOS 8.1 (12B411).
Thanks in Advance
But why you put 0 in height ??
we can't put 0 here . if you do not want to put height for section, then don't put 0 in height.
This should be some value
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 4; // something like this
}
I'm creating an Ad enabled application, and to the most part its been successful to how I wanted it, however recently my application started crashing with an NSInvalidArgumentException error whenever I start the application, after some serious debugging I've found that the cause of the error is when my ADBannerView delegate is linked to my UITableViewController class. I've implemented the ADBannerViewDelegate to my class so I can't understand what the issue with it is. I'm trying to keep my code as private as possible to avoid my idea to be recreated. So for now I'll be posting the crash log. If any other information is needed I'll post the bare minimum of what has been asked for
2014-07-09 16:48:32.268 <APPLICATION NAME>[3491:589625] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x00ee5646 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x00b878e3 objc_exception_throw + 44
2 CoreFoundation 0x00ddc513 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 451
3 CoreFoundation 0x00df16bb +[NSDictionary dictionaryWithObjects:forKeys:count:] + 75
4 iAd 0x00688cf5 -[ADBannerView setDelegate:] + 161
5 Foundation 0x0077ace8 _NSSetUsingKeyValueSetter + 115
6 Foundation 0x0077ac6d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
7 UIKit 0x0131b034 -[UIView(CALayerDelegate) setValue:forKey:] + 168
8 Foundation 0x007b0166 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 386
9 UIKit 0x015b3589 -[UIRuntimeOutletConnection connect] + 106
10 libobjc.A.dylib 0x00b9a6f4 -[NSObject performSelector:] + 62
11 CoreFoundation 0x00e2041c -[NSArray makeObjectsPerformSelector:] + 316
12 UIKit 0x015b1b8a -[UINib instantiateWithOwner:options:] + 1775
13 UIKit 0x013e074d -[UIViewController _loadViewFromNibNamed:bundle:] + 270
14 UIKit 0x013e0ff4 -[UIViewController loadView] + 295
15 UIKit 0x015d2266 -[UITableViewController loadView] + 77
16 UIKit 0x013e1222 -[UIViewController loadViewIfRequired] + 72
17 UIKit 0x014142bd -[UINavigationController _layoutViewController:] + 42
18 UIKit 0x014147bf -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235
19 UIKit 0x014148c3 -[UINavigationController _startTransition:fromViewController:toViewController:] + 90
20 UIKit 0x0141583a -[UINavigationController _startDeferredTransitionIfNeeded:] + 669
21 UIKit 0x0141645b -[UINavigationController __viewWillLayoutSubviews] + 57
22 UIKit 0x01580c40 -[UILayoutContainerView layoutSubviews] + 213
23 UIKit 0x0131b3dc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 601
24 libobjc.A.dylib 0x00b9a741 -[NSObject performSelector:withObject:] + 70
25 QuartzCore 0x005703e9 -[CALayer layoutSublayers] + 152
26 QuartzCore 0x00564245 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
27 QuartzCore 0x005640a0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
28 QuartzCore 0x004c3836 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
29 QuartzCore 0x004c4bfc _ZN2CA11Transaction6commitEv + 392
30 QuartzCore 0x00589689 +[CATransaction flush] + 52
31 UIKit 0x0129012e -[UIApplication _reportMainSceneUpdateFinished:] + 39
32 UIKit 0x01291023 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3027
33 UIKit 0x012a8eb8 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
34 UIKit 0x0128f77e -[UIApplication workspaceDidEndTransaction:] + 29
35 FrontBoardServices 0x06e43f1f -[FBSWorkspace clientEndTransaction:] + 87
36 FrontBoardServices 0x06e4b4ed __53-[FBSWorkspaceClient _queue_handleTransactionBookEnd]_block_invoke + 49
37 CoreFoundation 0x00e09f90 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
38 CoreFoundation 0x00dff133 __CFRunLoopDoBlocks + 195
39 CoreFoundation 0x00dfe898 __CFRunLoopRun + 936
40 CoreFoundation 0x00dfe22b CFRunLoopRunSpecific + 443
41 CoreFoundation 0x00dfe05b CFRunLoopRunInMode + 123
42 UIKit 0x0128f095 -[UIApplication _run] + 571
43 UIKit 0x012926e5 UIApplicationMain + 1526
44 AppIdeas 0x0001a4ed main + 141
45 libdyld.dylib 0x02ca1ac9 start + 1
46 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Also, I'd like to point out that I'm not using an NSPlaceholderDictionary at all in my program, nor am I using the method initWithObjects:forKeys:count:
Hopefully you guys should be able to help with this, thanks for you help
EDIT: I'd Also like to point out that All my other Pages (Part of a UITabBarController) load the ads fine, with the delegate added like the first page, it only happens on the application launch for the first view to come into focus... Is there something I'm missing?
Can I get helped with the below issue? I'm struck over here. While executing the code I'm getting this log. I couldn't find the solution for it. I tried it for the whole day but couldn't find the solution for it.
2014-05-29 10:34:35.723 Timesheet[14438:60b] -[UITableViewCell setAlternateRowColor:]: unrecognized selector sent to instance 0x8f98a70
2014-05-29 10:34:35.764 Timesheet[14438:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewCell setAlternateRowColor:]: unrecognized selector sent to instance 0x8f98a70'
*** First throw call stack:
(
0 CoreFoundation 0x0180a1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x015898e5 objc_exception_throw + 44
2 CoreFoundation 0x018a7243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x017fa50b ___forwarding___ + 1019
4 CoreFoundation 0x017fa0ee _CF_forwarding_prep_0 + 14
5 Timesheet 0x00002e13 -[ViewController tableView:cellForRowAtIndexPath:] + 691
6 UIKit 0x0034211f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412
7 UIKit 0x003421f3 -[UITableView _createPreparedCellForGlobalRow:] + 69
8 UIKit 0x00323ece -[UITableView _updateVisibleCellsNow:] + 2428
9 UIKit 0x003386a5 -[UITableView layoutSubviews] + 213
10 UIKit 0x002b8964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
11 libobjc.A.dylib 0x0159b82b -[NSObject performSelector:withObject:] + 70
12 QuartzCore 0x03c7545a -[CALayer layoutSublayers] + 148
13 QuartzCore 0x03c69244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
14 QuartzCore 0x03c77885 -[CALayer(CALayerPrivate) layoutBelowIfNeeded] + 43
15 UIKit 0x002ab026 -[UIView(Hierarchy) layoutBelowIfNeeded] + 595
16 UIKit 0x002aadcd -[UIView(Hierarchy) layoutIfNeeded] + 74
17 UIKit 0x0038e744 -[UINavigationController _layoutViewController:] + 1062
18 UIKit 0x0038d966 -[UINavigationController _layoutTopViewController] + 176
19 UIKit 0x0038bb95 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 429
20 UIKit 0x0058f74e -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:] + 328
21 UIKit 0x0058fa53 -[UINavigationTransitionView _cleanupTransition] + 703
22 UIKit 0x0058fa92 -[UINavigationTransitionView _navigationTransitionDidStop] + 55
23 UIKit 0x002996dc -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
24 UIKit 0x00297ec5 +[UIViewAnimationState popAnimationState] + 334
25 UIKit 0x002ad123 +[UIView(Animation) commitAnimations] + 36
26 UIKit 0x0058f551 -[UINavigationTransitionView transition:fromView:toView:] + 2795
27 UIKit 0x0058ea5e -[UINavigationTransitionView transition:toView:] + 55
28 UIKit 0x0038f577 -[UINavigationController _startTransition:fromViewController:toViewController:] + 3186
29 UIKit 0x0038f8cc -[UINavigationController _startDeferredTransitionIfNeeded:] + 645
30 UIKit 0x003904e9 -[UINavigationController __viewWillLayoutSubviews] + 57
31 UIKit 0x004d10d1 -[UILayoutContainerView layoutSubviews] + 213
32 UIKit 0x002b8964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
33 libobjc.A.dylib 0x0159b82b -[NSObject performSelector:withObject:] + 70
34 QuartzCore 0x03c7545a -[CALayer layoutSublayers] + 148
35 QuartzCore 0x03c69244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
36 QuartzCore 0x03c753a5 -[CALayer layoutIfNeeded] + 160
37 UIKit 0x0037aae3 -[UIViewController window:setupWithInterfaceOrientation:] + 304
38 UIKit 0x00290aa7 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 5212
39 UIKit 0x0028f646 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
40 UIKit 0x0028f518 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 117
41 UIKit 0x0028f5a0 -[UIWindow _setRotatableViewOrientation:duration:force:] + 67
42 UIKit 0x0028e63a __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 120
43 UIKit 0x0028e59c -[UIWindow _updateToInterfaceOrientation:duration:force:] + 400
44 UIKit 0x0028f2f3 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 870
45 UIKit 0x002928e6 -[UIWindow setDelegate:] + 449
46 UIKit 0x0036cb77 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 180
47 UIKit 0x00288474 -[UIWindow addRootViewControllerViewIfPossible] + 591
48 UIKit 0x002885ef -[UIWindow _setHidden:forced:] + 312
49 UIKit 0x0028886b -[UIWindow _orderFrontWithoutMakingKey] + 49
50 UIKit 0x002933c8 -[UIWindow makeKeyAndVisible] + 65
51 UIKit 0x00243bc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
52 UIKit 0x00248667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
53 UIKit 0x0025cf92 -[UIApplication handleEvent:withNewEvent:] + 3517
54 UIKit 0x0025d555 -[UIApplication sendEvent:] + 85
55 UIKit 0x0024a250 _UIApplicationHandleEvent + 683
56 GraphicsServices 0x037fff02 _PurpleEventCallback + 776
57 GraphicsServices 0x037ffa0d PurpleEventCallback + 46
58 CoreFoundation 0x01785ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
59 CoreFoundation 0x017859db __CFRunLoopDoSource1 + 523
60 CoreFoundation 0x017b068c __CFRunLoopRun + 2156
61 CoreFoundation 0x017af9d3 CFRunLoopRunSpecific + 467
62 CoreFoundation 0x017af7eb CFRunLoopRunInMode + 123
63 UIKit 0x00247d9c -[UIApplication _run] + 840
64 UIKit 0x00249f9b UIApplicationMain + 1225
65 Timesheet 0x0000b60d main + 141
66 libdyld.dylib 0x01eeb701 start + 1
67 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Have you looked into:
2014-05-29 10:34:35.723 Timesheet[14438:60b] -[UITableViewCell setAlternateRowColor:]
?
setAlternateRowColor is not a valid setter on UITableViewCell. without seeing the code it's difficult to guess what the error might be, but you are using the cell improperly.
Got this crash report while scrolling really fast in a tableview with a lot of data.
NSGenericException Collection <__NSSetM: 0x1688efb0> was mutated while being enumerated.
The tableview uses autolayout in the cells, and by analysing the stack trace I guess that something is wrong with it. Is there a solution to this?
The constraints were added via interface builder and there are no issues with the layout. No warnings or errors in the interface. Maybe the solution would be just to use less data in the tableview, but I want to know if there's a better solution.
CoreFoundation 0x30c46f4b __exceptionPreprocess + 131
libobjc.A.dylib 0x3b0876af objc_exception_throw + 39
CoreFoundation 0x30c46a49 -[NSException name] + 1
Foundation 0x315abb83 -[NSISEngine substituteOutAllOccurencesOfBodyVar:withExpression:] + 439
Foundation 0x315ae80f -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:andDropRow:] + 339
Foundation 0x315ac595 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 237
Foundation 0x315ac0c7 -[NSISEngine optimize] + 175
Foundation 0x315b1ccb -[NSISEngine constraintDidChangeSuchThatMarker:shouldBeReplacedByMarkerPlusDelta:] + 307
Foundation 0x315b1b43 -[NSISEngine tryToChangeConstraintSuchThatMarker:isReplacedByMarkerPlusDelta:undoHandler:] + 423
Foundation 0x315a73f7 -[NSLayoutConstraint _tryToChangeContainerGeometryWithUndoHandler:] + 467
Foundation 0x315a6f95 -[NSLayoutConstraint _setSymbolicConstant:constant:] + 381
UIKit 0x334b2e6b -[UIView(UIConstraintBasedLayout) _autoresizingConstraints_frameDidChange] + 367
UIKit 0x333b6f1f -[UIView(Geometry) setFrame:] + 671
UIKit 0x333d871b -[UIScrollView setFrame:] + 131
UIKit 0x33489a97 -[UITableViewCell setFrame:] + 527
UIKit 0x334ece65 __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 617
UIKit 0x333cb6e5 +[UIView(Animation) performWithoutAnimation:] + 73
UIKit 0x334ecbf9 -[UITableView _configureCellForDisplay:forIndexPath:] + 101
UIKit 0x334eba73 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 435
UIKit 0x33493de7 -[UITableView _updateVisibleCellsNow:] + 1655
UIKit 0x33493699 -[UITableView layoutSubviews] + 185
UIKit 0x333b9da3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 347
QuartzCore 0x33040c6b -[CALayer layoutSublayers] + 143
QuartzCore 0x3303c47b _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 351
QuartzCore 0x3303c30d _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 17
QuartzCore 0x3303bd1f _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 231
QuartzCore 0x3303bb2f _ZN2CA11Transaction6commitEv + 315
QuartzCore 0x33090825 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 517
IOMobileFramebuffer 0x35cbd76d IOMobileFramebufferVsyncNotifyFunc + 105
IOKit 0x31928a75 IODispatchCalloutFromCFMessage + 249
CoreFoundation 0x30c06e21 __CFMachPortPerform + 137
CoreFoundation 0x30c119df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
CoreFoundation 0x30c1197b __CFRunLoopDoSource1 + 347
CoreFoundation 0x30c1014f __CFRunLoopRun + 1399
CoreFoundation 0x30b7ac27 CFRunLoopRunSpecific + 523
CoreFoundation 0x30b7aa0b CFRunLoopRunInMode + 107
GraphicsServices 0x358a1283 GSEventRunModal + 139
UIKit 0x3341e049 UIApplicationMain + 1137
LiveCom 0x000a82c5 main (main.m:16)
libdyld.dylib 0x3b58fab7 start + 3