iOS 10 Preferences crashes when trying to add my custom keyboard - ios

I am trying to develop my custom keyboard extension.
When i am trying to actually enable my keyboard from the settings it crashes. I go settings->general->keyboard->keyboards -> settings app crashes here.
My device log look like this:
2 CoreFoundation 0x183774108 +[NSException raise:format:] + 116
3 Foundation 0x18415f45c -[NSCountedSet addObject:] + 92
4 KeyboardSettings 0x1984a8058 +[TIKeyboardListController keyboardDisplayNameForIdentifier:] + 476
5 KeyboardSettings 0x1984a41a8 -[TIInputModeTableCell title] + 168
.....
So seems like this is somehow related to my extension display name. It is "SebastianCatKeyboard". I've tried to change it several times but crash is still there.
When i remove my container app with extension settings are not crashing. So this is definitely related to my keyboard.
I would really appreciate any help.
Many thanks.

Related

Missing dSYM for UIKitCore, CoreFoundation, etc

I am trying to symbolicate an iOS crash report. I am missing dSYMs for UIKitCore and other native libs.
The app is built with NativeScript. I have successfully symbolicated frames of my app and NativeScript framework. However I can't seem to find a way to symbolicate frames of libs like UIKitCore, they are still showing up as addresses. I have also tried searching for them using mdfind as per Apple documentation - they are not present on my Mac. I have also tried looking for these dSYMs online without luck.
Here is an excerpt of my crash log:
Last Exception Backtrace:
0 CoreFoundation 0x1cb5d927c 0x1cb4c1000 + 1147516
1 libobjc.A.dylib 0x1ca7b39f8 0x1ca7ae000 + 23032
2 NativeScript 0x10420fca0 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool) + 277664 (JSErrors.mm:189)
3 NativeScript 0x104223354 NativeScript::FFICallback<NativeScript::ObjCBlockCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*) + 357204 (FFICallbackInlines.h:33)
4 NativeScript 0x104cb9894 ffi_closure_SYSV_inner + 11458708 (ffi.c:1218)
5 NativeScript 0x104cbc1b4 .Ldo_closure + 19
6 libdispatch.dylib 0x1cb018a38 0x1cafb9000 + 391736
7 libdispatch.dylib 0x1cb0197d4 0x1cafb9000 + 395220
8 libdispatch.dylib 0x1caff99e4 0x1cafb9000 + 264676
9 CoreFoundation 0x1cb56ac1c 0x1cb4c1000 + 695324
10 CoreFoundation 0x1cb565b54 0x1cb4c1000 + 674644
11 CoreFoundation 0x1cb5650b0 0x1cb4c1000 + 671920
12 GraphicsServices 0x1cd76579c 0x1cd75b000 + 42908
13 UIKitCore 0x1f7edf978 0x1f7623000 + 9161080
14 NativeScript 0x104cbc044 ffi_call_SYSV + 67
15 NativeScript 0x104cb8fb4 ffi_call_int + 11456436 (ffi.c:758)
16 NativeScript 0x104cb8ab0 ffi_call + 11455152 (ffi.c:767)
17 NativeScript 0x1041d4f90 NativeScript::FunctionWrapper::call(JSC::ExecState*) + 36752 (FunctionWrapper.mm:97)
18 NativeScript 0x104cb7b58 llint_entry + 32567
Many articles I found had examples with UIKitCore symbolicated so I assume this has to do with my configuration.
Part 1: Install the symbols
Check the full iOS version in the crash report. It should look like "iPhone OS 13.3 (17C54)"
There are a lot of repositories with iOS symbols or links to them. Like this one: https://github.com/Zuikyo/iOS-System-Symbols/blob/master/collected-symbol-files.md
Find and download symbols you need.
Unpack them to ~/Library/Developer/Xcode/iOS\ DeviceSupport
Add info.plist into the root folder if it missed (just copy from the other symbols and change its version value)
Part 2. Use the force of Xcode
Connect ANY real device, open Xcode, open the "Devices and Simulators" window, click the "View device logs" and then go to tab "All logs".
Drag and drop the crash into the table. Find it.
If the system symbols are not desymbolicated – do right-click on the crash and select "Re-symbolicate crash".
Repeat Step 3 multiple times (2-3 usually enough) – it needs time to resymbolicate it, but it looks like xcode does not update the crashlog automatically
And yes, UIKitCore is a system framework
UIKitCore is NOT an apple framework.

splashboardd SIGABRT crash in IOS -- what could it mean?

