In iPad pro 11.2.5 App get crashed - ios

In my app, I have used one textfield. When tap on textfield the device keyboard will appear and than I type some text in that textfield. On that time the app get crashed in iPad Pro 11.2.5 version. I don't know why the app getting crashed because the same code works perfect in iPad Pro 10.3 version. Please review the my crash analytics report below
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x184410430 objc_msgSend + 16
1 CoreFoundation 0x18514513c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
2 CoreFoundation 0x1851446dc _CFXRegistrationPost + 420
3 CoreFoundation 0x185144440 ___CFXNotificationPost_block_invoke + 60
4 CoreFoundation 0x1851c1e24 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1408
5 CoreFoundation 0x18507ad60 _CFXNotificationPost + 380
6 Foundation 0x185aa7348 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
7 UIFoundation 0x18f8c4570 -[NSTextStorage processEditing] + 240
8 UIFoundation 0x18f8c41d8 -[NSTextStorage endEditing] + 92
9 UIKit 0x18e914368 -[UITextInputController _insertText:fromKeyboard:] + 488
10 UIKit 0x18e9136d0 -[UITextInputController insertText:] + 400
11 UIKit 0x18ead3518 -[UIFieldEditor insertFilteredText:] + 968
12 UIKit 0x18f3eb3a0 -[UITextField insertFilteredText:] + 104
13 UIKit 0x18e91343c -[UIKeyboardImpl insertText:] + 136
14 UIKit 0x18ebd735c -[UIKeyboardImpl performKeyboardOutput:] + 756
15 UIKit 0x18ebd665c __55-[UIKeyboardImpl handleKeyboardInput:executionContext:]_block_invoke_2 + 256
16 UIKit 0x18f431fac -[UIKeyboardTaskEntry execute:] + 192
17 UIKit 0x18e7975f0 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 384
18 Foundation 0x185baf2e4 __NSThreadPerformPerform + 340
19 CoreFoundation 0x18515b77c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
20 CoreFoundation 0x18515b6fc __CFRunLoopDoSource0 + 88
21 CoreFoundation 0x18515af84 __CFRunLoopDoSources0 + 204
22 CoreFoundation 0x185158b5c __CFRunLoopRun + 1048
23 CoreFoundation 0x185078c58 CFRunLoopRunSpecific + 436
24 GraphicsServices 0x186f24f84 GSEventRunModal + 100
25 UIKit 0x18e7d15c4 UIApplicationMain + 236
26 Q App 0x1050b756c main (main.m:16)
27 libdyld.dylib 0x184b9856c start + 4
As my crash reports, I didn't use NotificationCenter/observer in that screen. But the crash reports are showing in the NotificationCenter. Please Any know the solution for this ?

Note: The following is without knowing all required details because you did not provide any source code on how you implemented the feature nor does the crash report shown here contain any information about the exception code/signal being thrown.
The top frame shows the method objc_msgSend being invoked. This method is always used when the runtime tries to send a message (method) to an object. And crashes in this method usually mean the object doesn't exist any longer which means it was deallocated but your code still holds a reference.
So this looks like a memory management issue in your code. Without your actual implementation it is impossible to provide any meaningful help.
The best way to debug this is to run the app in debug mode and the device attached to Xcode and get more details. The Instrument tools can also help finding out where the problem is.

Related

how to find related code by call stack in xcode?

