(iOS) What does kbViewRecoverNormalState means? - xcode

We have this crash in our app that has this kind of log.
"date= 2013-02-03 07:12:17 +0000;
buildVersion = 1.0.0;
model = iPhone;
systemName = iPhone OS;
systemVersion = 5.1.1;
timeSpent = 1008.14;
uid = 63743f3790afda4d3bffc7beb8877fa9cfbfedfe;
reason = -[__NSCFType kbViewRecoverNormalState]: unrecognized selector sent to instance 0xdd1dfe0;
stackTrace =
(
0 CoreFoundation 0x371288a7 __exceptionPreprocess + 186
1 libobjc.A.dylib 0x34e2d259 objc_exception_throw + 32
2 CoreFoundation 0x3712ba9b -[NSObject doesNotRecognizeSelector:] + 174
3 CoreFoundation 0x3712a915 ___forwarding___ + 300
4 CoreFoundation 0x37085650 _CF_forwarding_prep_0 + 48
5 SogouInputIPhone4.dylib 0x01a1982b -[AppStateMonitor exitSogouInputMethod] + 190
6 SogouInputIPhone4.dylib 0x01a196e5 -[AppStateMonitor didEnterBackground] + 20
7 Foundation 0x3798d4ff __57 -[NSNotificationCenteraddObserver:selector:name:object:] _block_invoke_0 + 18
8 CoreFoundation 0x370f4547 ___CFXNotificationPost_block_invoke_0 + 70
9 CoreFoundation 0x37080097 _CFXNotificationPost + 1406
10 Foundation 0x379013eb -[NSNotificationCenterpostNotificationName:object:userInfo:] + 66
11 UIKit 0x30e6c255 -[UIApplication _handleApplicationSuspend:eventInfo:] +792
12 UIKit 0x30dfceff -[UIApplication handleEvent:withNewEvent:] + 2094
13 UIKit 0x30dfc567 -[UIApplication sendEvent:] + 54
14 UIKit 0x30dfbf3b _UIApplicationHandleEvent + 5826
15 GraphicsServices 0x3383e22b PurpleEventCallback + 882
16 CoreFoundation 0x370fc523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__+ 38
17 CoreFoundation 0x370fc4c5 __CFRunLoopDoSource1 + 140
18 CoreFoundation 0x370fb313 __CFRunLoopRun + 1370
19 CoreFoundation 0x3707e4a5 CFRunLoopRunSpecific + 300
20 CoreFoundation 0x3707e36d CFRunLoopRunInMode + 104
21 GraphicsServices 0x3383d439 GSEventRunModal + 136
22 UIKit 0x30e2acd5 UIApplicationMain + 1080
23 MyApp 0x0014506f _mh_execute_header + 295023
24 MyApp 0x000ff058 _mh_execute_header + 8280
);"
That is a custom crash log that is not symbolicated when we migrated to Xcode 4.5.
My question is, what is kbViewRecoverNormalState means? What class calls this selector? Since we can't read the stack trace clearly, we don't have any idea about this.
And is there any possible solution for this uninformative call stack? It is working on the device if it is connected to Xcode (debug/release). But when release on iTunes and/or created an IPA file, it doesn't work.
Thanks!

It seems like you are test your app in jailbroken device.
SogouInputIPhone4.dylib 0x01a1982b -[AppStateMonitor exitSogouInputMethod]
Its the SogouInputIPhone4 which cause the crash

Related

Xcode 14 beta 5 cause crash on working app