I'm running corona SDK with a chartboost plugin, and I'm experiencing crashes about 20% of the time at startup, when I try to initialize the plugin (which I can't edit, I don't have the source).
Here's the symbolicated crash report: http://pastebin.com/id1AsjmN
I've been reading up a little on how to make sense of these crash reports, and from what I understand, these two frames in the main thread:
9 CoreFoundation 0x295d9008 +[NSException raise:format:arguments:] + 100
10 Foundation 0x2a2d8bc4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 88
Are the most critical to understanding my problem. How can I understand what these lines mean? The "object:file:lineNumber:description:" and "raise:format:arguments:" business seems almost cruel, because I feel like those should be filled in with information that would help me -- what class, and line number we're talking about. Am I right? Are these placeholders in the error message? What am I not grokking here? Is there ANY way of knowing where this error came from?
It's not symbolicated crash log. To be more precise, partially symbolicated.
9 CoreFoundation 0x295d9008 +[NSException raise:format:arguments:] + 100
10 Foundation 0x2a2d8bc4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 88
11 UIKit 0x2d00946e -[UINib initWithNibName:directory:bundle:] + 158
12 UIKit 0x2d00955c +[UINib nibWithNibName:bundle:] + 56
13 splashboardd 0x000bee8c 0xbc000 + 11916
Somewhere in your splashboard code something is called (0x000bee8c 0xbc000 + 11916 - not symbolicated). This calls +[UINib nibWithName:bundle:], which calls -[UINib initWithNibName:directory:bundle:], which causes your crash.
Google for How to symbolicate crash log and when you'll succeed, 0xbc000 + 11916 will be replaced with class name, method name, line number, ... That's the place where the problem is. Also that's the reason why you should keep debug symbols for your app as well. To be able to symbolicate it.
Also sometimes there's useful info in console as well. Additional messages, which can help you with debugging.

iOS Simulator crashing in compile

I'm new to xcode and this forum, so sorry for my unprofessional language.
I have a problem with the iOS simulator crashing when I'm trying to run an app. It does not always happen, when I've just started working on a project everything's fine. But then suddenly after I just change something minor in the code the iOS simulator crashes as soon as it starts (compiling works). Xcode then takes me to the debugging page and also shows a lot of output in the bottom-right-corner-window (which I don't know what it's called). I don't get anything of the output, it says something about NSencryption. Once the iOS simulator has started crashing it will crash every time it starts running that project/app. Even if I undo my changes I did when it stopped working and even if I erase all of my code and everything looks like a new project, IT JUST WON'T RUN.
Tried to call Apple support to solve this problem, but they said I should post a question in a forum, hope you can help me as I am really getting tired of this, I can't build anything.
Btw I've tried to reset the iOS simulator but the same problem continues to occur.
Here is the output I get from the 'console': Btw, please tell me if any of this code is sensible and I will remove it.
2015-03-26 17:39:52.727 Testing123[19815:4331412] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Testing123.ViewController 0x7f93ea8272c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key addFive.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001026e1a75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000104239bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001026e16b9 -[NSException raise] + 9
3 Foundation 0x0000000102afcd43 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x000000010262b5e0 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x000000010323b4ed -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x0000000103099a88 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
7 UIKit 0x000000010309a078 -[UIViewController loadView] + 109
8 UIKit 0x000000010309a2e9 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x000000010309a77e -[UIViewController view] + 27
10 UIKit 0x0000000102fb9509 -[UIWindow addRootViewControllerViewIfPossible] + 58
11 UIKit 0x0000000102fb98a1 -[UIWindow _setHidden:forced:] + 247
12 UIKit 0x0000000102fc5f8c -[UIWindow makeKeyAndVisible] + 42
13 UIKit 0x0000000102f700c2 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2732
14 UIKit 0x0000000102f72e3e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1349
15 UIKit 0x0000000102f71d35 -[UIApplication workspaceDidEndTransaction:] + 179
16 FrontBoardServices 0x0000000105deb243 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
17 CoreFoundation 0x0000000102616c7c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
18 CoreFoundation 0x000000010260c9c5 __CFRunLoopDoBlocks + 341
19 CoreFoundation 0x000000010260c785 __CFRunLoopRun + 2389
20 CoreFoundation 0x000000010260bbc6 CFRunLoopRunSpecific + 470
21 UIKit 0x0000000102f717a2 -[UIApplication _run] + 413
22 UIKit 0x0000000102f74580 UIApplicationMain + 1282
23 Testing123 0x00000001025051ee top_level_code + 78
24 Testing123 0x000000010250522a main + 42
25 libdyld.dylib 0x0000000104a15145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
This is the code that gives me this error:
` import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}`
Here is the project
You haven't given many details, but here's how to start resolving your problem.
The bottom of your Xcode app has a debugger window. In that window, messages from the app will display. When your app crashes, it will print out a stack trace which shows what happened just prior to the crash.
When posting here, you'll want to include that in your post. Within that crash log, the top portion will tell you what the problem was--typical issues are nil values or calling something outside a range. Looking further down in the crash log, you'll usually see system stuff (UIKit, etc.). Look at the most recent method called in the class YOU created. Then, find that method in your code and add a breakpoint next to it. The breakpoint will stop execution of your code when it gets to that spot. At the top of the debugger window in the bottom portion of your screen, you'll see a few buttons. One of them is "step over". When you hit your breakpoint, use the "step over" button to execute your code one line at a time. When you get to your problem, it'll crash.
You'll also want to Google the error the debug console spits out. 9 times out of 10, someone's encountered the issue you're encountering and you'll be able to proceed towards resolution of your problem. If that doesn't get the problem solved, you'll want to post here with details and the problematic methods.
Another thing I'd recommend doing is learning how to use GitHub. When I started learning this (and I still AM learning it), git seemed like overkill, but in hindsight it would have been a good idea to learn how to use git from the start. You'll be able to create branches to work on features in your software and merge them to a "master" when you've got new features working. When I was starting, I would get fairly far along, I'd make a minor change and I'd break a bunch of stuff--that will still happen with Git, but you'll have a version of the software that functions. Using Git, you'll be able to always have a stable version that works and you can add features without worrying about blowing up your entire project.
Good luck!
Update for new info:
Your starting point would be Googling this: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: ViewController setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key.
Also, the import UIKit should be #import UIKit. I suspect this post will steer you in the right direction.
What does this mean? "'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X"
Solution:
You have a ViewController.swift file, but your storyboard file is
1) incorrectly named and
2) doesn't have any scenes on it.
Here's what you need to do:
1) rename the storyboard file "Main.storyboard"
2) add a View Controller scene on storyboard, as you currently have no scenes on your storyboard. You do this by dragging & dropping View Controller from the lower right-hand portion of the screen.
3) When your ViewController scene is highlighted, at the top right-hand portion of your screen you should see some buttons. One of them is called "Attributes Inspector". Make sure "Is Initial View Controller" is checked. One button over to the left is "Identity Inspector". Make sure class is set to ViewController.
I'll say it again. If you want to learn iOS, I'd recommend learning GitHub first. Additionally, Stanford University has a free iOS course taught by a guy who worked closely with Steve Jobs which you'll probably find helpful. If it's "too much" starting out, I'd suggest picking up a Big Nerd Ranch book or looking at Ray Wenderlich's website.
The pertinent part of the error message is:
"[<Testing123.ViewController 0x7f93ea8272c0> setValue:forUndefinedKey:]: this class is not key value coding-compliantfor the key addFive.'
Look for where you are using addFive. That is not defined for the instance yu are using it with.

Persistent crash on my iOS App, unable to locate it

I'm searching for 5 days ago about this crash, but I can find why my app crash sometimes.
I'm using the Crittercism library to log my crash. The dSYM file is correctly uploaded on the Crittercism website. Here the crash log from Crittercism:
0 libobjc.A.dylib 0x38540626 objc_msgSend + 6
1 UIKit 0x307baaf7 -[_UIModalItemsCoordinator _notifyDelegateModalItem:tappedButtonAtIndex:] + 95
2 UIKit 0x307ba96d -[_UIModalItemAlertContentView tableView:didSelectRowAtIndexPath:] + 749
3 UIKit 0x306c205f -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1079
4 UIKit 0x30774377 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 215
5 UIKit 0x306236f5 _applyBlockToCFArrayCopiedToStack + 317
6 UIKit 0x3059c55b _afterCACommitHandler + 431
7 CoreFoundation 0x2dd532a5 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 21
8 CoreFoundation 0x2dd50c49 __CFRunLoopDoObservers + 285
9 CoreFoundation 0x2dd50f8b __CFRunLoopRun + 731
10 CoreFoundation 0x2dcbbf0f CFRunLoopRunSpecific + 523
11 CoreFoundation 0x2dcbbcf3 CFRunLoopRunInMode + 107
12 GraphicsServices 0x32bc0663 GSEventRunModal + 139
13 UIKit 0x3060716d UIApplicationMain + 1137
14 myApp 0x000c3357 main (main.m:16)
15 libdyld.dylib 0x38a43ab7 start + 3
The thing is: I have many UITableView in my app. But I can't find which one it is.
How do I have to process to debug this crash ? I didn't find some useful information on Apple Developer Center. I try to use the atos command to symbolicate the file, but no useful information. It's exactly the same info than on the Crittercism website.
Here the command I used: atos -arch armv7 -o myApp (to enter interactif mode, then, enter each memory address like : 0x307baaf7)
I have only the myApp.app.dSYM archive, and to use this command (above), I used the file the archive at path: Contents/Resources/DWARF/myApp
I'm really lost. Any idea ? Suggestions ? Thank you so much for your help.
EDIT 1:
I've checked all my UIAletView and delegate of UIAlertView: all is ok.
I see the crash log on Crittercism, (around 120 crashes for 63 users on iOS 7 only, iPhone and iPad).
I can't reproduced it ! I really don't understand.
Frame 14 already shows the correct symbol, which is main.m line 16. Using atos with the address as written in the stackframe like you did is wrong, see this stackoverflow explanation. As such it is not possible for a crash report to tell you which table view is causing such a memory issue.
Based upon the above you may not be able to get the exact table view from the stack trace itself, but with Crittercism there are additional features (such as Breadcrumbs) that allow for capturing a trail beyond just the stack.
My recommendation is to add a breadcrumb in the viewDidLoad of the TableViewController and grab/define the name of the table view there. That way you can step through the breadcrumbs and know that leading up to the crash you were in this tableview.
That should help you for better capturing this scenario in the future.
As for this particular stack trace. You can potentially use the techniques described in this post to help you better understand the true origins of the objc_msgSend.
* See the Kerni's response below in the comments *

