In viewDidLoad I have only 2 strings:
MKMapView *mapViewMy = [[MKMapView alloc]init];
[self.view addSubview:mapViewMy];
And the app crashed on "[self.view addSubview:mapViewMy]". I use iOS7. It crashes both on devices and simulators. When I use simulator I have crash report:
2013-11-06 13:34:15.948 MyBex JAPanel[36286:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x0216c5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01eef8b6 objc_exception_throw + 44
2 CoreFoundation 0x0211ebcc -[__NSArrayM insertObject:atIndex:] + 844
3 CoreFoundation 0x0211e870 -[__NSArrayM addObject:] + 64
4 UIKit 0x01190b67 PushNextClassForSettingIMP + 358
5 UIKit 0x0118905e TaggingAppearanceObjectSetterIMP + 43
6 UIKit 0x00d6d8de -[UIViewController _setUpLayoutGuideConstraintIfNecessaryAtTop:] + 424
7 UIKit 0x00d6c1c3 -[UIViewController topLayoutGuide] + 140
8 MapKit 0x023d16a8 -[MKMapView updateLayoutGuides] + 82
9 MapKit 0x023d17e7 -[MKMapView didMoveToSuperview] + 68
10 UIKit 0x00cba636 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 472
11 UIKit 0x00cba388 -[UIView(Hierarchy) _postMovedFromSuperview:] + 260
12 UIKit 0x00cc54c1 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1847
13 UIKit 0x00cb89b1 -[UIView(Hierarchy) addSubview:] + 56
14 UIKit 0x01189077 TaggingAppearanceObjectSetterIMP + 68
15 MyBex JAPanel 0x0001180e -[MapViewController configureView] + 142
16 MyBex JAPanel 0x00011778 -[MapViewController viewDidLoad] + 88
17 UIKit 0x00d71318 -[UIViewController loadViewIfRequired] + 696
18 UIKit 0x00d96b15 -[UINavigationController _layoutViewController:] + 39
19 UIKit 0x00d9702b -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235
20 UIKit 0x00d97123 -[UINavigationController _startTransition:fromViewController:toViewController:] + 78
21 UIKit 0x00d9809c -[UINavigationController _startDeferredTransitionIfNeeded:] + 645
22 UIKit 0x00d98cb9 -[UINavigationController __viewWillLayoutSubviews] + 57
23 UIKit 0x00ed2181 -[UILayoutContainerView layoutSubviews] + 213
24 UIKit 0x00cc8267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
25 libobjc.A.dylib 0x01f0181f -[NSObject performSelector:withObject:] + 70
26 QuartzCore 0x005c82ea -[CALayer layoutSublayers] + 148
27 QuartzCore 0x005bc0d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
28 QuartzCore 0x005bbf40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
29 QuartzCore 0x00523ae6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
30 QuartzCore 0x00524e71 _ZN2CA11Transaction6commitEv + 393
31 QuartzCore 0x005e1430 +[CATransaction flush] + 52
32 UIKit 0x00c79dc9 _afterCACommitHandler + 131
33 CoreFoundation 0x021344ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
34 CoreFoundation 0x0213441f __CFRunLoopDoObservers + 399
35 CoreFoundation 0x02112344 __CFRunLoopRun + 1076
36 CoreFoundation 0x02111ac3 CFRunLoopRunSpecific + 467
37 CoreFoundation 0x021118db CFRunLoopRunInMode + 123
38 GraphicsServices 0x027f29e2 GSEventRunModal + 192
39 GraphicsServices 0x027f2809 GSEventRun + 104
40 UIKit 0x00c5dd3b UIApplicationMain + 1225
41 MyBex JAPanel 0x0003bc0d main + 141
42 libdyld.dylib 0x03423725 start + 0
43 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I checked, both mapViewMy and self.view are not nil.
Its seems like in our viewDidLoad your object is miss referencing
Make sure you have added Framework of MapKit
Import Map Kit & Delegate in your .h file
Try this code :
MKMapView *mapViewMy = [[MKMapView alloc] initWithFrame:self.view.bounds];
mapViewMy.delegate=self;
[self.view addSubview:mapViewMy];
You need to add map kit delegates methods. :)
in .h file
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
//import MKMapkit framwork
#interface mapSampleViewController : UIViewController {
<MKMapViewDelegate>//mapview delegate
{
MKMapView *mapView;
}
in .m file
add this code in viewdidload
mapView= [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
mapView.delegate = self;
[self.view addSubview:mapView];
Related
I am working on UIPageViewController and I make strong for the global instance in properties below code:
UIViewController* aController = someviewController;//(I am getting the aController value)
NSArray* viewControllers = [[NSArray alloc] initWithObjects:aController, nil];
//(I am getting the viewControllers value as well).
[self.pageController setViewControllers:viewControllers
direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
//(I am getting crash here saying [__NSArrayM insertObject:atIndex:]: object cannot be nil').
All the instances are holding the values don't know where viewControllers is becoming nil.
please let me know
0 CoreFoundation 0x0000000105471e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010626ddeb objc_exception_throw + 48
2 CoreFoundation 0x00000001053388c5 -[__NSArrayM insertObject:atIndex:] + 901
3 0x0000000103df0b5e -[MZDashBoardViewController viewDidLoad] + 1470
4 UIKit 0x00000001071fbf98 -[UIViewController loadViewIfRequired] + 1198
5 UIKit 0x00000001071fc2e7 -[UIViewController view] + 27
6 UIKit 0x00000001077d57df -[UIPageViewController _setViewControllers:withScrollInDirection:animated:completion:] + 585
7 UIKit 0x00000001077d59fb -[UIPageViewController setViewControllers:direction:animated:completion:] + 166
8 0x0000000103decba5 -[MZMainDashViewController viewDidLoad] + 2997
9 UIKit 0x00000001071fbf98 -[UIViewController loadViewIfRequired] + 1198
10 UIKit 0x0000000107240651 -[UINavigationController _layoutViewController:] + 54
11 UIKit 0x0000000107240f26 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 462
12 UIKit 0x0000000107241098 -[UINavigationController _startTransition:fromViewController:toViewController:] + 126
13 UIKit 0x00000001072422f1 -[UINavigationController _startDeferredTransitionIfNeeded:] + 890
14 UIKit 0x00000001072433af -[UINavigationController __viewWillLayoutSubviews] + 57
15 UIKit 0x00000001073e9ff7 -[UILayoutContainerView layoutSubviews] + 248
16 UIKit 0x000000010711c4a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
17 QuartzCore 0x0000000106d8359a -[CALayer layoutSublayers] + 146
18 QuartzCore 0x0000000106d77e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
19 QuartzCore 0x0000000106d77cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
20 QuartzCore 0x0000000106d6c475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
21 QuartzCore 0x0000000106d99c0a _ZN2CA11Transaction6commitEv + 486
22 QuartzCore 0x0000000106d9a37c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
23 CoreFoundation 0x000000010539d367 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
24 CoreFoundation 0x000000010539d2d7 __CFRunLoopDoObservers + 391
25 CoreFoundation 0x0000000105392f2b __CFRunLoopRun + 1147
26 CoreFoundation 0x0000000105392828 CFRunLoopRunSpecific + 488
27 GraphicsServices 0x000000010988fad2 GSEventRunModal + 161
28 UIKit 0x0000000107065610 UIApplicationMain + 171
29 0x0000000103dd2d3f main + 111
30 libdyld.dylib 0x00000001086e092d start + 1
31 ??? 0x0000000000000001 0x0 + 1
Clearly you are trying to insert an object into an immutable array, not a mutable array. Somewhere inside viewDidLoad. Remember just because a variable has type NSMutableArray* doesn't mean it is.
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?
I got an crash bug on when tap on More button on tabbar. It just happened on iOS 7.1.
I created a class (MoreTableViewDelegate) which override UITableViewDelegate of More Table View
MoreNavigationController
UIViewController *moreViewController = tabBarController.moreNavigationController.topViewController;
UITableView *moreTableView = (UITableView*)moreViewController.view;
MoreTableViewDelegate *objMoreDelegate=[[MoreTableViewDelegate alloc]initWithDelegate:moreTableView.delegate];
moreTableView.delegate=objMoreDelegate;
This is the detail of MoreTableViewDelegate:
-(MoreTableViewDelegate *) initWithDelegate:(id<UITableViewDelegate>) delegate
{
originalDelegate=delegate;
[super init];
return self;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(isPoweredByMobicart==YES)
{
return 50;
}
else
{
return 60;
}
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
return [originalDelegate tableView:tableView didSelectRowAtIndexPath:indexPath];
}
But when I tap on the More button at tab bar, it's crashed and this is the log:
-[MoreTableViewDelegate _layoutCells]: unrecognized selector sent to instance 0xce7f300
2014-03-25 11:03:12.360 ForeverInt[961:90b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MoreTableViewDelegate _layoutCells]: unrecognized selector sent to instance 0xce7f300'
*** First throw call stack:
(
0 CoreFoundation 0x0336b1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02ee18e5 objc_exception_throw + 44
2 CoreFoundation 0x03408243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0335b50b ___forwarding___ + 1019
4 CoreFoundation 0x0335b0ee _CF_forwarding_prep_0 + 14
5 UIKit 0x00bcc785 -[_UIMoreListTableView didMoveToWindow] + 108
6 UIKit 0x00adb478 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1642
7 UIKit 0x00aed68b -[UIScrollView _didMoveFromWindow:toWindow:] + 65
8 UIKit 0x00adb109 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 763
9 UIKit 0x00ad296f __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 158
10 UIKit 0x00ad27fb -[UIView(Hierarchy) _postMovedFromSuperview:] + 260
11 UIKit 0x00adddd4 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1875
12 UIKit 0x00ad0dba -[UIView(Hierarchy) addSubview:] + 56
13 UIKit 0x00db6c5b -[UINavigationTransitionView transition:fromView:toView:] + 501
14 UIKit 0x00db6a5e -[UINavigationTransitionView transition:toView:] + 55
15 UIKit 0x00bb7577 -[UINavigationController _startTransition:fromViewController:toViewController:] + 3186
16 UIKit 0x00bb78cc -[UINavigationController _startDeferredTransitionIfNeeded:] + 645
17 UIKit 0x00bb84e9 -[UINavigationController __viewWillLayoutSubviews] + 57
18 UIKit 0x00cf90d1 -[UILayoutContainerView layoutSubviews] + 213
19 UIKit 0x00ae0964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
20 libobjc.A.dylib 0x02ef382b -[NSObject performSelector:withObject:] + 70
21 QuartzCore 0x01d9d45a -[CALayer layoutSublayers] + 148
22 QuartzCore 0x01d91244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
23 QuartzCore 0x01d910b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
24 QuartzCore 0x01cf77fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
25 QuartzCore 0x01cf8b85 _ZN2CA11Transaction6commitEv + 393
26 QuartzCore 0x01db65b0 +[CATransaction flush] + 52
27 UIKit 0x00a6f9bb _UIApplicationHandleEventQueue + 13095
28 CoreFoundation 0x032f477f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
29 CoreFoundation 0x032f410b __CFRunLoopDoSources0 + 235
30 CoreFoundation 0x033111ae __CFRunLoopRun + 910
31 CoreFoundation 0x033109d3 CFRunLoopRunSpecific + 467
32 CoreFoundation 0x033107eb CFRunLoopRunInMode + 123
33 GraphicsServices 0x035c85ee GSEventRunModal + 192
34 GraphicsServices 0x035c842b GSEventRun + 104
35 UIKit 0x00a71f9b UIApplicationMain + 1225
36 ForeverInt 0x00086b9d main + 125
37 ForeverInt 0x000030d5 start + 53
)
libc++abi.dylib: terminating with uncaught exception of type NSException
How to solve this issue ? Please help me.