Closed pjrobertson closed 12 years ago
OK, actually I see the bug appears to be with this line: https://github.com/nathanday/ndhotkeyevent/blob/master/Classes/NDKeyboardLayout.m#L339
EDIT: 300 users are running a beta version of the app, and I've had 4 or 5 crash reports exactly the same as above, so it seems to be pretty serious.
In Xcode try running the analyser against Quicksilver (Product > Analyze). I did that and it came up with a few reference counting issue. I tried it against ndhotkeyevent, and I only found 2 dead store issues, I will look into it further when I get a chance.
Thanks Nathan,
I'm away for the next week, but I'll update our internal issue and hopefully another dev can look into it
Having used the Analyser, we've found a few retain/release issues but nothing that appears to be related to NDKeyboardLayout or the code that's causing the problem.
Within Quicksilver we're only using the two (newer) NDKeyboardLayout classes, but your older NDHotKey classes (for some reason we couldn't get the newer ones to work 64 bit). The NDKeyboardLayout classes look to be completely independent, but I thought I'd say nonetheless.
OK, I will have a look, I haven't had a just yet, but I do plan to investigate this.
Hi Nathan, we have progressed forward with this bug, and it appears to exist for non-English keyboard layouts such as the Kotoeri Japanese keyboard layout. In these cases, the kTISPropertyUnicodeKeyLayoutData
value for these keyboard layouts are NULL
. Attempting to CFRetain(NULL)
on the problematic line is what is causing the crash.
For further info, please see one of our dev's posts at https://github.com/quicksilver/Quicksilver/issues/942#issuecomment-6847221
Perhaps you have some advice on what best to do for these keyboard layouts - revert to some default keyboard layout?
No worries about not looking over the issue Nathan (btw the part timer comment here was directed at @tiennou (joke of course), not you!)
@tiennou appears to have come up with a solution, that is documented in https://github.com/quicksilver/Quicksilver/issues/942#issuecomment-6877649
Does this seem like a feasible solution for you? This is the last bug we need to get fix before the next release of Quicksilver, so if you think it is, we'll make the change then release.
As an aside: This might be a memory leak. We've altered the code slightly to explicitly release the object. Might be worth adding that if you're changing the code.
Cheers
I'm pretty sure I'm not doing anything out of the ordinary with my code, so it may well be a bug in NDKeyboardLayout. I'm unable to reproduce the problem (user's uploaded crash report). The user's comments on the crash are:
"Just typed one of the bookmark entries for safari" implying no modifier keys were pressed.
My own code that triggered the crash:
https://github.com/quicksilver/Quicksilver/blob/master/Quicksilver/Code-QuickStepInterface/QSSearchObjectView.m#L1180
Crash log: