I am getting abnormal termination (crash) with the App which I am working with when I am changing the device orientation. I am unable to reproduce it so often (it's not happening always when I am rotating, let's say the chance would be some where around 0.01%), but it's a serious problem. I am attaching an important part of a crash report.
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x6563616e
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3233a5b0 objc_msgSend + 16
1 UIKit 0x36297b82 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 1546
2 UIKit 0x3628301e -[UITableViewRowData rectForFooterInSection:] + 310
3 UIKit 0x3628358c -[UITableViewRowData heightForTable] + 48
4 UIKit 0x36283400 -[UITableView(_UITableViewPrivate) _updateContentSize] + 324
5 UIKit 0x362cc8b4 -[UITableView _rectChangedWithNewSize:oldSize:] + 252
6 UIKit 0x362cc544 -[UITableView setFrame:] + 220
7 UIKit 0x362c59c4 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 644
8 UIKit 0x362c572e -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 262
9 UIKit 0x3644eb2a -[UIScrollView _resizeWithOldSuperviewSize:] + 38
10 CoreFoundation 0x35b63aec __NSArrayChunkIterate + 360
11 CoreFoundation 0x35b5ca74 __NSArrayEnumerate + 608
12 CoreFoundation 0x35abeb66 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 58
13 UIKit 0x3627e09e -[UIView(Geometry) resizeSubviewsWithOldSize:] + 114
14 UIKit 0x36263ba2 -[UIView(Geometry) setFrame:] + 414
15 UIKit 0x362c59c4 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 644
16 UIKit 0x362c572e -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 262
17 CoreFoundation 0x35b63aec __NSArrayChunkIterate + 360
18 CoreFoundation 0x35b5ca74 __NSArrayEnumerate + 608
19 CoreFoundation 0x35abeb66 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 58
20 UIKit 0x3627e09e -[UIView(Geometry) resizeSubviewsWithOldSize:] + 114
21 UIKit 0x36263ba2 -[UIView(Geometry) setFrame:] + 414
22 UIKit 0x362a6dc0 -[UIViewControllerWrapperView setFrame:] + 48
23 UIKit 0x362c59c4 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 644
24 UIKit 0x362c572e -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 262
25 CoreFoundation 0x35b63aec __NSArrayChunkIterate + 360
26 CoreFoundation 0x35b5ca74 __NSArrayEnumerate + 608
27 CoreFoundation 0x35abeb66 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 58
28 UIKit 0x3627e09e -[UIView(Geometry) resizeSubviewsWithOldSize:] + 114
29 UIKit 0x36263ba2 -[UIView(Geometry) setFrame:] + 414
30 UIKit 0x362c59c4 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 644
31 UIKit 0x362c572e -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 262
32 CoreFoundation 0x35b63aec __NSArrayChunkIterate + 360
33 CoreFoundation 0x35b5ca74 __NSArrayEnumerate + 608
34 CoreFoundation 0x35abeb66 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 58
35 UIKit 0x3627e09e -[UIView(Geometry) resizeSubviewsWithOldSize:] + 114
36 UIKit 0x362c64ae -[UIView(Geometry) setBounds:] + 430
37 UIKit 0x3634ff32 -[UILayoutContainerView setBounds:] + 58
38 UIKit 0x363edd88 -[UIViewController window:willAnimateRotationToInterfaceOrientation:duration:] + 460
39 UIKit 0x3630e2b0 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 3616
40 UIKit 0x3630d482 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 42
41 UIKit 0x3630d40c -[UIWindow _setRotatableViewOrientation:duration:force:] + 64
42 UIKit 0x3644317c __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke_0 + 100
43 UIKit 0x362cb676 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 214
44 UIKit 0x362d4d20 -[UIWindow _updateInterfaceOrientationFromDeviceOrientation:] + 176
45 CoreFoundation 0x35ab9034 _CFXNotificationPost + 1424
46 Foundation 0x3721bd8c -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
47 UIKit 0x36268c60 -[UIDevice setOrientation:animated:] + 292
48 UIKit 0x362633d6 -[UIApplication handleEvent:withNewEvent:] + 2954
49 UIKit 0x362626c8 -[UIApplication sendEvent:] + 68
50 UIKit 0x36262116 _UIApplicationHandleEvent + 6150
51 GraphicsServices 0x318885a0 _PurpleEventCallback + 588
52 GraphicsServices 0x318881ce PurpleEventCallback + 30
53 CoreFoundation 0x35b3d170 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
54 CoreFoundation 0x35b3d112 __CFRunLoopDoSource1 + 134
55 CoreFoundation 0x35b3bf94 __CFRunLoopRun + 1380
56 CoreFoundation 0x35aaeeb8 CFRunLoopRunSpecific + 352
57 CoreFoundation 0x35aaed44 CFRunLoopRunInMode + 100
58 GraphicsServices 0x318872e6 GSEventRunModal + 70
59 UIKit 0x362b62f4 UIApplicationMain + 1116
Neither thread activities are involved nor ViewControllers are customized. Moreover, I am using ARC.
I would like to know either the exact cause of reason or the possibilities which would lead to a crash while autorotation is taking place.
Thanks in advance...
I think app sends a message to an deallocated object. Yes, sometimes it happens even if when you use ARC. To debug it you need to run your app with Instruments (Zombies) and try to reproduce the bug.
Enabling Zombies and debugging the App with Instruments (Zombies) has really helped to locate the error. But to fix the bug or avoid the same mistake in the future is really important.
In my code, I had an implementation something like this...
- (void)someMethod {
[self.navigationController pushViewController:[DestinationViewController new] animated:YES];
}
there we are not holding the DestinationViewController's strong reference directly. But the change...
#property (strong, nonatomic) DestinationViewController *dvc;
// ....
- (void)someMethod {
self.dvc = [DestinationViewController new];
[self.navigationController pushViewController:self.dvc animated:YES];
}
has helped to avoid the bug. I can't really explane why...??? but I hope changing the device orientation releses DestinationViewController but which can be avoided by holding the strong reference.
Related
I have this app in the app store, which according to Crashalitics, its %92-%95 stable. I made a similar app for Android and its around 98% stable. I am trying to get the stability up - but I don't see how. All the bugs I am seeing in the IOS version are not touching my code.
I see random bugs, that are not reproducible, and when they do are very random. Each happens 1-10 times, but I have a list of ... ~30 different items.
The app is pretty simple - a mostly linear storyboard (a few jumps, but no loops). The only project I am using which is not Apple's code is InAppSettingsKit, and most of the app is just maps which shows some items. The project is using ARC and currently compiled using XCode6 (but XCode5 showed the same symptoms).
How can I find these crashes? Is this in an inherent problem of IOS7-8? I do see some apps just closing up when I use the IPhone, and friends to tell me that IOS is not that stable, but ... I just think I am doing something wrong.
IOS8 70% IOS7 30%
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x36444f66 objc_msgSend + 5
1 UIKit 0x2c160b35 -[UIScrollView(UIScrollViewInternal) _delegateScrollViewAnimationEnded] + 52
2 UIKit 0x2c160ac1 -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded:finished:] + 184
3 UIKit 0x2c20a5e5 -[UIAnimator stopAnimation:] + 476
4 UIKit 0x2c209fb9 -[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 304
5 UIKit 0x2c209e85 -[UIAnimator(Static) _LCDHeartbeatCallback:] + 52
6 QuartzCore 0x2bae4aeb CA::Display::DisplayLinkItem::dispatch() + 98
7 QuartzCore 0x2bae4953 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 366
8 IOMobileFramebuffer 0x303c482f IOMobileFramebufferVsyncNotifyFunc + 90
9 IOKit 0x29af01ed IODispatchCalloutFromCFMessage + 256
10 CoreFoundation 0x28b7c3a5 __CFMachPortPerform + 132
11 CoreFoundation 0x28b8c7f3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
12 CoreFoundation 0x28b8c78f __CFRunLoopDoSource1 + 346
13 CoreFoundation 0x28b8adb1 __CFRunLoopRun + 1608
14 CoreFoundation 0x28ad7b31 CFRunLoopRunSpecific + 476
15 CoreFoundation 0x28ad7943 CFRunLoopRunInMode + 106
16 GraphicsServices 0x2feb7051 GSEventRunModal + 136
17 UIKit 0x2c0cd6f1 UIApplicationMain + 1440
18 --------------- 0x000c8833 main (main.m:16)
IOS7 - 8 times
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x2e23ef83 __exceptionPreprocess + 130
1 libobjc.A.dylib 0x389efccf objc_exception_throw + 38
2 CoreFoundation 0x2e242917 -[NSObject(NSObject) doesNotRecognizeSelector:] + 202
3 CoreFoundation 0x2e241203 ___forwarding___ + 706
4 CoreFoundation 0x2e190768 _CF_forwarding_prep_0 + 24
5 VectorKit 0x35ec6911 -[VKMapCanvas initShouldRasterize:contentScale:inBackground:] + 476
6 VectorKit 0x35ec620f -[VKMapView initWithGlobe:shouldRasterize:inBackground:] + 230
7 MapKit 0x2f3d980b -[MKBasicMapView initWithFrame:andGlobe:shouldRasterize:] + 322
8 MapKit 0x2f40cd77 -[MKMapView _commonInitAndEnableLoading:fromIB:gestureRecognizerHostView:showsAttribution:] + 878
9 MapKit 0x2f40d86b -[MKMapView initWithCoder:] + 134
10 UIKit 0x30e70169 UINibDecoderDecodeObjectForValue + 740
11 UIKit 0x30e6fe7f -[UINibDecoder decodeObjectForKey:] + 90
12 UIKit 0x30dcb5ff -[UIRuntimeConnection initWithCoder:] + 150
13 UIKit 0x30e70169 UINibDecoderDecodeObjectForValue + 740
14 UIKit 0x30e70109 UINibDecoderDecodeObjectForValue + 644
15 UIKit 0x30e6fe7f -[UINibDecoder decodeObjectForKey:] + 90
16 UIKit 0x30dcadd1 -[UINib instantiateWithOwner:options:] + 888
17 UIKit 0x30d2360b -[UIViewController _loadViewFromNibNamed:bundle:] + 234
18 UIKit 0x30b7fbcd -[UIViewController loadView] + 92
19 UIKit 0x30a602ed -[UIViewController loadViewIfRequired] + 72
20 UIKit 0x30a60269 -[UIViewController view] + 24
21 UIKit 0x30b0a14b -[UINavigationController _startTransition:fromViewController:toViewController:] + 198
22 UIKit 0x30b09dfd -[UINavigationController _startDeferredTransitionIfNeeded:] + 572
23 UIKit 0x30b09b6d -[UINavigationController __viewWillLayoutSubviews] + 44
24 UIKit 0x30b09b05 -[UILayoutContainerView layoutSubviews] + 184
25 UIKit 0x30a5bd59 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 380
26 QuartzCore 0x306d962b -[CALayer layoutSublayers] + 142
27 QuartzCore 0x306d4e3b CA::Layer::layout_if_needed(CA::Transaction*) + 350
28 QuartzCore 0x30703cdd -[CALayer layoutIfNeeded] + 140
29 UIKit 0x30ad8163 -[UIViewController window:setupWithInterfaceOrientation:] + 242
30 UIKit 0x30ad6783 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 3498
31 UIKit 0x30ad59d3 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 46
32 UIKit 0x30ad595b -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 94
33 UIKit 0x30ad58f3 -[UIWindow _setRotatableViewOrientation:duration:force:] + 42
34 UIKit 0x30acdf69 __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 108
35 UIKit 0x30a62107 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 382
36 UIKit 0x30ad5641 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 696
37 UIKit 0x30ad5105 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 164
38 UIKit 0x30a67045 -[UIWindow addRootViewControllerViewIfPossible] + 460
39 UIKit 0x30a64827 -[UIWindow _setHidden:forced:] + 302
40 UIKit 0x30ace33d -[UIWindow makeKeyAndVisible] + 60
41 UIKit 0x30acafad -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1820
42 UIKit 0x30ac556b -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 714
43 UIKit 0x30a616e9 -[UIApplication handleEvent:withNewEvent:] + 3540
44 UIKit 0x30a60851 -[UIApplication sendEvent:] + 72
45 UIKit 0x30ac4ca9 _UIApplicationHandleEvent + 616
46 GraphicsServices 0x33079aed _PurpleEventCallback + 608
47 GraphicsServices 0x330796d7 PurpleEventCallback + 34
48 CoreFoundation 0x2e209a67 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
49 CoreFoundation 0x2e209a03 __CFRunLoopDoSource1 + 346
50 CoreFoundation 0x2e2081d7 __CFRunLoopRun + 1398
51 CoreFoundation 0x2e172ebf CFRunLoopRunSpecific + 522
52 CoreFoundation 0x2e172ca3 CFRunLoopRunInMode + 106
53 UIKit 0x30ac3ed1 -[UIApplication _run] + 760
54 UIKit 0x30abf14d UIApplicationMain + 1136
55 --------------- 0x000ef833 main (main.m:16)
56 libdyld.dylib 0x38efcab7 start + 2
Another (IOS 6.1.6)
vThread : Fatal Exception: NSGenericException
0 CoreFoundation 0x31eaf2a3 __exceptionPreprocess + 162
1 libobjc.A.dylib 0x39b0b97f objc_exception_throw + 30
2 UIKit 0x3404d30f -[UIStoryboardPushSegue perform] + 1118
3 UIKit 0x33da20c5 -[UIApplication sendAction:to:from:forEvent:] + 72
4 UIKit 0x33da214d -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 120
5 UIKit 0x33da20c5 -[UIApplication sendAction:to:from:forEvent:] + 72
6 UIKit 0x33da2077 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
7 UIKit 0x33da2055 -[UIControl sendAction:to:forEvent:] + 44
8 UIKit 0x33da190b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 502
9 UIKit 0x33da1e01 -[UIControl touchesEnded:withEvent:] + 488
10 UIKit 0x33cca5f1 -[UIWindow _sendTouchesForEvent:] + 524
11 UIKit 0x33cb7801 -[UIApplication sendEvent:] + 380
12 UIKit 0x33cb711b _UIApplicationHandleEvent + 6154
13 GraphicsServices 0x359735a3 _PurpleEventCallback + 590
14 GraphicsServices 0x359731d3 PurpleEventCallback + 34
15 CoreFoundation 0x31e84173 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
16 CoreFoundation 0x31e84117 __CFRunLoopDoSource1 + 138
17 CoreFoundation 0x31e82f99 __CFRunLoopRun + 1384
18 CoreFoundation 0x31df5ebd CFRunLoopRunSpecific + 356
19 CoreFoundation 0x31df5d49 CFRunLoopRunInMode + 104
20 GraphicsServices 0x359722eb GSEventRunModal + 74
21 UIKit 0x33d0b301 UIApplicationMain + 1120
22 --------------- 0x00116833 main (main.m:16)
23 libdyld.dylib 0x39f42b20 start
I am seeing new crashes specific to app running on iOS 8. Couldn't figure out what the issue is, couldn't reproduce the issue. Happens at App StartUp, and App doesn't call OpenGL ES functions directly.
InitialViewController viewDidAppear method line # 92 I initiate a segue from storyboard by: [self performSegueWithIdentifier:segueIdentifier sender:self]; where self is InitialViewController class.
Stacktrace:
Thread: Unknown Name (Crashed)
0 libGPUSupportMercury.dylib 0x28c5c8fe gpus_ReturnNotPermittedKillClient + 10
1 libGPUSupportMercury.dylib 0x28c5d249 gldCreateContext + 206
2 GLEngine 0x248a093b gliCreateContextWithShared + 600
3 OpenGLES 0x2497cab3 -[EAGLContext initWithAPI:properties:] + 404
4 CoreImage 0x225ecb8b ___ZN2CI11can_use_gpuEv_block_invoke + 140
5 libdispatch.dylib 0x2fbb98b7 _dispatch_client_callout + 20
6 libdispatch.dylib 0x2fbba4fb dispatch_once_f + 60
7 CoreImage 0x225ecafb _ZN2CI11can_use_gpuEv + 96
8 CoreImage 0x2256ac79 +[CIContext contextWithOptions:] + 186
9 CoreUI 0x27bdc837 CreateSharedCIContext + 76
10 libsystem_pthread.dylib 0x2fd1ddcf __pthread_once_handler + 48
11 libsystem_platform.dylib 0x2fd16867 _os_once + 40
12 libsystem_pthread.dylib 0x2fd1bf8b pthread_once + 48
13 CoreUI 0x27bdc7d9 +[CUIShapeEffectStack sharedCIContext] + 26
14 CoreUI 0x27be3af7 -[CUICatalog imageByStylingImage:stylePresetName:styleConfiguration:foregroundColor:scale:] + 80
15 UIKit 0x256c89db -[UIImage _imageWithStylePresets:withTintColor:] + 540
16 UIKit 0x25456875 -[UIImageView _setImageViewContents:] + 1074
17 UIKit 0x25455fb5 +[UIView(Animation) performWithoutAnimation:] + 70
18 UIKit 0x25747db9 -[UIImageView _updateImageViewForOldImage:newImage:] + 674
19 UIKit 0x254559c7 -[UIImageView setImage:] + 264
20 UIKit 0x254f01b1 -[UINavigationBar _updateBackIndicatorImage] + 346
21 UIKit 0x254d4143 -[UINavigationBar layoutSubviews] + 2480
22 UIKit 0x25446b37 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 512
23 QuartzCore 0x24e6eccd -[CALayer layoutSublayers] + 134
24 QuartzCore 0x24e6a6b5 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 358
25 UIKit 0x25459183 -[UIView(Hierarchy) layoutBelowIfNeeded] + 136
26 UIKit 0x25455fb5 +[UIView(Animation) performWithoutAnimation:] + 70
27 UIKit 0x254d2fc5 -[UINavigationController _positionNavigationBarHidden:edge:initialOffset:] + 786
28 UIKit 0x254d2c63 -[UINavigationController _positionNavigationBarHidden:edge:] + 200
29 UIKit 0x254cf875 -[UINavigationController loadView] + 246
30 UIKit 0x254493d9 -[UIViewController loadViewIfRequired] + 66
31 UIKit 0x2544935d -[UIViewController view] + 22
32 UIKit 0x254f1faf -[UIViewController shouldAutorotate] + 24
33 UIKit 0x2552bbd7 -[UIViewController _preferredInterfaceOrientationForPresentationInWindow:fromInterfaceOrientation:] + 248
34 UIKit 0x2552a2b9 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:] + 2118
35 UIKit 0x2572be1f -[UIViewController _windowControllerBasedPresentViewController:withTransition:completion:] + 4896
36 UIKit 0x2572c4ab __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 256
37 UIKit 0x25529243 -[UIViewController presentViewController:animated:completion:] + 192
38 UIKit 0x2572c63f -[UIViewController presentModalViewController:animated:] + 28
39 MyAppName 0x00082901 -[InitialViewController viewDidAppear:] (InitialViewController.m:92)
40 UIKit 0x2545ed5f -[UIViewController _setViewAppearState:isAnimating:] + 500
41 UIKit 0x254c322f -[UIViewController _executeAfterAppearanceBlock] + 52
42 UIKit 0x254c31bd _applyBlockToCFArrayCopiedToStack + 306
43 UIKit 0x2543f127 _afterCACommitHandler + 484
44 CoreFoundation 0x21f725cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
45 CoreFoundation 0x21f6fc8b __CFRunLoopDoObservers + 276
46 CoreFoundation 0x21f70093 __CFRunLoopRun + 912
47 CoreFoundation 0x21ebe621 CFRunLoopRunSpecific + 474
48 CoreFoundation 0x21ebe433 CFRunLoopRunInMode + 104
49 GraphicsServices 0x2926c0a9 GSEventRunModal + 134
50 UIKit 0x254a8809 UIApplicationMain + 1438
51 MyAppName 0x00074329 main (main.m:36)
52 libdyld.dylib 0x2fbd9aaf start + 0
Can someone please help me find what the root cause for this issue is.
Application will be terminated if it attempts to execute OpenGL ES commands in the background.
https://developer.apple.com/library/ios/qa/qa1766/_index.html
This app was released sevearl months ago and worked perfectly in iOS 4/5. Now getting crashes in some screens in iOS 6.
Fairly easy implementation. Have an AdBannerView in a xib. I wired it to the delagate. Have my delagate methods showing/hiding the ads. Here's the crash data.
Exception Type: EXC_CRASH (SIGABRT)
Last Exception Backtrace:
0 CoreFoundation 0x36d9b29e __exceptionPreprocess + 158
1 libobjc.A.dylib 0x350ab97a objc_exception_throw + 26
2 CoreFoundation 0x36cec55a -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 130
3 CoreFoundation 0x36d230ce +[NSDictionary dictionaryWithObjects:forKeys:count:] + 46
4 iAd 0x3594c23e -[ADBannerView setDelegate:] + 126
5 Foundation 0x347b49cc -[NSObject(NSKeyValueCoding) setValue:forKey:] + 208
6 UIKit 0x382101dc -[UIView(CALayerDelegate) setValue:forKey:] + 156
7 Foundation 0x347b071e -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 294
8 CoreFoundation 0x36d21616 -[NSArray makeObjectsPerformSelector:] + 174
9 UIKit 0x38209240 -[UINib instantiateWithOwner:options:] + 1036
10 UIKit 0x38208abe -[UIViewController _loadViewFromNibNamed:bundle:] + 230
11 UIKit 0x38101020 -[UIViewController loadView] + 88
12 UIKit 0x3808b468 -[UIViewController loadViewIfRequired] + 64
13 UIKit 0x380e0136 -[UIViewController contentScrollView] + 22
14 UIKit 0x380e007c -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 24
15 UIKit 0x380dff60 -[UINavigationController _layoutViewController:] + 28
16 UIKit 0x380dfe84 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 268
17 UIKit 0x380df5c4 -[UINavigationController _startTransition:fromViewController:toViewController:] + 60
18 UIKit 0x380df4ac -[UINavigationController _startDeferredTransitionIfNeeded:] + 320
19 UIKit 0x380cdb8e -[UINavigationController pushViewController:transition:forceImmediate:] + 854
20 UIKit 0x380cd82e -[UINavigationController pushViewController:animated:] + 34
21 Hurricane 0x00002d9a -[TrackerViewController buttonPressed:] (TrackerViewController.m:111)
22 UIKit 0x381570a8 -[UIApplication sendAction:to:from:forEvent:] + 68
23 UIKit 0x3815705a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
24 UIKit 0x38157038 -[UIControl sendAction:to:forEvent:] + 40
25 UIKit 0x381568ee -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 498
26 UIKit 0x38156de4 -[UIControl touchesEnded:withEvent:] + 484
27 UIKit 0x3807f5f4 -[UIWindow _sendTouchesForEvent:] + 520
28 UIKit 0x3806c804 -[UIApplication sendEvent:] + 376
29 UIKit 0x3806c11e _UIApplicationHandleEvent + 6150
30 GraphicsServices 0x3721f59e _PurpleEventCallback + 586
31 GraphicsServices 0x3721f1ce PurpleEventCallback + 30
32 CoreFoundation 0x36d7016e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
33 CoreFoundation 0x36d70112 __CFRunLoopDoSource1 + 134
34 CoreFoundation 0x36d6ef94 __CFRunLoopRun + 1380
35 CoreFoundation 0x36ce1eb8 CFRunLoopRunSpecific + 352
36 CoreFoundation 0x36ce1d44 CFRunLoopRunInMode + 100
37 GraphicsServices 0x3721e2e6 GSEventRunModal + 70
38 UIKit 0x380c02fc UIApplicationMain + 1116
39 Hurricane 0x00002082 main (main.m:14)
40 Hurricane 0x0000203c start + 36
If I unwire the AdBannerView it works. Rewire and crash. I don't have any dictioniaries in this particular controller. In fact, it only has 6 buttons leading to other screens. The real strange thing is that the code is used elsewhere in other screens which work fine. Obviously, it worked fine before.
Let me clear you, In iOS 6, there are some properties and methods deprecated for AdBannerView . i think this should be the reason of your crash.
Please check this
http://developer.apple.com/library/ios/DOCUMENTATION/UserExperience/Reference/ADBannerView_Ref/Reference/Reference.html#//apple_ref/doc/uid/TP40009562-CH1-DontLinkElementID_9
I am testing my app out, pushing it pretty hard, and I'm getting it to crash (black screen, image doesn't save, drops back to springboard). However, I get no crash reports logged in the console. When I test using profiler all I get is a message saying the target died, but it gives no clues.
In the organiser I got the device crash logs which gives me this which I believe is telling me I'm sending a message to something I've released (objc-msgSend + 22)? Am I on the right track here?
---
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x576e6f69
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x34f8ef7e objc_msgSend + 22
1 CoreFoundation 0x371d7e90 CFRetain + 76
2 CoreFoundation 0x371e1b74 +[__NSArrayI __new::] + 48
3 CoreFoundation 0x371e1a8e -[__NSPlaceholderArray initWithObjects:count:] + 294
4 CoreFoundation 0x371e9394 -[NSArray initWithArray:range:copyItems:] + 756
5 CoreFoundation 0x371fcd5a +[NSArray arrayWithArray:] + 66
6 AVFoundation 0x335da766 -[AVCaptureSession outputs] + 146
7 AVFoundation 0x335de26e -[AVCaptureSession _doDidStop:] + 38
8 AVFoundation 0x335dfaea -[AVCaptureSession _handleNotification:payload:] + 2002
9 AVFoundation 0x335d8af6 avcaptureSessionFigRecorderNotification + 1202
10 AVFoundation 0x335fafd8 AVCMNotificationDispatcherCallback + 184
11 CoreFoundation 0x3725b7c8 __CFNotificationCenterAddObserver_block_invoke_0 + 116
12 CoreFoundation 0x3725b540 ___CFXNotificationPost_block_invoke_0 + 64
13 CoreFoundation 0x371e7090 _CFXNotificationPost + 1400
14 CoreFoundation 0x371ef1c6 CFNotificationCenterPostNotification + 102
15 CoreMedia 0x366eeeb0 CMNotificationCenterPostNotification + 112
16 Celestial 0x374b08a2 FigRecorderRemoteCallbacksServer_NotificationIsPending + 478
17 Celestial 0x374b06ba _XNotificationIsPending + 54
18 Celestial 0x374b0678 figrecordercallbacks_server + 92
19 Celestial 0x374af642 remrec_ClientPortCallBack + 146
20 CoreFoundation 0x37258f0c __CFMachPortPerform + 356
21 CoreFoundation 0x3726351c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
22 CoreFoundation 0x372634be __CFRunLoopDoSource1 + 134
23 CoreFoundation 0x3726230c __CFRunLoopRun + 1364
24 CoreFoundation 0x371e549e CFRunLoopRunSpecific + 294
25 CoreFoundation 0x371e5366 CFRunLoopRunInMode + 98
26 AVFoundation 0x335ef4d0 -[AVRunLoopCondition _waitInMode:untilDate:] + 348
27 AVFoundation 0x335ef36c -[AVRunLoopCondition waitUntilDate:inMode:] + 20
28 AVFoundation 0x335dc13a -[AVCaptureSession _stopPreviewing] + 438
29 AVFoundation 0x335dc2d6 -[AVCaptureSession _setRunning:] + 166
30 AVFoundation 0x335dbe42 -[AVCaptureSession stopRunning] + 274
31 zApp 0x0007e1ce 0x79000 + 20942
32 UIKit 0x30fa5b8e -[UIViewController _setViewAppearState:isAnimating:] + 138
33 UIKit 0x30fff8a8 -[UIViewController beginAppearanceTransition:animated:] + 184
34 UIKit 0x310468be -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 4098
35 UIKit 0x31045360 -[UIViewController presentViewController:withTransition:completion:] + 3116
36 UIKit 0x310a06a0 -[UIViewController presentModalViewController:animated:] + 24
37 CoreFoundation 0x371e93f6 -[NSObject performSelector:withObject:withObject:] + 46
38 UIKit 0x30f7ee00 -[UIApplication sendAction:to:from:forEvent:] + 56
39 UIKit 0x30f7edbc -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 24
40 UIKit 0x30f7ed9a -[UIControl sendAction:to:forEvent:] + 38
41 UIKit 0x30f7eb0a -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 486
42 UIKit 0x30f7f442 -[UIControl touchesEnded:withEvent:] + 470
43 UIKit 0x30f7d924 -[UIWindow _sendTouchesForEvent:] + 312
44 UIKit 0x30f7d312 -[UIWindow sendEvent:] + 374
45 UIKit 0x30f6368e -[UIApplication sendEvent:] + 350
46 UIKit 0x30f62f34 _UIApplicationHandleEvent + 5820
47 GraphicsServices 0x339a5224 PurpleEventCallback + 876
48 CoreFoundation 0x3726351c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
49 CoreFoundation 0x372634be __CFRunLoopDoSource1 + 134
50 CoreFoundation 0x3726230c __CFRunLoopRun + 1364
51 CoreFoundation 0x371e549e CFRunLoopRunSpecific + 294
52 CoreFoundation 0x371e5366 CFRunLoopRunInMode + 98
53 GraphicsServices 0x339a4432 GSEventRunModal + 130
54 UIKit 0x30f91cce UIApplicationMain + 1074
55 zApp 0x0007ffa6 0x79000 + 28582
56 zApp 0x0007a680 0x79000 + 5760
If you suspect that you are overreleasing something, try running your app with NSZombie enabled. (how to enable NSZombie)
You can set exception breakpoint to print backtrace in console.
sometimes that happens when you set an object as an observer for notifications, like
[[NSNotificationCenter defaultCenter] addObserver //details
and don't remove it from the observers list when it's released.
the system tries to send a message to it, and the app crashes because it's not there.
try adding
[[NSNotificationCenter defaultCenter] removeObserver:self];
in the dealloc function. (even if you're working with arc, create a dealloc function, and write that in it).
good luck
I've received this crash report from TestFlight, but I've been unable to duplicate the crash in my own environment, and from the stack trace it doesn't seem to reference my own code at all. Any help in finding a jump off point for where to look would help, even if it's just advice on how to figure it out on my own.
Error: Unknown Signal
0 MyApp 0x000f3e96 testflight_backtrace + 142
1 MyApp 0x000f4a24 TFSignalHandler + 212
2 libsystem_c.dylib 0x36dbe7ec _sigtramp + 48
3 UIKit 0x32100f0e -[UIImageView(UIImageViewInternal) _canDrawContent] + 78
4 UIKit 0x320e530c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 940
5 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
6 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
7 UIKit 0x3210a8e2 -[UIScrollView _didMoveFromWindow:toWindow:] + 54
8 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
9 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
10 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
11 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
12 UIKit 0x320e5108 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 424
13 UIKit 0x320e4eec -[UIView(Hierarchy) _postMovedFromSuperview:] + 140
14 UIKit 0x320e59b4 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1168
15 UIKit 0x320e551e -[UIView(Hierarchy) addSubview:] + 30
16 UIKit 0x3217c1a4 -[UITransitionView transition:fromView:toView:] + 980
17 UIKit 0x3217bdc8 -[UITransitionView transition:toView:] + 104
18 UIKit 0x3217b994 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 524
19 UIKit 0x3217b782 -[UITabBarController transitionFromViewController:toViewController:] + 30
20 UIKit 0x3217b0bc -[UITabBarController _setSelectedViewController:] + 300
21 UIKit 0x322045d8 -[UITabBarController _tabBarItemClicked:] + 344
22 CoreFoundation 0x3501e3fc -[NSObject performSelector:withObject:withObject:] + 52
23 UIKit 0x320fdfae -[UIApplication sendAction:to:from:forEvent:] + 62
24 UIKit 0x320fdf6a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
25 UIKit 0x3220445c -[UITabBar _sendAction:withEvent:] + 352
26 CoreFoundation 0x3501e3fc -[NSObject performSelector:withObject:withObject:] + 52
27 UIKit 0x320fdfae -[UIApplication sendAction:to:from:forEvent:] + 62
28 UIKit 0x320fdf6a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
29 UIKit 0x320fdf48 -[UIControl sendAction:to:forEvent:] + 44
30 UIKit 0x320fdcb8 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
31 UIKit 0x322041ec -[UITabBar(Static) _buttonUp:] + 116
32 CoreFoundation 0x3501e3fc -[NSObject performSelector:withObject:withObject:] + 52
33 UIKit 0x320fdfae -[UIApplication sendAction:to:from:forEvent:] + 62
34 UIKit 0x320fdf6a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
35 UIKit 0x320fdf48 -[UIControl sendAction:to:forEvent:] + 44
36 UIKit 0x320fdcb8 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
37 UIKit 0x320fe5f0 -[UIControl touchesEnded:withEvent:] + 476
38 UIKit 0x320fcad2 -[UIWindow _sendTouchesForEvent:] + 318
39 UIKit 0x320fc4c0 -[UIWindow sendEvent:] + 380
40 UIKit 0x320e283c -[UIApplication sendEvent:] + 356
41 UIKit 0x320e20e2 _UIApplicationHandleEvent + 5826
42 GraphicsServices 0x3631722a PurpleEventCallback + 882
43 CoreFoundation 0x35098522 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
44 CoreFoundation 0x350984c4 __CFRunLoopDoSource1 + 140
45 CoreFoundation 0x35097312 __CFRunLoopRun + 1370
46 CoreFoundation 0x3501a4a4 CFRunLoopRunSpecific + 300
47 CoreFoundation 0x3501a36c CFRunLoopRunInMode + 104
48 GraphicsServices 0x36316438 GSEventRunModal + 136
49 UIKit 0x32110e7c UIApplicationMain + 1080
50 WiseLaw 0x0009365e main (main.m:14)
51 WiseLaw 0x00093617 start + 39
As a vague hint, it might be caused when selecting a tab in UITabViewController and subsequently drawing a UIImageView. Maybe you are referencing a zombie object somewhere.
The stack trace you have doesn't help a lot, try to get the original iOS crash report from the device. The crash could also have been triggered on another thread.
You might want to try a crash reporting solution based on the PLCrashReporter framework, which will show you all threads and also shows the Last Exception Backtrace, if the crash is actually caused by an exception and re-thrown into another runloop. The project page shows some open source and hosted solutions that are based on it: http://code.google.com/p/plcrashreporter/
These link might help in resolving the crash
http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1
http://www.raywenderlich.com/10505/my-app-crashed-now-what-part-2
Try to use DDLog instead of nslog ,It helps in tracking bugs
Link for DDLog sample code:=
https://github.com/robbiehanson/CocoaLumberjack