Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when pressing Install Key Bindings #1

Closed
Eddpt opened this issue Oct 7, 2016 · 14 comments
Closed

Crash when pressing Install Key Bindings #1

Eddpt opened this issue Oct 7, 2016 · 14 comments

Comments

@Eddpt
Copy link

Eddpt commented Oct 7, 2016

I tried installing it on macOS 10.12 (16A323) with Xcode 8.0 (8A218a) and every time I pressed Install Key Bindings the Import.app was crashing.

For some reason, changing the order of the following steps fixed it for me:

  • (optional) click on Install Key Bindings to install ⌘ + ctrl + P binding
  •  -> System Preferences... -> Extensions -> All -> Enable Import

I had to:

  •  -> System Preferences... -> Extensions -> All -> Enable Import
  • (optional) click on Install Key Bindings to install ⌘ + ctrl + P binding

instead.

Any reason why this could be happening?

Other than that, this extension is awesome!

@markohlebar
Copy link
Owner

@Eddpt thanks dude! Any chance for a crash report?

@Eddpt
Copy link
Author

Eddpt commented Oct 7, 2016

Sure!

Performing @selector(installKeyBindings:) from sender NSButton 0x6000001493d0

Import_Crash.txt

@markohlebar
Copy link
Owner

@Eddpt thanks for that! I'm having some issues symbolicating that though. Not sure if it's because I just changed the extension from .txt to .crash 😬 If you have the time I would appreciate if you could send me the original .crash file.

@Eddpt
Copy link
Author

Eddpt commented Oct 7, 2016

There you go

Import_2016-10-07-115413.zip

@markohlebar
Copy link
Owner

I'm getting this madness when I'm trying to symbolicate it

Symbolicating Import.crash ... 61721 characters read. Use of uninitialized value $sdkGuess in concatenation (.) or string at ./symbolicatecrash line 1355. SDK guess for tool search is '' otool path is '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool' atos path is '/Applications/Xcode.app/Contents/Developer/usr/bin/atos' symbols path is '/Applications/Xcode.app/Contents/Developer/usr/bin/symbols' size path is '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size' Use of uninitialized value $model in concatenation (.) or string at ./symbolicatecrash line 1379. Hardware Model OS Version 10.12 Build 16A323 Unsupported crash log version: 12 at ./symbolicatecrash line 614.

I tried all that google offered and couldn't make it symoblicate the thing 😱

I'll try to repro the crash or make some sense of it, cheers!

@markohlebar
Copy link
Owner

Got something be following this gist https://gist.github.com/bmatcuk/c55a0dd4f8775a3a2c5a

@markohlebar
Copy link
Owner

Seems to crash here KeyBindingsInserter.insertVanillaPlist() -> () (in Import) (KeyBindingsInserter.swift:49)

@Eddpt
Copy link
Author

Eddpt commented Oct 7, 2016

Hmm, there's a lot of force unwrapping happening around those variables, as a general rule we should avoid it using guard and the likes.

However, are any of those files/variables at all related with something created upon enabling the plug-in? (System Preferences... -> Extensions -> All -> Enable Import)

@markohlebar
Copy link
Owner

Yeah that's some bad code over there :D
Can you send me your ~/Library/Developer/Xcode/UserData/KeyBindings/Default.idekeybindings
file?

@Eddpt
Copy link
Author

Eddpt commented Oct 7, 2016

I can, but it is no longer crashing, if I can replicate it we could look at the file. Do you still want it?

@markohlebar
Copy link
Owner

I'm guessing it crashes here let bindings = ((existingPlist[KeyBindings.Key.MenuKeyBindings] as! NSDictionary)[KeyBindings.Key.KeyBindings] as! NSMutableArray)

@markohlebar
Copy link
Owner

Yeah send it over pls :)

@Eddpt
Copy link
Author

Eddpt commented Oct 7, 2016

@markohlebar
Copy link
Owner

Yeah it's the same as mine... I'm rewriting that mess with force unwrapping now, hopefully it fixes the situation. Cheers!

markohlebar added a commit that referenced this issue Oct 7, 2016
Refactored code to potentially fix #1
markohlebar pushed a commit that referenced this issue Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants