iOS App crashes in Archive Build but not Release/Run - ios

I am getting the following crash log from my app when run from an archived build
0 AllPaste 0x000a16c1 AllPaste + 108225
1 AllPaste 0x000a1ad7 AllPaste + 109271
2 libsystem_c.dylib 0x38215539 _sigtramp + 48
3 CoreData 0x37321921 -[_PFManagedObjectReferenceQueue _processReferenceQueue:] + 940
4 CoreData 0x3737fd0f -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 3046
5 CoreData 0x3730975d -[NSManagedObjectContext executeFetchRequest:error:] + 452
6 CoreData 0x373e5e51 -[NSFetchedResultsController performFetch:] + 540
7 AllPaste 0x000953e7 AllPaste + 58343
8 AllPaste 0x00095f09 AllPaste + 61193
9 AllPaste 0x000924c3 AllPaste + 46275
10 UIKit 0x31e436b5 -[UIViewController _setViewAppearState:isAnimating:] + 144
11 UIKit 0x31e438c1 -[UINavigationController viewWillAppear:] + 288
12 UIKit 0x31e436b5 -[UIViewController _setViewAppearState:isAnimating:] + 144
13 UIKit 0x31e9d1f3 -[UITabBarController viewWillAppear:] + 210
14 UIKit 0x31e436b5 -[UIViewController _setViewAppearState:isAnimating:] + 144
15 UIKit 0x31e9e61b -[UIViewController beginAppearanceTransition:animated:] + 190
16 UIKit 0x31ee4691 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 4076
17 UIKit 0x31f3e461 -[UIViewController _dismissViewControllerWithTransition:from:completion:] + 1732
18 UIKit 0x31ea1af1 -[UIViewController dismissViewControllerWithTransition:completion:] + 756
19 UIKit 0x31ea1af1 -[UIViewController dismissViewControllerWithTransition:completion:] + 756
20 AllPaste 0x0008a9eb AllPaste + 14827
21 CoreFoundation 0x37183435 -[NSObject performSelector:withObject:withObject:] + 52
22 UIKit 0x31e1c9eb -[UIApplication sendAction:to:from:forEvent:] + 62
23 UIKit 0x31ee23cf -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 118
24 CoreFoundation 0x37183435 -[NSObject performSelector:withObject:withObject:] + 52
25 UIKit 0x31e1c9eb -[UIApplication sendAction:to:from:forEvent:] + 62
26 UIKit 0x31e1c9a7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
27 UIKit 0x31e1c985 -[UIControl sendAction:to:forEvent:] + 44
28 UIKit 0x31e1c6f5 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
29 UIKit 0x31e1d02d -[UIControl touchesEnded:withEvent:] + 476
30 UIKit 0x31e1b50f -[UIWindow _sendTouchesForEvent:] + 318
31 UIKit 0x31e1af01 -[UIWindow sendEvent:] + 380
32 UIKit 0x31e014ed -[UIApplication sendEvent:] + 356
33 UIKit 0x31e00d2d _UIApplicationHandleEvent + 5808
34 GraphicsServices 0x32e5be13 PurpleEventCallback + 882
35 CoreFoundation 0x371fd553 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
36 CoreFoundation 0x371fd4f5 __CFRunLoopDoSource1 + 140
37 CoreFoundation 0x371fc343 __CFRunLoopRun + 1370
38 CoreFoundation 0x3717f4dd CFRunLoopRunSpecific + 300
39 CoreFoundation 0x3717f3a5 CFRunLoopRunInMode + 104
40 GraphicsServices 0x32e5afed GSEventRunModal + 156
41 UIKit 0x31e2f743 UIApplicationMain + 1090
42 AllPaste 0x00088e97 AllPaste + 7831
43 AllPaste 0x00088e50 AllPaste + 7760`
This only happens when I archive and install the app but not when I Run it through Xcode, however both are using the same Ad Hoc build configuration.
Does anyone know why this would be occurring or can identify my error from the log?

It turns out that earlier in the project I had enabled zombies and forgot about it. So that when I was running the simulator and testing on my device it was not detecting a released object. But when I archived build and then shared it into an ipa through the organizer I lost the zombie enabled (of course) and it was not updating the table and throwing my error.

Looks like you are having problems with Core Data. Did you happen to change your data model on the updated app and have an older version of the data model on the device? The crash could be a result of the data models being inconsistent. If that is the case you will need to migrate from the old model to the new one.

Related

UIView(AdditionalLayoutSupport) _switchToLayoutEngine Xcode Crash

I'm dealing with a weird crash which I didn't find a solution yet for.
The title of the crash in Organizer is UIKit: __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 316 and the whole stacktrace is below.
I've checked the startController(_:) method from AppDelegate and everything seems to be fine. Is it a constraint issue maybe? What else could it be?
Last Exception Backtrace:
0 CoreFoundation 0x1d57bb38 __exceptionPreprocess + 124 (NSException.m:165)
1 libobjc.A.dylib 0x1c803062 objc_exception_throw + 34 (objc-exception.mm:521)
2 CoreFoundation 0x1d580fcc -[NSObject(NSObject) doesNotRecognizeSelector:] + 118 (NSObject.m:328)
3 CoreFoundation 0x1d57f0be ___forwarding___ + 692 (NSForwarding.m:3126)
4 CoreFoundation 0x1d4a7dc4 _CF_forwarding_prep_0 + 20
5 Foundation 0x1ded2b76 -[NSLayoutAnchor nsli_lowerIntoExpression:withCoefficient:forConstraint:] + 498 (NSLayoutAnchor.m:883)
6 Foundation 0x1de1b142 -[NSLayoutConstraint _lowerIntoExpression:reportingConstantIsRounded:] + 104 (NSLayoutConstraint.m:1723)
7 Foundation 0x1de1addc -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 120 (NSLayoutConstraint.m:1606)
8 Foundation 0x1de265b4 -[NSLayoutConstraint _addToEngine:] + 24 (NSLayoutConstraint.m:1621)
9 UIKit 0x228a88b2 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 316 (NSLayoutConstraint_UIKitAdditions.m:3596)
10 Foundation 0x1de1a97e -[NSISEngine withBehaviors:performModifications:] + 258 (NSISEngine.m:1973)
11 UIKit 0x228a873a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 502 (NSLayoutConstraint_UIKitAdditions.m:3585)
12 UIKit 0x227aa5e8 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 216 (NSLayoutConstraint_UIKitAdditions.m:3550)
13 UIKit 0x228e3654 -[UIView(AdditionalLayoutSupport) _initializeHostedLayoutEngine] + 486 (NSLayoutConstraint_UIKitAdditions.m:3333)
14 UIKit 0x228afe20 -[UIView(UIConstraintBasedLayout) _layoutEngine_windowDidChange] + 120 (NSLayoutConstraint_UIKitAdditions.m:563)
15 UIKit 0x227aa6e0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 208 (UIView.m:12461)
16 UIKit 0x227a9ee0 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 120 (UIView.m:9478)
17 UIKit 0x227a9d6c -[UIView(Hierarchy) _postMovedFromSuperview:] + 710 (UIView.m:361)
18 UIKit 0x227b527a -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1636 (UIView.m:13256)
19 UIKit 0x227b4bfe -[UIView(Hierarchy) addSubview:] + 726 (UIView.m:9004)
20 UIKit 0x227b420c -[UIWindow addRootViewControllerViewIfPossible] + 506 (UIWindow.m:1498)
21 UIKit 0x227b15b6 -[UIWindow _setHidden:forced:] + 282 (UIWindow.m:1572)
22 UIKit 0x22821154 -[UIWindow makeKeyAndVisible] + 38 (UIWindow.m:4934)
23 MyApp 0x1c3f28 AppDelegate.startController(_:) + 978 (AppDelegate.swift:207)
24 MyApp 0x1cad3c specialized AppDelegate.application(_:didFinishLaunchingWithOptions:) + 3082 (AppDelegate.swift:141)
25 MyApp 0x1c3a18 #objc AppDelegate.application(_:didFinishLaunchingWithOptions:) + 152 (<compiler-generated>:0)
26 UIKit 0x2281d5c0 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 372 (UIApplication.m:1797)
27 UIKit 0x22a1ea46 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3702 (UIApplication.m:2129)
28 UIKit 0x22a23c18 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1636 (UIApplication.m:3625)
29 UIKit 0x22a367c0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3149 + 36 (UIApplication.m:10365)
30 UIKit 0x22a21356 -[UIApplication workspaceDidEndTransaction:] + 138 (UIApplication.m:2989)
31 FrontBoardServices 0x1ee5cc0e __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 14 (FBSSerialQueue.m:158)
32 FrontBoardServices 0x1ee5cac8 -[FBSSerialQueue _performNext] + 216 (FBSSerialQueue.m:177)
33 FrontBoardServices 0x1ee5cdb2 -[FBSSerialQueue _performNextFromRunLoopSource] + 40 (FBSSerialQueue.m:206)
34 CoreFoundation 0x1d537fd8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8 (CFRunLoop.c:1941)
35 CoreFoundation 0x1d537b00 __CFRunLoopDoSources0 + 420 (CFRunLoop.c:1989)
36 CoreFoundation 0x1d535f4c __CFRunLoopRun + 1156 (CFRunLoop.c:2821)
37 CoreFoundation 0x1d4891aa CFRunLoopRunSpecific + 466 (CFRunLoop.c:3113)
38 CoreFoundation 0x1d488fcc CFRunLoopRunInMode + 100 (CFRunLoop.c:3143)
39 UIKit 0x22816e28 -[UIApplication _run] + 656 (UIApplication.m:2658)
40 UIKit 0x22811a4e UIApplicationMain + 146 (UIApplication.m:4089)
41 MyApp 0x68564 main + 32 (HighlightsDetailViewController.swift:62)
42 libdyld.dylib 0x1cc764e6 _dyld_process_info_notify_release + 26 (dyld_process_info_notify.cpp:327)
Thanks in advance!
I finally solved the problem. Shortly, the crash appeared only on iOS 10.x devices, because some of my .xib files had had set a later version of iOS (11.0 i.e.) in "File Inspector -> Interface Builder Document -> Builds for" instead of the default Deployment Target set in the project settings, which was 10.x of course.

QLPreviewController crash on share iOS 9

I use QLPreviewController to preview images and pdf files. It works perfectly for iOS7-9. However, when I tap share button on device with iOS9, app crashes immediately with following exception:
Fatal Exception: NSInvalidArgumentException *** -[__NSCFString rangeOfString:options:range:locale:]: nil argument
This doesn't happen on simulator with iOS9. I am able to see AirDrop sharing menu on devices with iOS7&8, but strange (null) title appears on the top of description. Here is link to sample screenshot, taken on iPhone 5 with iOS7:
Have any of you experienced such issue?
Full stacktrace from CrashLytics
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x00000001860a0f5c __exceptionPreprocess + 124
1 libobjc.A.dylib 0x000000019ac97f80 objc_exception_throw + 56
2 CoreFoundation 0x00000001860a0ea4 -[NSException initWithCoder:]
3 Foundation 0x0000000186efe598 -[NSString rangeOfString:options:range:locale:] + 348
4 Sharing 0x0000000195064118 -[SFAirDropActivityViewController attributedStringWithTitle:content:]
5 Sharing 0x00000001950633e0 -[SFAirDropActivityViewController viewDidLoad]
6 UIKit 0x000000018b5f7610 -[UIViewController loadViewIfRequired] + 1124
7 UIKit 0x000000018b5f7194 -[UIViewController view] + 28
8 UIKit 0x000000018bf3a244 __79-[_UIActivityGroupListViewController updateVisibleActivityGroupViewControllers]_block_invoke115 + 112
9 CoreFoundation 0x0000000185f9e6f0 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 100
10 CoreFoundation 0x0000000185f95418 -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 148
11 UIKit 0x000000018bf39e90 -[_UIActivityGroupListViewController updateVisibleActivityGroupViewControllers] + 456
12 UIKit 0x000000018bf3a754 -[_UIActivityGroupListViewController viewDidLoad] + 720
13 UIKit 0x000000018b5f7610 -[UIViewController loadViewIfRequired] + 1124
14 UIKit 0x000000018b5f7194 -[UIViewController view] + 28
15 UIKit 0x000000018ba4901c -[UIAlertController setContentViewController:] + 284
16 UIKit 0x000000018b7f0278 -[UIActivityViewController viewDidLoad] + 1280
17 UIKit 0x000000018b5f7610 -[UIViewController loadViewIfRequired] + 1124
18 UIKit 0x000000018b5f7194 -[UIViewController view] + 28
19 UIKit 0x000000018b969bfc -[UIViewController _setPresentationController:] + 108
20 UIKit 0x000000018b962e58 -[UIViewController _presentViewController:modalSourceViewController:presentationController:animationController:interactionController:completion:] + 1328
21 UIKit 0x000000018b964840 -[UIViewController _presentViewController:withAnimationController:completion:] + 4428
22 UIKit 0x000000018b967278 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 472
23 UIKit 0x000000018b6ee0a4 -[UIViewController presentViewController:animated:completion:] + 184
24 UIKit 0x000000018bc48c84 _UIDocumentInteractionControllerPresentPopoverFromItemOrShowActivityViewController + 356
25 UIKit 0x000000018bc48a70 -[UIDocumentInteractionController presentOptionsMenuFromBarButtonItem:animated:] + 264
26 QuickLook 0x000000018af9d220 -[QLPreviewController actionButtonTapped:] + 220
27 UIKit 0x000000018b62e3c8 -[UIApplication sendAction:to:from:forEvent:] + 100
28 UIKit 0x000000018b7ad3dc -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 168
29 UIKit 0x000000018b62e3c8 -[UIApplication sendAction:to:from:forEvent:] + 100
30 UIKit 0x000000018b62e344 -[UIControl sendAction:to:forEvent:] + 80
31 UIKit 0x000000018b616c6c -[UIControl _sendActionsForEvents:withEvent:] + 416
32 UIKit 0x000000018b616db8 -[UIControl _sendActionsForEvents:withEvent:] + 748
33 UIKit 0x000000018b62dc5c -[UIControl touchesEnded:withEvent:] + 572
34 UIKit 0x000000018b62d88c -[UIWindow _sendTouchesForEvent:] + 804
35 UIKit 0x000000018b626ac0 -[UIWindow sendEvent:] + 784
36 UIKit 0x000000018b5f7a10 -[UIApplication sendEvent:] + 248
37 UIKit 0x000000018b5f5efc _UIApplicationHandleEventQueue + 5348
38 CoreFoundation 0x00000001860585a4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
39 CoreFoundation 0x0000000186058038 __CFRunLoopDoSources0 + 540
40 CoreFoundation 0x0000000186055d38 __CFRunLoopRun + 724
41 CoreFoundation 0x0000000185f84dc0 CFRunLoopRunSpecific + 384
42 GraphicsServices 0x00000001910d8088 GSEventRunModal + 180
43 UIKit 0x000000018b65ef44 UIApplicationMain + 204
I met the same problem.
My solution is,Do something to SFAirDropActivityViewController.
the code:
#interface SFAirDropActivityViewController : UIViewController
+ (BOOL)isAirDropAvailable;
#end
#implementation SFAirDropActivityViewController
+ (BOOL)isAirDropAvailable{
return NO;
}
#end
PrivateFrameworks address:
https://github.com/nst/iOS-Runtime-Headers/blob/master/PrivateFrameworks/Sharing.framework/SFAirDropActivityViewController.h

Random crashes in IOS

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

crash while updating the app from version (which doesn't have core data) to version (which has core data added newly)

I am using MagicalRecord for saving the Data into DB.And when i try to update the app to core data version .
I am getting exception on the first time i try to save some thing
[MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
MenuModel *menuModel = [CDMenuModel insertInManagedObjectContext:localContext];
menuModel.sectionTitle = tibbrLocalizedString(#"menu_view.menuItem_mainWall.menu", #"Main Wall");
menuModel.indexPath = [NSNumber numberWithInt:1];
}];
Please find the crash stack trace for your ref
And also let me know your finding based on the crash log below
Thread 0 Crashed:
0 libobjc.A.dylib 0x38760627 objc_msgSend + 7
1 Foundation 0x2e8e6029 -[NSError dealloc] + 57
2 libobjc.A.dylib 0x38765b67 objc_object::sidetable_release(bool) + 171
3 libobjc.A.dylib 0x387660cf (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 355
4 CoreFoundation 0x2def74bd _CFAutoreleasePoolPop + 13
5 Foundation 0x2e8f08df -[NSAutoreleasePool drain] + 119
6 CoreData 0x2dd37fbb -[NSManagedObjectContext save:] + 939
7 appname_test 0x002f2f7b 0x8e000 + 2510715
8 CoreData 0x2dd9b9cb developerSubmittedBlockToNSManagedObjectContextPerform + 87
9 CoreData 0x2dd9bb0f -[NSManagedObjectContext performBlockAndWait:] + 111
10 appname_test 0x002f2ecf 0x8e000 + 2510543
11 CoreData 0x2dd9b9cb developerSubmittedBlockToNSManagedObjectContextPerform + 87
12 libdispatch.dylib 0x38c3fd3d _dispatch_client_callout + 21
13 libdispatch.dylib 0x38c446bf _dispatch_barrier_sync_f_invoke + 23
14 CoreData 0x2dd9bb07 -[NSManagedObjectContext performBlockAndWait:] + 103
15 appname_test 0x001807e9 0x8e000 + 993257
16 appname_test 0x002509d1 0x8e000 + 1845713
17 appname_test 0x0026d497 0x8e000 + 1963159
18 appname_test 0x00265be7 0x8e000 + 1932263
19 UIKit 0x307f7a4f -[UIViewController loadViewIfRequired] + 515
20 UIKit 0x307f780d -[UIViewController view] + 21
21 UIKit 0x3086ec39 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 385
22 UIKit 0x3086d59d -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 1197
23 UIKit 0x3086d0e3 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 43
24 UIKit 0x3086d06b -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 91
25 UIKit 0x3086d003 -[UIWindow _setRotatableViewOrientation:duration:force:] + 39
26 UIKit 0x3086567d __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 105
27 UIKit 0x307f9695 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 381
28 UIKit 0x3086cd55 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 693
29 UIKit 0x3086c825 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 157
30 UIKit 0x307fe611 -[UIWindow addRootViewControllerViewIfPossible] + 457
31 UIKit 0x307fbdd5 -[UIWindow _setHidden:forced:] + 301
32 UIKit 0x30865a4d -[UIWindow makeKeyAndVisible] + 57
33 appname_test 0x0037ae55 0x8e000 + 3067477
34 UIKit 0x30862cbd -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 273
35 UIKit 0x3086260f -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1607
36 UIKit 0x3085ccc5 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 717
37 UIKit 0x307f8c93 -[UIApplication handleEvent:withNewEvent:] + 3547
38 UIKit 0x307f7df5 -[UIApplication sendEvent:] + 69
39 UIKit 0x3085c401 _UIApplicationHandleEvent + 613
40 GraphicsServices 0x32e55b53 _PurpleEventCallback + 607
41 GraphicsServices 0x32e5573b PurpleEventCallback + 31
42 CoreFoundation 0x2df8e845 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 33
43 CoreFoundation 0x2df8e7df __CFRunLoopDoSource1 + 343
44 CoreFoundation 0x2df8cfab __CFRunLoopRun + 1403
45 CoreFoundation 0x2def7765 CFRunLoopRunSpecific + 521
46 CoreFoundation 0x2def7547 CFRunLoopRunInMode + 103
47 UIKit 0x3085b627 -[UIApplication _run] + 759
48 UIKit 0x3085688d UIApplicationMain + 1133
49 appname_test 0x0009b5cd 0x8e000 + 54733
50 libdyld.dylib 0x38c54ab5 start + 1

iOS 6 crashing with iAD

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

Resources