Exception when switching apps

Perry
Perry
Community Member

Anytime I change the foreground application (e.g. click on another application's window) I'm getting two exceptions logged to the console from 'com.agilebits.onepassword4-helper'.

1Password 5 Version 5.0.2 (502007); OS X 10.10.2 (14C81f)

If this is an OS X issue, let me know the details and I'll file a radar with Apple.

1/2/15 5:20:15.295 PM 2BUA8C4S2C.com.agilebits.onepassword4-helper[436]: *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[3]
1/2/15 5:20:15.297 PM 2BUA8C4S2C.com.agilebits.onepassword4-helper[436]: (
    0   CoreFoundation                      0x00007fff87faa66c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff8224876e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff87e4e0f8 -[__NSPlaceholderArray initWithObjects:count:] + 360
    3   CoreFoundation                      0x00007fff87eb46d4 +[NSArray arrayWithObjects:count:] + 52
    4   CoreFoundation                      0x00007fff87eedaba -[NSDictionary allValues] + 202
    5   2BUA8C4S2C.com.agilebits.onepassword4-helper 0x000000010937f70c -[SGHotKeyCenter unregisterHotKey:] + 49
    6   2BUA8C4S2C.com.agilebits.onepassword4-helper 0x000000010947f9b4 -[OPHotKeyManager unregisterBrowserActivationKeyboardShortcut] + 170
    7   2BUA8C4S2C.com.agilebits.onepassword4-helper 0x000000010947feb2 -[OPHotKeyManager workspaceDidActivateApplication:] + 524
    8   CoreFoundation                      0x00007fff87f66cdc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    9   CoreFoundation                      0x00007fff87e58244 _CFXNotificationPost + 3140
    10  Foundation                          0x00007fff89f0fc31 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
    11  AppKit                              0x00007fff8fa585ba applicationStatusSubsystemCallback + 806
    12  LaunchServices                      0x00007fff838b788b ___LSScheduleNotificationFunction_block_invoke_2 + 47
    13  CoreFoundation                      0x00007fff87ec856c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    14  CoreFoundation                      0x00007fff87eba675 __CFRunLoopDoBlocks + 341
    15  CoreFoundation                      0x00007fff87eba1b6 __CFRunLoopRun + 1814
    16  CoreFoundation                      0x00007fff87eb9858 CFRunLoopRunSpecific + 296
    17  HIToolbox                           0x00007fff89c36bcf RunCurrentEventLoopInMode + 235
    18  HIToolbox                           0x00007fff89c3694a ReceiveNextEventCommon + 431
    19  HIToolbox                           0x00007fff89c3678b _BlockUntilNextEventMatchingListInModeWithFilter + 71
    20  AppKit                              0x00007fff8f246f01 _DPSNextEvent + 964
    21  AppKit                              0x00007fff8f2466b0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
    22  AppKit                              0x00007fff8f23a4e3 -[NSApplication run] + 594
    23  2BUA8C4S2C.com.agilebits.onepassword4-helper 0x000000010934db1f main + 149
    24  libdyld.dylib                       0x00007fff9090e5c9 start + 1
    25  ???                                 0x0000000000000001 0x0 + 1
)
1/2/15 5:20:15.299 PM 2BUA8C4S2C.com.agilebits.onepassword4-helper[436]: *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[3]
1/2/15 5:20:15.301 PM 2BUA8C4S2C.com.agilebits.onepassword4-helper[436]: (
    0   CoreFoundation                      0x00007fff87faa66c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff8224876e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff87e4e0f8 -[__NSPlaceholderArray initWithObjects:count:] + 360
    3   CoreFoundation                      0x00007fff87eb46d4 +[NSArray arrayWithObjects:count:] + 52
    4   CoreFoundation                      0x00007fff87eedaba -[NSDictionary allValues] + 202
    5   2BUA8C4S2C.com.agilebits.onepassword4-helper 0x000000010937f70c -[SGHotKeyCenter unregisterHotKey:] + 49
    6   2BUA8C4S2C.com.agilebits.onepassword4-helper 0x000000010947f9b4 -[OPHotKeyManager unregisterBrowserActivationKeyboardShortcut] + 170
    7   2BUA8C4S2C.com.agilebits.onepassword4-helper 0x00000001094800aa -[OPHotKeyManager workspaceDidDeactivateApplication:] + 454
    8   CoreFoundation                      0x00007fff87f66cdc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    9   CoreFoundation                      0x00007fff87e58244 _CFXNotificationPost + 3140
    10  Foundation                          0x00007fff89f0fc31 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
    11  AppKit                              0x00007fff8fa585ba applicationStatusSubsystemCallback + 806
    12  LaunchServices                      0x00007fff838b788b ___LSScheduleNotificationFunction_block_invoke_2 + 47
    13  CoreFoundation                      0x00007fff87ec856c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    14  CoreFoundation                      0x00007fff87eba675 __CFRunLoopDoBlocks + 341
    15  CoreFoundation                      0x00007fff87eb9e2e __CFRunLoopRun + 910
    16  CoreFoundation                      0x00007fff87eb9858 CFRunLoopRunSpecific + 296
    17  HIToolbox                           0x00007fff89c36bcf RunCurrentEventLoopInMode + 235
    18  HIToolbox                           0x00007fff89c3684e ReceiveNextEventCommon + 179
    19  HIToolbox                           0x00007fff89c3678b _BlockUntilNextEventMatchingListInModeWithFilter + 71
    20  AppKit                              0x00007fff8f246f01 _DPSNextEvent + 964
    21  AppKit                              0x00007fff8f2466b0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
    22  AppKit                              0x00007fff8f23a4e3 -[NSApplication run] + 594
    23  2BUA8C4S2C.com.agilebits.onepassword4-helper 0x000000010934db1f main + 149
    24  libdyld.dylib                       0x00007fff9090e5c9 start + 1
    25  ???                                 0x0000000000000001 0x0 + 1
)

Comments

  • Plato
    Plato
    Community Member

    @Perry‌

    I'm curious...
    If you did not look at the Console, would you even know that there's an issue?

  • Hi guys,

    @Perry:

    Anytime I change the foreground application (e.g. click on another application's window) I'm getting two exceptions logged to the console from 'com.agilebits.onepassword4-helper'.

    I'm not seeing it on OS X 10.10.2 here with 1Password 5.0.2. Do you notice any weird issues when trying to open 1Password mini via your keyboard shortcuts?

    Since you're using 10.10.2 beta, would you mind testing the 1Password 5.1 betas to see if it happens with that beta? To enable the beta update, open 1Password, go to the 1Password Menu > Preferences > Updates and check the Include beta updates. Check for updates and after installing the beta update, see if you can reproduce the exceptions.

    @Plato,

    I'm curious... If you did not look at the Console, would you even know that there's an issue?

    I can't speak for Perry but I'd imagine if you're using beta versions of OS X, you'd be looking at the Console every once in a while to make sure there aren't any glitches that you need to be aware of. I keep console open a lot to make sure OS X is in a proper state while I'm testing betas. I've actually caught things in the past that I filed bug reports with Apple and they fixed it in the next update when there were no obvious issues with the system.

  • Hi @Perry,

    Do you have any custom hotkeys configured for 1Password? Could you get us the results of these Terminal commands? If you need help running them, let us know.

    defaults read 2BUA8C4S2C.com.agilebits.onepassword4-helper  "ShortcutRecorder BrowserActivation"
    
    defaults read 2BUA8C4S2C.com.agilebits.onepassword4-helper  "ShortcutRecorder GlobalActiation"
    
    defaults read 2BUA8C4S2C.com.agilebits.onepassword4-helper  "ShortcutRecorder GlobalLock"
    

    This will give us a better chance at reproducing the problem.

    Thanks

    Rick

  • Perry
    Perry
    Community Member

    Sorry for the delay in replying ... deadlines and all that.

    Unfortunately (for reproduction purposes) I've changed computers and opted out of the 10.10.2 betas (they were playing fast and loose with Mail.app which I need to be stable) and the issue doesn't seem to happen on 10.10.1.

    I'm not using hotkeys but here are the results anyway:

     PerrysLaptop-2  src/CCTest1 % defaults read 2BUA8C4S2C.com.agilebits.onepassword4-helper  "ShortcutRecorder BrowserActivation"
    {
        keyChars = "\\\\";
        keyCharsIgnoringModifiers = "\\\\";
        keyCode = 42;
        modifierFlags = 1048576;
        modifiers = 256;
    }
     PerrysLaptop-2  src/CCTest1 % defaults read 2BUA8C4S2C.com.agilebits.onepassword4-helper  "ShortcutRecorder GlobalActiation"
    2015-01-24 15:43:57.744 defaults[97790:1565855]
    The domain/default pair of (/Users/perry/Library/Preferences/2BUA8C4S2C.com.agilebits.onepassword4-helper, ShortcutRecorder GlobalActiation) does not exist
     PerrysLaptop-2  src/CCTest1 % defaults read 2BUA8C4S2C.com.agilebits.onepassword4-helper  "ShortcutRecorder GlobalActivation" # fix typo
    {
        keyChars = "\\\\";
        keyCharsIgnoringModifiers = "\\\\";
        keyCode = 42;
        modifierFlags = 1572864;
        modifiers = 2304;
    }
     PerrysLaptop-2  src/CCTest1 % defaults read 2BUA8C4S2C.com.agilebits.onepassword4-helper  "ShortcutRecorder GlobalLock"
    {
        keyChars = "\\f";
        keyCharsIgnoringModifiers = l;
        keyCode = 37;
        modifierFlags = 1835008;
        modifiers = 6400;
    }
    

    As to why I look at the console, I'm a coder and I'm paid to look at the console :-) Sure it's noisy but I know when something is the kind of thing I'd like to hear about and I report it to the developers of the app in question if they're a smaller outfit.

    So when I logged into 1Password just now to see if I was still getting the exception I noted above, I got this multiple times instead:

    1/24/15 3:28:37.242 PM 2BUA8C4S2C.com.agilebits.onepassword4-helper[61091]: This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.  This will cause an exception in a future release.
     Stack:(
        0   CoreFoundation                      0x00007fff8b95164c __exceptionPreprocess + 172
        1   libobjc.A.dylib                     0x00007fff8ddee6de objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff8b9514fd +[NSException raise:format:] + 205
        3   Foundation                          0x00007fff8594cbe0 _AssertAutolayoutOnMainThreadOnly + 83
        4   Foundation                          0x00007fff8572b432 -[NSISEngine withBehaviors:performModifications:] + 31
        5   AppKit                              0x00007fff8d1667ea -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] + 70
        6   AppKit                              0x00007fff8d2423dc -[NSWindow(NSConstraintBasedLayout) updateConstraintsIfNeeded] + 208
        7   AppKit                              0x00007fff8d1e2696 -[NSView layoutSubtreeIfNeeded] + 155
        8   QuartzCore                          0x00007fff84afc310 -[CALayer layoutSublayers] + 219
        9   AppKit                              0x00007fff8d27e94d _NSBackingLayerLayoutSublayers + 158
        10  QuartzCore                          0x00007fff84afbef4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
        11  QuartzCore                          0x00007fff84afbd72 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
        12  QuartzCore                          0x00007fff84afb50e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
        13  QuartzCore                          0x00007fff84afb164 _ZN2CA11Transaction6commitEv + 390
        14  QuartzCore                          0x00007fff84b1167b _ZN2CA11Transaction14release_threadEPv + 193
        15  libsystem_pthread.dylib             0x00007fff82b2d81e _pthread_tsd_cleanup + 182
        16  libsystem_pthread.dylib             0x00007fff82b2d4e5 _pthread_exit + 117
        17  libsystem_pthread.dylib             0x00007fff82b2c761 _pthread_wqthread + 879
        18  libsystem_pthread.dylib             0x00007fff82b2a4a1 start_wqthread + 13
    )
    

    It happened when I was asked for my master password but when I exited 1Password and restarted it, I didn't get asked for my password again (hey magic!) and the messages didn't appear again.

  • Hi @Perry,

    Thanks for getting back to us. So you're not seeing the issue on 10.10.1? I'm tempted to call this a bug in 10.10.2-beta. Those betas have been rather...buggy.

    What version of 1Password are you currently using? I know that we fixed a bunch of those issues in 5.1 (out today), but in all of the cases that we fixed, we'd have seen one of our methods in the stack trace. In this case I'm not seeing any of our code executing in your stack trace. Very bizarre. If you stumble upon a way to reproduce that, I'd be happy to take a look.

    Rick

This discussion has been closed.