We have been trying to run our app to prepare for iOS 16 but so far no luck. The app runs perfectly in Xcode 13. Also when we download the app from App Store to iOS 16 beta device, it works with no problem.
What we face with new Xcode 14 Beta 5 is the app runs till the first view controller then we get a weird error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application circumvented Objective-C runtime dealloc initiation for <UINavigationController> object.'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff800427380 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80004dbaf objc_exception_throw + 48
2 Foundation 0x00007ff800b876ac _userInfoForFileAndLine + 0
3 UIKitCore 0x0000000124447d4e -[UIViewController dealloc] + 1475
4 UIKitCore 0x0000000124359e30 -[UINavigationController dealloc] + 389
5 libobjc.A.dylib 0x00007ff80004b6a1 _ZN11objc_object17sidetable_releaseEbb + 203
6 libobjc.A.dylib 0x00007ff80004be64 _ZN19AutoreleasePoolPage12releaseUntilEPP11objc_object + 180
7 libobjc.A.dylib 0x00007ff80004bcad objc_autoreleasePoolPop + 203
8 UIKitCore 0x00000001252e54bf -[_UIAfterCACommitBlock run] + 80
9 UIKitCore 0x00000001252e59a4 -[_UIAfterCACommitQueue flush] + 190
10 UIKitCore 0x0000000124d40730 _runAfterCACommitDeferredBlocks + 782
11 UIKitCore 0x0000000124d2eede _cleanUpAfterCAFlushAndRunDeferredBlocks + 96
12 UIKitCore 0x0000000124d64abb _afterCACommitHandler + 72
13 CoreFoundation 0x00007ff800386015 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
14 CoreFoundation 0x00007ff800380982 __CFRunLoopDoObservers + 515
15 CoreFoundation 0x00007ff800380ecd __CFRunLoopRun + 1161
16 CoreFoundation 0x00007ff800380667 CFRunLoopRunSpecific + 560
17 GraphicsServices 0x00007ff809bfc28a GSEventRunModal + 139
18 UIKitCore 0x0000000124d30621 -[UIApplication _run] + 994
19 UIKitCore 0x0000000124d354fd UIApplicationMain + 123
20 xxxxxx 0x000000010e9aa830 main + 96
21 dyld 0x00000001136e52bf start_sim + 10
22 ??? 0x00000001148c751e 0x0 + 4639716638
)
OK, So I fixed my own problem. For me it was the code in the dependency file I was using in my pods. So, simply search for
+ (void)initialize {
}
which is most possibly causing the error.

Error while Launching saying NSInternalInconsistencyException

Need help. receiving below error while launching the application
Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Application windows are expected to have a root view controller at the end of application launch
Native stack trace:
0 CoreFoundation 0x00000001160421e6 exceptionPreprocess + 294
1 libobjc.A.dylib 0x0000000116fdf031 objc_exception_throw + 48
2 CoreFoundation 0x0000000116047472 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000114f7b652 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 UIKit 0x0000000112d1bb96 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3064
5 UIKit 0x00000001130dde4a __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
6 UIKit 0x00000001134b0909 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
7 UIKit 0x00000001130dda86 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
8 UIKit 0x00000001130de2a7 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675
9 UIKit 0x0000000113a4f4d4 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299
10 UIKit 0x0000000113a4f36e -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
11 UIKit 0x000000011373362d __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
12 UIKit 0x000000011392e387 _performActionsWithDelayForTransitionContext + 100
13 UIKit 0x00000001137334f7 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
14 UIKit 0x00000001134affb0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
15 UIKit 0x0000000112d19f0c -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
16 UIKit 0x00000001132eca97 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
17 FrontBoardServices 0x000000011d9c32f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331
18 FrontBoardServices 0x000000011d9cbcfa __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225
19 libdispatch.dylib 0x0000000117c74779 _dispatch_client_callout + 8
20 libdispatch.dylib 0x0000000117c79931 _dispatch_block_invoke_direct + 317
21 FrontBoardServices 0x000000011d9f7470 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
22 FrontBoardServices 0x000000011d9f712e -[FBSSerialQueue _performNext] + 439
23 FrontBoardServices 0x000000011d9f768e -[FBSSerialQueue _performNextFromRunLoopSource] + 45
24 CoreFoundation 0x0000000115fe4bb1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
25 CoreFoundation 0x0000000115fc94af __CFRunLoopDoSources0 + 271
26 CoreFoundation 0x0000000115fc8a6f __CFRunLoopRun + 1263
27 CoreFoundation 0x0000000115fc830b CFRunLoopRunSpecific + 635
28 GraphicsServices 0x0000000119779a73 GSEventRunModal + 62
29 UIKit 0x0000000112d1d0b7 UIApplicationMain + 159
30 ??? 0x000000013437347e 0x0 + 5171000446
31 ??? 0x0000000134373213 0x0 + 5170999827
Application windows are expected to have a root view controller at the end of application
It seems that you didn't set the RootViewController.It worked fine in old version.But in the new version ,you should set it in AppDelegate
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
var indexVC = new XXXViewController ();//your viewcontroller
Window = new UIWindow ((CGRect)UIScreen.MainScreen.Bounds);
Window .RootViewController = indexVC;
Window .MakeKeyAndVisible ();
return true;
}

HandleLongPress : UIPopoverController dealloc reached while popover is still visible

I'm trying to develop a Mapkit app. There is a map, a lot of annotations located on this map. If I touch one of these annotations my app is displaying a custom popover from a storyboard. If I touch another location on view while popover is active, popover disappears without any problem.
But, if I touch one of annotation and move my finger out of annotation without releasing my finger, I got the error.
2014-08-01 11:33:34.160 notamTR[1101:60b] *** Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.'
*** First throw call stack:
(
0 CoreFoundation 0x01b231e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x018208e5 objc_exception_throw + 44
2 CoreFoundation 0x01b22fbb +[NSException raise:format:] + 139
3 UIKit 0x00ae195e -[UIPopoverController dealloc] + 86
4 libobjc.A.dylib 0x01831692 _ZN11objc_object17sidetable_releaseEb + 268
5 libobjc.A.dylib 0x01830e81 objc_release + 49
6 myMap 0x0000b82d -[ViewController mapView:didSelectAnnotationView:] + 1885
7 MapKit 0x0017799d -[MKMapView annotationManager:didSelectAnnotationRepresentation:] + 704
8 MapKit 0x001ae9b8 -[MKAnnotationManager selectAnnotation:animated:avoid:] + 715
9 MapKit 0x001ae6e8 -[MKAnnotationManager selectAnnotation:animated:] + 75
10 MapKit 0x00165206 -[MKMapView handleLongPress:] + 993
11 UIKit 0x0087c4f4 _UIGestureRecognizerSendActions + 230
12 UIKit 0x0087b168 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 383
13 UIKit 0x0087cbdd -[UIGestureRecognizer _delayedUpdateGesture] + 60
14 UIKit 0x0088013d ___UIGestureRecognizerUpdate_block_invoke + 57
15 UIKit 0x008800be _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 317
16 UIKit 0x008767ac _UIGestureRecognizerUpdate + 199
17 UIKit 0x00521a5a -[UIWindow _sendGesturesForEvent:] + 1291
18 UIKit 0x00522971 -[UIWindow sendEvent:] + 1021
19 UIKit 0x004f45f2 -[UIApplication sendEvent:] + 242
20 UIKit 0x004de353 _UIApplicationHandleEventQueue + 11455
21 CoreFoundation 0x01aac77f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
22 CoreFoundation 0x01aac10b __CFRunLoopDoSources0 + 235
23 CoreFoundation 0x01ac91ae __CFRunLoopRun + 910
24 CoreFoundation 0x01ac89d3 CFRunLoopRunSpecific + 467
25 CoreFoundation 0x01ac87eb CFRunLoopRunInMode + 123
26 GraphicsServices 0x032df5ee GSEventRunModal + 192
27 GraphicsServices 0x032df42b GSEventRun + 104
28 UIKit 0x004e0f9b UIApplicationMain + 1225
29 myMap 0x0001c37c main + 92
30 libdyld.dylib 0x020e4701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
It is quite late with this Answer, but for those looking for a solution: Try to create a storong property to hold this popover, and then when taping on the map accessory use the self.popover reference to init it with a content.

How to fix ios app crashing with certain name?

I have an app called "FirstAid" that crashes in the simulator and on a device. If I create a clean project called "FirstAid" that also crashes with the same report. Any other named app is fine.
I have done a clean, and rebuilt it but it still crashes.
How do I fix it?
2011-05-14 10:06:39.912 FirstAid[1217:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00ef55a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x01049313 objc_exception_throw + 44
2 CoreFoundation 0x00ef54e1 -[NSException raise] + 17
3 Foundation 0x008c7677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x008c75e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x0034330c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00e6b8cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x00341d23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x00343ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x0014917a -[UIApplication _loadMainNibFile] + 172
10 UIKit 0x00149cf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
11 UIKit 0x00154617 -[UIApplication handleEvent:withNewEvent:] + 1533
12 UIKit 0x0014cabf -[UIApplication sendEvent:] + 71
13 UIKit 0x00151f2e _UIApplicationHandleEvent + 7576
14 GraphicsServices 0x013ce992 PurpleEventCallback + 1550
15 CoreFoundation 0x00ed6944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
16 CoreFoundation 0x00e36cf7 __CFRunLoopDoSource1 + 215
17 CoreFoundation 0x00e33f83 __CFRunLoopRun + 979
18 CoreFoundation 0x00e33840 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x00e33761 CFRunLoopRunInMode + 97
20 UIKit 0x001497d2 -[UIApplication _run] + 623
21 UIKit 0x00155c93 UIApplicationMain + 1160
22 FirstAid 0x00001cb9 main + 121
23 FirstAid 0x00001c35 start + 53
)
terminate called after throwing an instance of 'NSException'
This error may mean several things, but my bet is that some of your outlets (from IB) is broken. Examine your XIB-files + all their outlets and make sure they exist in your code as well.

One line keeps crashing, I think it could be something to do with CFDictionary but not sure. Please help

I have a line of code that keeps crashing
NSArray* address = [NSArray arrayWithArray:[[[access.filteredResults objectAtIndex:[indexPath row]] addressArray] objectAtIndex:0]];
I debugged it and I discovered that addressArray is the culprit.
It's defined in a class called ABContact (created by Erica Sadun, author of Developer Cookbook)
#property (nonatomic, readonly) NSArray *addressArray;
The implementation file has
- (NSArray *) addressArray {return [self arrayForProperty:kABPersonAddressProperty];}
The error message that I get is
-[__NSCFDictionary getObjects:range:]: unrecognized selector sent to instance 0x18aeb0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary getObjects:range:]: unrecognized selector sent to instance 0x18aeb0'
*** Call stack at first throw:
(
0 CoreFoundation 0x3284b987 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x31aca49d objc_exception_throw + 24
2 CoreFoundation 0x3284d133 -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x327f4aa9 ___forwarding___ + 508
4 CoreFoundation 0x327f4860 _CF_forwarding_prep_0 + 48
5 CoreFoundation 0x327dc325 -[NSArray initWithArray:range:copyItems:] + 372
6 CoreFoundation 0x327e94d3 +[NSArray arrayWithArray:] + 62
7 ContactMapper 0x00003c17 -[RootViewController tableView:cellForRowAtIndexPath:] + 1110
8 UIKit 0x32c46a21 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 516
9 UIKit 0x32c467f3 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 34
10 UIKit 0x32c44d2d -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 936
11 UIKit 0x32c43edd -[UITableView layoutSubviews] + 140
12 UIKit 0x32bf00cf -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 26
13 CoreFoundation 0x327e9bbf -[NSObject(NSObject) performSelector:withObject:] + 22
14 QuartzCore 0x3087b685 -[CALayer layoutSublayers] + 120
15 QuartzCore 0x3087b43d CALayerLayoutIfNeeded + 184
16 QuartzCore 0x3089e593 -[CALayer(CALayerPrivate) layoutBelowIfNeeded] + 18
17 UIKit 0x32c1c3f3 -[UIView(Hierarchy) layoutBelowIfNeeded] + 22
18 UIKit 0x32e41cb3 -[UISplitViewController willRotateToInterfaceOrientation:duration:] + 614
19 UIKit 0x32cadc71 -[UIViewController window:willRotateToInterfaceOrientation:duration:] + 540
20 UIKit 0x32ced6b3 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 1158
21 UIKit 0x32caef5f -[UIWindow _setRotatableViewOrientation:duration:force:] + 54
22 UIKit 0x32c27007 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 74
23 UIKit 0x32c26f81 -[UIWindow _updateInterfaceOrientationFromDeviceOrientation:] + 112
24 UIKit 0x32c26ead -[UIWindow _handleDeviceOrientationChange:] + 88
25 Foundation 0x320f1623 _nsnote_callback + 142
26 CoreFoundation 0x327d2123 __CFXNotificationPost_old + 402
27 CoreFoundation 0x327d1dc3 _CFXNotificationPostNotification + 118
28 Foundation 0x320e0d23 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
29 UIKit 0x32bf0819 -[UIDevice setOrientation:animated:] + 144
30 UIKit 0x32c152ff -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 438
31 UIKit 0x32be148b -[UIApplication handleEvent:withNewEvent:] + 1114
32 UIKit 0x32be0ec9 -[UIApplication sendEvent:] + 44
33 UIKit 0x32be0907 _UIApplicationHandleEvent + 5090
34 GraphicsServices 0x3094af03 PurpleEventCallback + 666
35 CoreFoundation 0x327e06ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
36 CoreFoundation 0x327e06c3 __CFRunLoopDoSource1 + 166
37 CoreFoundation 0x327d2f7d __CFRunLoopRun + 520
38 CoreFoundation 0x327d2c87 CFRunLoopRunSpecific + 230
39 CoreFoundation 0x327d2b8f CFRunLoopRunInMode + 58
40 UIKit 0x32c14309 -[UIApplication _run] + 380
41 UIKit 0x32c11e93 UIApplicationMain + 670
42 ContactMapper 0x00002b67 main + 70
43 ContactMapper 0x00002b1c start + 40
I'm not sure how to fix it?
access.filteredResults is an NSArray
It might be how AddressBook data is handled (CFDictionary vs NSArray or NSDictionary). I've spent 15 hours and I'm stuck. Any help would be appreciated.
Nope. NSCFDictionary has nothing to do with your problem.
Your problem is that you have under-retained or over-released an array object, and that object died, and another object (in this case, it was a dictionary, but it could have been anything) got allocated at the same address. Your code is trying to create an array with the old object, but ends up passing the dictionary that has succeeded it instead.
You need to find out where you are unduly releasing or failing to retain the value of addressArray.
It may help to run your app under the Zombies instrument, whose very purpose is debugging an application that prematurely releases or fails to retain an object.

Resources