nylas-mail icon indicating copy to clipboard operation
nylas-mail copied to clipboard

App crashes when I change Keyboard/Spelling Settings on OS X

Open smacking opened this issue 10 years ago • 8 comments

Changing the "Spelling" language here makes the App crash: http://cl.ly/070l2e240R19

smacking avatar Jan 04 '16 18:01 smacking

Hey @smacking — I'm able to reproduce this and get this stack trace:


VM Regions Near 0x18:
--> 
    __TEXT                 000000010c3ec000-000000010c3ed000 [    4K] r-x/rwx SM=COW  /Edgehill/*/Electron.app/Contents/Frameworks/Electron Helper.app/Contents/MacOS/Electron Helper

Application Specific Information:
objc_msgSend() selector name: _languagePreferencesChanged:


Thread 0 Crashed:: CrRendererMain  Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                 0x00007fff8b8d3e5d objc_msgSend + 29
1   com.apple.CoreFoundation        0x00007fff892edc2f ___CFXRegistrationPost_block_invoke + 63
2   com.apple.CoreFoundation        0x00007fff892f74dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
3   com.apple.CoreFoundation        0x00007fff892d6df5 __CFRunLoopDoBlocks + 341
4   com.apple.CoreFoundation        0x00007fff892d6b5b __CFRunLoopRun + 2347
5   com.apple.CoreFoundation        0x00007fff892d5fc8 CFRunLoopRunSpecific + 296
6   com.apple.Foundation            0x00007fff84b21f59 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 270
7   com.github.electron.framework   0x000000010c573964 0x10c3f3000 + 1575268
8   com.github.electron.framework   0x000000010c57313c 0x10c3f3000 + 1573180

It looks like this is a bug further down in Chromium. I'll file this with Electron and we'll see if we can get it fixed.

bengotow avatar Jan 04 '16 19:01 bengotow

Update: It appears _languagePreferencesChanged is part of NSSpellChecker itself (https://github.com/pombredanne/osx_headers/blob/f1f06894f1c7c37d8c970a5fd7c3960cfefec2cf/Frameworks/AppKit/NSSpellChecker.h). Most likely we're causing an instance of NSSpellChecker to be released without being cleaned up. Not entirely sure how that happens, but I'm not able to reproduce it in a stock Electron app.

bengotow avatar Jan 04 '16 20:01 bengotow

This would be a bug with node-spellchecker

mbilker avatar Jan 04 '16 20:01 mbilker

node-spellchecker allocates the NSSpellchecker at https://github.com/atom/node-spellchecker/blob/master/src/spellchecker_mac.mm#L10

mbilker avatar Jan 04 '16 20:01 mbilker

@bengotow @mbilker I'm not a technical guy so not really sure about what you guys are spoking about :) In any case, here's a video of the error happening: http://cl.ly/3I0B1N0k162H

smacking avatar Jan 04 '16 22:01 smacking

Actually the App becomes like this when I reload it: http://cl.ly/152H212V3S16

I have to Force-quit to have it to work properly again.

smacking avatar Jan 04 '16 23:01 smacking

Looks like the app also crashes if you change Settings -> Keyboard -> Text -> "for Double Quotes" dropdown menu

bengotow avatar Jan 27 '16 07:01 bengotow

This should be addressed by atom/node-spellchecker#30.

bengotow avatar Jan 31 '16 04:01 bengotow