there,
I'm new to ios, and get a crash log as follows.
my question is, what does the "+ 373" mean in "[ICLRootViewController addHomeScreenViewController] + 373"? how to find related line in ICLRootViewController.m? Line 373 has no relationship with function addHomeScreenViewController() at all.
2017-02-09 16:23:28.117 Demo[98834:4764956] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Can't find view controller.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000111f77d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000110dfb21e objc_exception_throw + 48
2 CoreFoundation 0x0000000111f7be42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010cda066d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 Demo 0x0000000109bb63c5 -[ICLRootViewController addHomeScreenViewController] + 373
5 Demo 0x0000000109bc252e -[ICLRootViewController onNewsButtonClicked] + 542
6 Demo 0x0000000109a2b9ce __51-[ICLHomeScreenToolbarViewController initWebToolbar]_block_invoke_2 + 62
7 Demo 0x0000000109dee0f1 -[ICLWebViewToolbar didClickNewsButton:] + 305
8 UIKit 0x000000010f5b18bc -[UIApplication sendAction:to:from:forEvent:] + 83
9 UIKit 0x000000010f737c38 -[UIControl sendAction:to:forEvent:] + 67
10 UIKit 0x000000010f737f51 -[UIControl _sendActionsForEvents:withEvent:] + 444
11 UIKit 0x000000010f736e4d -[UIControl touchesEnded:withEvent:] + 668
12 UIKit 0x000000010f61f545 -[UIWindow _sendTouchesForEvent:] + 2747
13 UIKit 0x000000010f620c33 -[UIWindow sendEvent:] + 4011
14 Demo 0x0000000109a96a80 -[ICLInteractionDetectionWindow sendEvent:] + 688
15 UIKit 0x000000010f5cd9ab -[UIApplication sendEvent:] + 371
16 UIKit 0x000000010fdba72d __dispatchPreprocessedEventFromEventQueue + 3248
17 UIKit 0x000000010fdb3463 __handleEventQueue + 4879
18 CoreFoundation 0x0000000111f1c761 __CFRUNLOICL_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 CoreFoundation 0x0000000111f0198c __CFRunLoopDoSources0 + 556
20 CoreFoundation 0x0000000111f00e76 __CFRunLoopRun + 918
21 CoreFoundation 0x0000000111f00884 CFRunLoopRunSpecific + 420
22 GraphicsServices 0x000000011473ba6f GSEventRunModal + 161
23 UIKit 0x000000010f5afc68 UIApplicationMain + 159
24 Demo 0x000000010981da1f main + 111
25 libdyld.dylib 0x0000000113ccd68d start + 1
thanks a lot!
373 is an offset from the beginning of the function symbol listed in the backtrace. The crash reporter didn't have access to debug information so it couldn't do the translation from address to source lines.
If you have the binary that is exhibiting this crash and it's dSYM, however, you can figure this out by hand. You won't be able to tell anything from the absolute addresses in the crash, since macOS and iOS randomize load locations. That's why having it in "symbol + offset" form is handy. So, load your binary & dSYM into the debugger and do:
(lldb) disassemble -m -n "-[ICLRootViewController addHomeScreenViewController]"
That command will disassemble the code for the function passed to the -n argument, showing a mixed source & assembly view of this method. The assembly output will be listed with the offsets, so just find <+373> and the source lines above it will show you where it comes from. If this is optimized code, the source -> address mapping can sometimes be confusing, but the mixed view might help you sort that out as well.
perhaps you can find the answer in the 4th line displaying,
4 Demo 0x0000000109bb63c5 -[ICLRootViewController addHomeScreenViewController] + 373
where is the last code in your project that run

How to debug a main.m iOS app crash

I have integrated Crashlytics in my iOS app which is currently live on the App Store. In my latest update, I am seeing a lot of crashes with the stack trace as below.
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x30f6ef46 objc_msgSend + 5
1 UIKit 0x26665f07 -[UINavigationController viewWillAppear:] + 406
2 UIKit 0x265d5b1f -[UIViewController _setViewAppearState:isAnimating:] + 438
3 CoreFoundation 0x22fcf46d __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 48
4 CoreFoundation 0x22fc84c3 -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 234
5 UIKit 0x265d5c9b -[UIViewController _setViewAppearState:isAnimating:] + 818
6 UIKit 0x2688c799 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 584
7 UIKit 0x26639bd9 _applyBlockToCFArrayCopiedToStack + 308
8 UIKit 0x265b5dd7 _afterCACommitHandler + 458
9 CoreFoundation 0x23069ffd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
10 CoreFoundation 0x230676bb __CFRunLoopDoObservers + 278
11 CoreFoundation 0x23067ac3 __CFRunLoopRun + 914
12 CoreFoundation 0x22fb53b1 CFRunLoopRunSpecific + 476
13 CoreFoundation 0x22fb51c3 CFRunLoopRunInMode + 106
14 GraphicsServices 0x2a5a2201 GSEventRunModal + 136
15 UIKit 0x2661f43d UIApplicationMain + 1440
16 MyApp 0x00123553 main (main.m:16)
I recently added interstitial ads in my app and I believe the crash is related to that. But how can I get more information from this stack trace or from crashlytics to understand what is really going wrong?
Have you tried enabling Exception Breakpoints?
1) Inside Xcode, switch to the Breakpoints Navigator (left menu, seventh icon from left to right, it looks just like a breakpoint)
2) Click the + symbol in the lower left corner and choose "Add Exception Breakpoint"
3) Run and crash.
You should now be able to see what really caused the crash.

ios 8 + LiveSDK authentication crashes my app

I have an app in the store that use LiveSDK API to log the user into OneDrive. The last release was pushed before iOS8 came out, but it works without problem with iOS8
Now I want to push an update (unrelated to OneDrive features) and I am using xcode 6.1.1 but testing the app I noticed that every time the user is authenticated into OneDrive the app will crash as soon as return from a segue or flipside view to the Main View.
I was able to isolate the issue to this line added in viewDidLoad:
self.liveClient = [[LiveConnectClient alloc] initWithClientId:APP_CLIENT_ID
delegate:self
userState:#"initialize"];
and I really followed the basic instructions on how to login that can be found here:
http://msdn.microsoft.com/en-us/library/dn631822.aspx#sign_the_user_in
The steps to reproduce the issue (on both thee device and the simulator) are the following:
a) app starts
b) click to the cloud service login button that will trigger a flipsideviewcontroller
c) log into OneDrive with the code provided by MS
d) go back to the main controller
e) CRASH!
The trace is the following:
#########################################################
*** First throw call stack:
(
0 CoreFoundation 0x028dd1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x026598e5 objc_exception_throw + 44
2 CoreFoundation 0x0297a243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x028cd50b ___forwarding___ + 1019
4 CoreFoundation 0x028cd0ee _CF_forwarding_prep_0 + 14
5 CloudFella 0x0015c867 -[LiveConnectClientCore dealloc] + 48
6 libobjc.A.dylib 0x0266a692 _ZN11objc_object17sidetable_releaseEb + 268
7 libobjc.A.dylib 0x0266baeb -[NSObject release] + 25
8 CloudFella 0x00158af1 -[LiveConnectClient dealloc] + 44
9 libobjc.A.dylib 0x0266a692 _ZN11objc_object17sidetable_releaseEb + 268
10 libobjc.A.dylib 0x02669e81 objc_release + 49
11 libobjc.A.dylib 0x02669e3e objc_storeStrong + 39
12 CloudFella 0x00157b9d -[CFFlipsideViewController .cxx_destruct] + 249
13 libobjc.A.dylib 0x026582d4 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 128
14 libobjc.A.dylib 0x0265824f object_cxxDestruct + 20
15 libobjc.A.dylib 0x0266327a objc_destructInstance + 48
16 libobjc.A.dylib 0x026632ab object_dispose + 20
17 UIKit 0x01433d1a -[UIViewController dealloc] + 1854
18 UIKit 0x01430915 -[UIViewController release] + 89
19 libobjc.A.dylib 0x02669e97 objc_release + 71
20 libobjc.A.dylib 0x02656bf0 objc_setProperty_nonatomic + 48
21 UIKit 0x01a6167d -[_UIViewControllerOneToOneTransitionContext _setFromViewController:] + 47
22 UIKit 0x01a61490 -[_UIViewControllerOneToOneTransitionContext dealloc] + 43
23 libobjc.A.dylib 0x0266a692 _ZN11objc_object17sidetable_releaseEb + 268
24 libobjc.A.dylib 0x0266baeb -[NSObject release] + 25
25 UIKit 0x01a60834 -[_UIViewControllerTransitionContext completeTransition:] + 135
26 UIKit 0x01a7a5b1 -[UIViewControllerBuiltinTransitionViewAnimator transitionViewDidComplete:fromView:toView:removeFromView:] + 50
27 UIKit 0x01416137 -[UITransitionView notifyDidCompleteTransition:] + 345
28 UIKit 0x01415e61 -[UITransitionView _didCompleteTransition:] + 1333
29 UIKit 0x014181b7 -[UITransitionView _transitionDidStop:finished:] + 107
30 UIKit 0x013666dc -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
31 UIKit 0x013669c8 -[UIViewAnimationState animationDidStop:finished:] + 80
32 QuartzCore 0x00fd6bb4 _ZN2CA5Layer23run_animation_callbacksEPv + 304
33 libdispatch.dylib 0x0326b4d0 _dispatch_client_callout + 14
34 libdispatch.dylib 0x03259726 _dispatch_main_queue_callback_4CF + 340
35 CoreFoundation 0x0294243e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
36 CoreFoundation 0x028835cb __CFRunLoopRun + 1963
37 CoreFoundation 0x028829d3 CFRunLoopRunSpecific + 467
38 CoreFoundation 0x028827eb CFRunLoopRunInMode + 123
39 GraphicsServices 0x0301f5ee GSEventRunModal + 192
40 GraphicsServices 0x0301f42b GSEventRun + 104
41 UIKit 0x01316f9b UIApplicationMain + 1225
42 CloudFella 0x000eeea6 main + 94
43 libdyld.dylib 0x034af6d9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
#
If I log into the other cloud services available in my app (Google drive , dropbox, evernote) I got no issues at all.
The problem is happening with both the old LiveSDK API (the one included in the current good release out in the store) and the newest build (2 months old) added to the app to solve some validation issues described here: https://github.com/liveservices/LiveSDK-for-iOS/issues/43
I suspect that going from Xcode 5 to xcode 6 something changed in the building parameters that is causing the issue, however I am not sure where the issue is and how to workaround.
As test I forced building the app for 32 bit architectures only but it crashed as well: this was expected as the LiveSDK API is compatible with 64 bit arch, but certainly wanted to try... .
Any help is greatly appreciated.
Thanks,
dom
Turns out this may be indeed a bug on the liveSDK.
Opened the following issue:
https://github.com/liveservices/LiveSDK-for-iOS/issues/53
and another API user (https://github.com/sylverb) that ran into the same issue gave me a good workaround until the bug is fixed:
"It was crashing because of "[authRefreshRequest cancel];" in the release method of LiveConnectClientCore.m . I had a temporary fix by adding "self" at this line in refreshSessionWithDelegate method (also in LiveConnectClientCore.m) :
self.authRefreshRequest = [[[LiveAuthRefreshRequest alloc] initWithClientId:_clientId
scope:_scopes
refreshToken:refreshToken
delegate:delegate
userState:userState
clientStub:self]
autorelease];
"
Closing the post as solved because a workaround is provided and I added a link to the open bug opened for any other user that wants to follow up on this issue.

IOS7 app crashes in simulator when not in 64 bits, runs fine on iPhone4 and 5s

I am new here and new to iOS programming so bear with me!
I ran into this strange issue. I created an iPhone app which runs fine on my iPhone 5s and iPhone 4. However, when I run it on the iOS Simulator, Version 7.1 (463.9.41), it only runs in 64 bit mode and crashes for all the other modes.
Information based on your suggestions:
I renamed the property 'Description', with no changes and exactly the same error message including the word 'Description'. However, the word 'Description' is nowhere in my code anymore.
I cleared all contents in the ViewController and it still cranes.
All outlets and connections checked and OK.
Any idea what could be the cause?
* Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Description.'
* First throw call stack:
0 CoreFoundation 0x018021e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x015818e5 objc_exception_throw + 44
2 CoreFoundation 0x01891fe1 -[NSException raise] + 17
3 Foundation 0x01241d9e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x011ae1d7 _NSSetUsingKeyValueSetter + 88
5 Foundation 0x011ad731 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x0120fb0a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x004f81f4 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x015937de -[NSObject performSelector:] + 62
9 CoreFoundation 0x017fd76a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x004f6d4d -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x0035f6f5 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
12 UIKit 0x0035fe9d -[UIViewController loadView] + 302
13 UIKit 0x003600d3 -[UIViewController loadViewIfRequired] + 78
14 UIKit 0x003605d9 -[UIViewController view] + 35
15 UIKit 0x00280267 -[UIWindow addRootViewControllerViewIfPossible] + 66
16 UIKit 0x002805ef -[UIWindow _setHidden:forced:] + 312
17 UIKit 0x0028086b -[UIWindow _orderFrontWithoutMakingKey] + 49
18 UIKit 0x0028b3c8 -[UIWindow makeKeyAndVisible] + 65
19 UIKit 0x0023bbc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
20 UIKit 0x00240667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
21 UIKit 0x00254f92 -[UIApplication handleEvent:withNewEvent:] + 3517
22 UIKit 0x00255555 -[UIApplication sendEvent:] + 85
23 UIKit 0x00242250 _UIApplicationHandleEvent + 683
24 GraphicsServices 0x037f7f02 _PurpleEventCallback + 776
25 GraphicsServices 0x037f7a0d PurpleEventCallback + 46
26 CoreFoundation 0x0177dca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
27 CoreFoundation 0x0177d9db __CFRunLoopDoSource1 + 523
28 CoreFoundation 0x017a868c __CFRunLoopRun + 2156
29 CoreFoundation 0x017a79d3 CFRunLoopRunSpecific + 467
30 CoreFoundation 0x017a77eb CFRunLoopRunInMode + 123
31 UIKit 0x0023fd9c -[UIApplication _run] + 840
32 UIKit 0x00241f9b UIApplicationMain + 1225
33 Cards 0x0000c24d main + 141
34 libdyld.dylib 0x01e49701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Try to rename property Description to something else.
description is read only property of NSObject and some other objects and maybe it collides with your property.
Check your outlets for the Xibs or Storyboards, if one of them is not connected you will get this error. If you are using Key Value Coding then there is a wrong key name (check spelling).
I found the answer.
It happened after I changed the name of my project (top left in the xcode window). When you do this, Xcode asks if it also has to rename a couple of system files to which I answered "yes". After that, the name of my app is changed correctly, but crashes on the simulator unless it runs in 64 bit mode. On the iPhone it works fine in all cases.
Even when I leave all the all the item names unchanged except for the name of the app, the same things happens. When I change the name of the app back, all is OK.
I say it's a bug in Xcode.

Crash in TextInput - how to debug?

I'm getting crash reports for my iOS app with the following or similar stack in the crashed thread:
0 TextInput 0x0003149a TIInputManager::apply_case_changes_to_result(std::vector >&, KB::Hashmap const&, std::vector > const&) const + 402
1 TextInput 0x00030bf3 TIInputManager::lookup() + 863
2 TextInput 0x000307ad TIInputManager::autocorrection() + 61
3 TextInput 0x00042d21 -[TIKeyboardInputManagerZephyr autocorrection] + 137
4 UIKit 0x0011a319 -[UIKeyboardImpl generateCandidatesWithOptions:] + 377
5 UIKit 0x00133071 -[UIKeyboardImpl addInputString:fromVariantKey:] + 2597
6 UIKit 0x00130f8d -[UIKeyboardImpl handleKeyEvent:] + 1453
7 UIKit 0x001308b7 -[UIKeyboardLayoutStar sendStringAction:forKey:isPopupVariant:] + 487
8 UIKit 0x0012f3ad -[UIKeyboardLayoutStar touchUp:] + 3101
9 UIKit 0x0012e737 -[UIKeyboardLayout touchesEnded:withEvent:] + 387
10 UIKit 0x000165f9 -[UIWindow _sendTouchesForEvent:] + 525
11 UIKit 0x00003809 -[UIApplication sendEvent:] + 381
12 UIKit 0x00003123 _UIApplicationHandleEvent + 6155
13 GraphicsServices 0x000065a3 _PurpleEventCallback + 591
14 GraphicsServices 0x000061d3 PurpleEventCallback + 35
15 CoreFoundation 0x00097173 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
16 CoreFoundation 0x00097117 __CFRunLoopDoSource1 + 139
17 CoreFoundation 0x00095f99 __CFRunLoopRun + 1385
18 CoreFoundation 0x00008ebd CFRunLoopRunSpecific + 357
19 CoreFoundation 0x00008d49 CFRunLoopRunInMode + 105
20 GraphicsServices 0x000052eb GSEventRunModal + 75
21 UIKit 0x00057301 UIApplicationMain + 1121
22 MyApp 0x0000294b main (main.mm:8)
Only the bottom-most line (main) is mine. It looks like the crash is somewhere in an touch up event handler within the text input framework, and it has to do with autocorrect.
Those crashes come with disheartening consistency - this looks like a subtle bug of mine, not that of iOS itself. The call stack is inconsistent - sometimes it ends in UIKit, sometimes in libobjc. The iOS version, however, seems to be consistently 6.x.
Any idea how to debug this, please?
EDIT: SIGSEGV/SEGV_ACCERR in thread 0. The error address varies - sometimes, it's zero, sometimes not.
This is actually an error with Apple. Go into your Settings on the simulator (the Settings app on the sim, that is) and turn off auto correction.
I've seen the same on iOS 6.1.3 (twice) and 6.1.4 (once), all in the field reported as crashlogs. All seem to be nil pointer dereferences deep within Apple's C++ code for . I don't think that there is anything that we can do beyond filing a bug report with Apple (I've raised one listed as: 15573020). Apple treat duplicate reports as an indicator of prioritisation of bugs so if you have suffered I suggest that you add a report at https://bugreport.apple.com and reference the report I have provided.

Resources