Crash log partially symbolicated [duplicate]

I am trying to analyse a crash log that a customer sent me, but I cannot get it to symbolicate the system library calls. It does symbolicate calls to my own methods correctly. That does not make it very practical to analyse what goes wrong.
I have run 'symbolicatecrash -v', to see what is causing the lack of symbolication. The likely cause is this:
## /Users/baraupp/Library/Developer/Xcode/iOS DeviceSupport/6.1.3 (10B329)/Symbols/usr/lib/system/libsystem_kernel.dylib doesn't contain armv7s slice
I have checked the mentioned libraries with 'lipo', which says that they contain 'armv7' but no 'armv7s'. After searching the web, it came out that this is a difference between iPhone 4 and iPhone 5. The normal solution seems to be to plug-in an iPhone 5 device and download the libraries from there. But I don't have an iPhone 5.
Anybody knows how to solve this?
To give you an idea how the symbolication looks like:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3bab0350 0x3ba9f000 + 70480
1 libsystem_c.dylib 0x3ba26fb2 0x3b9f8000 + 192434
2 libsystem_c.dylib 0x3ba63366 0x3b9f8000 + 439142
3 libc++abi.dylib 0x3b00bdda 0x3b008000 + 15834
4 libc++abi.dylib 0x3b009094 0x3b008000 + 4244
5 libobjc.A.dylib 0x3b5bca58 0x3b5b4000 + 35416
6 libc++abi.dylib 0x3b009118 0x3b008000 + 4376
7 libc++abi.dylib 0x3b0091b0 0x3b008000 + 4528
8 libc++abi.dylib 0x3b00a626 0x3b008000 + 9766
9 libobjc.A.dylib 0x3b5bc9b0 0x3b5b4000 + 35248
10 CoreFoundation 0x3380829c 0x337ff000 + 37532
11 CoreFoundation 0x338080c4 0x337ff000 + 37060
12 GraphicsServices 0x373e7336 0x373e2000 + 21302
13 UIKit 0x357242b4 0x356cd000 + 357044
14 Flyskyhy 0x000f8a66 main (main.m:17)
15 Flyskyhy 0x000f8a1c 0xf6000 + 10780
There are only two ways to solve this:
You either need an iPhone 5 device with iOS 6.1.3 to plug into your computer so Xcode can import the symbols
Or you need to get the symbols from another developer and replace yours with them.
Usually the symbols are part of the latest Xcode release, but Apple doesn't always provide Xcode updates when an iOS version only contains bug-fixes but no API changes.
I ran into this issue as well with an iOS7 app using XCode5, even though I had all the correct symbols.
What I found was that I had taken my dSYM file out of the archive where spotlight could index it, but the crashlog was only getting partically symbolicated (as seen in the question). But I had left the actual .app file in an xcarchive, and it was not able to be indexed by spotlight. As soon as I copied that file out of the archive to the visible location, I was able to symbolicate properly.
In following answer of Kerni:
You can install related Xcode with your target version of iOS and copy ~/Library/Developer/Xcode/iOS DeviceSupport/

Resources