Jump to content

Alfred hangs when poor/no internet connectivity


ToBeFrank

Recommended Posts

  • What you were doing when the issue happened

I was replacing equipment in my network, and I noticed that when my macbook has a wifi connection, but no actual connectivity to the internet, Afred will hang when brought up with cmd-space. The text entry box will pop up, but it won't respond to keyboard input for 20+ seconds. This generally isn't a problem since I always have connectivity, but now I am in a hotel with wifi that works, but is spotty and slow, and I am experiencing the same Alfred hang.

  • Whether you were able to replicate it a second time by performing the same action

I can easily replicate this. If I turn off wifi on my macbook, Alfred works normally. If I turn wifi back on, alfred starts exhibiting the hanging problem. You could probably replicate this by having a wifi connection but unplugging your actual internet connection.

  • Include the Alfred version & build number you are using

v2.8.4 (437)

  • Include your OS X version

10.10.5

Link to comment
Share on other sites

Since you asked for it in the other bug report about hanging, here is the sample report:

Sampling process 844 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Alfred 2 (pid 844) every 1 millisecond
Process:         Alfred 2 [844]
Path:            /Applications/Alfred 2.app/Contents/MacOS/Alfred 2
Load Address:    0x100000000
Identifier:      com.runningwithcrayons.Alfred-2
Version:         2.8.4 (437)
Code Type:       X86-64
Parent Process:  ??? [1]

Date/Time:       2016-04-30 09:29:51.919 -0500
OS Version:      Mac OS X 10.10.5 (14F1713)
Report Version:  7
Analysis Tool:   /usr/bin/sample
----

Call graph:
    2614 Thread_30015   DispatchQueue_1: com.apple.main-thread  (serial)
    + 2614 ???  (in Alfred 2)  load address 0x100000000 + 0x15c4  [0x1000015c4]
    +   2614 NSApplicationMain  (in AppKit) + 1832  [0x7fff927dd244]
    +     2614 -[NSApplication run]  (in AppKit) + 711  [0x7fff92860b68]
    +       2614 ???  (in Alfred 2)  load address 0x100000000 + 0x3dcc  [0x100003dcc]
    +         2614 -[NSApplication sendEvent:]  (in AppKit) + 4199  [0x7fff929378b1]
    +           2614 -[NSWindow sendEvent:]  (in AppKit) + 470  [0x7fff9293ac86]
    +             2614 -[NSWindow _reallySendEvent:isDelayedEvent:]  (in AppKit) + 5452  [0x7fff92fa90fb]
    +               2614 -[NSTextView keyDown:]  (in AppKit) + 695  [0x7fff92ab986a]
    +                 2614 -[NSView interpretKeyEvents:]  (in AppKit) + 207  [0x7fff92ab9a54]
    +                   2614 -[NSTextInputContext handleEvent:]  (in AppKit) + 109  [0x7fff92ab9b4e]
    +                     2614 -[NSTextInputContext _handleEvent:options:completionHandler:]  (in AppKit) + 1266  [0x7fff92aba085]
    +                       2614 -[NSTextInputContext tryTSMProcessRawKeyEvent:dispatchCondition:setupForDispatch:furtherCondition:dispatchWork:continuation:]  (in AppKit) + 127  [0x7fff92aba352]
    +                         2614 __61-[NSTextInputContext _handleEvent:options:completionHandler:]_block_invoke949  (in AppKit) + 131  [0x7fff93080e86]
    +                           2614 TSMProcessRawKeyEventWithOptionsAndCompletionHandler  (in HIToolbox) + 3068  [0x7fff9209076f]
    +                             2614 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke  (in HIToolbox) + 251  [0x7fff920abf25]
    +                               2614 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2  (in HIToolbox) + 259  [0x7fff920ac112]
    +                                 2614 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3  (in HIToolbox) + 330  [0x7fff920ac386]
    +                                   2614 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4  (in HIToolbox) + 251  [0x7fff920ac4d0]
    +                                     2614 TSMKeyEvent_WithCompletionHandler  (in HIToolbox) + 701  [0x7fff920ac7cd]
    +                                       2614 __utDeliverTSMEvent_WithCompletionHandler_block_invoke  (in HIToolbox) + 437  [0x7fff920ac988]
    +                                         2614 __utDeliverTSMEvent_WithCompletionHandler_block_invoke_2  (in HIToolbox) + 296  [0x7fff920acae9]
    +                                           2614 SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler  (in HIToolbox) + 295  [0x7fff920acd51]
    +                                             2614 SendFilterTextEvent_WithCompletionHandler  (in HIToolbox) + 236  [0x7fff920ad08f]
    +                                               2614 SendTSMEvent_WithCompletionHandler  (in HIToolbox) + 501  [0x7fff920ad2c0]
    +                                                 2614 __SendFilterTextEvent_WithCompletionHandler_block_invoke  (in HIToolbox) + 189  [0x7fff920ad5a6]
    +                                                   2614 __SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler_block_invoke  (in HIToolbox) + 400  [0x7fff920ad76c]
    +                                                     2614 SendTSMEvent_WithCompletionHandler  (in HIToolbox) + 417  [0x7fff920ad26c]
    +                                                       2614 SendEventToEventTargetWithOptions  (in HIToolbox) + 43  [0x7fff92048e22]
    +                                                         2614 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)  (in HIToolbox) + 386  [0x7fff92048fae]
    +                                                           2614 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)  (in HIToolbox) + 1260  [0x7fff92049b6c]
    +                                                             2614 _NSTSMEventHandler  (in AppKit) + 324  [0x7fff92abbb2e]
    +                                                               2614 -[NSTextInputContext handleTSMEvent:completionHandler:]  (in AppKit) + 3122  [0x7fff92abc7d5]
    +                                                                 2614 -[NSTextInputContext tryHandleTSMEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:]  (in AppKit) + 101  [0x7fff92abcb18]
    +                                                                   2614 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2  (in AppKit) + 95  [0x7fff92abcba0]
    +                                                                     2614 -[NSTextInputContext(NSInputContext_WithCompletion) hasMarkedTextWithCompletionHandler:]  (in AppKit) + 76  [0x7fff92abcbff]
    +                                                                       2614 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke174  (in AppKit) + 3779  [0x7fff92abdb76]
    +                                                                         2614 -[NSTextInputContext tryHandleTSMEvent_insertFixLenText_withContext:dispatchCondition:setupForDispatch:nestedWorkaroundCondition:nestedWorkaroundDispatchWork:loopCondition:dispatchWorkEach:afterEachInsertText:continuation:]  (in AppKit) + 377  [0x7fff9307a53e]
    +                                                                           2614 -[NSTextInputContext do_HandleTSMEvent_insertFixLenTextLoop:whileCondition:dispatchWorkEach:afterEachInsertText:continuation:]  (in AppKit) + 170  [0x7fff92abe12d]
    +                                                                             2614 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2242  (in AppKit) + 127  [0x7fff92abe1ca]
    +                                                                               2614 -[NSTextInputContext(NSInputContext_WithCompletion) insertText:replacementRange:completionHandler:]  (in AppKit) + 98  [0x7fff92abe237]
    +                                                                                 2614 -[NSTextView insertText:replacementRange:]  (in AppKit) + 2827  [0x7fff92abf13b]
    +                                                                                   2614 -[NSTextView(NSSharing) didChangeText]  (in AppKit) + 348  [0x7fff92ac1eb1]
    +                                                                                     2614 -[NSNotificationCenter postNotificationName:object:userInfo:]  (in Foundation) + 66  [0x7fff84e21aa1]
    +                                                                                       2614 _CFXNotificationPost  (in CoreFoundation) + 3140  [0x7fff90537634]
    +                                                                                         2614 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__  (in CoreFoundation) + 12  [0x7fff9064745c]
    +                                                                                           2614 -[NSNotificationCenter postNotificationName:object:userInfo:]  (in Foundation) + 66  [0x7fff84e21aa1]
    +                                                                                             2614 _CFXNotificationPost  (in CoreFoundation) + 3140  [0x7fff90537634]
    +                                                                                               2614 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__  (in CoreFoundation) + 12  [0x7fff9064745c]
    +                                                                                                 2614 -[AlfredWorkflowManager setSearchQuery:]  (in Alfred Framework) + 1081  [0x1000c192d]
    +                                                                                                   2614 -[AlfredWorkflow setSearchQuery:]  (in Alfred Framework) + 283  [0x1000c2de7]
    +                                                                                                     2614 -[AlfredWorkflowAbstractFilter setSearchQuery:]  (in Alfred Framework) + 294  [0x1000e0651]
    +                                                                                                       2614 -[AlfredWorkflowInputFileFilter filterWithQuery:]  (in Alfred Framework) + 560  [0x1000dfa40]
    +                                                                                                         2614 -[AlfredMetadataQuerier startQuery]  (in Alfred Framework) + 623  [0x1000cab32]
    +                                                                                                           2614 MDQuerySetSearchScope  (in Metadata) + 65  [0x7fff8fe8f081]
    +                                                                                                             2614 _MDQueryCopyRealPathsInArray  (in Metadata) + 425  [0x7fff8fe8f276]
    +                                                                                                               2614 __open  (in libsystem_kernel.dylib) + 10  [0x7fff8f5c2fca]
    2614 Thread_30030   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
    + 2614 _dispatch_mgr_thread  (in libdispatch.dylib) + 52  [0x7fff88a3826e]
    +   2614 kevent64  (in libsystem_kernel.dylib) + 10  [0x7fff8f5c4232]
    2614 Thread_30083
    + 2614 thread_start  (in libsystem_pthread.dylib) + 13  [0x7fff8f6623ed]
    +   2614 _pthread_start  (in libsystem_pthread.dylib) + 176  [0x7fff8f664fd7]
    +     2614 _pthread_body  (in libsystem_pthread.dylib) + 131  [0x7fff8f66505a]
    +       2614 _NSEventThread  (in AppKit) + 137  [0x7fff9293356b]
    +         2614 CFRunLoopRunSpecific  (in CoreFoundation) + 296  [0x7fff90598bd8]
    +           2614 __CFRunLoopRun  (in CoreFoundation) + 1371  [0x7fff9059937b]
    +             2614 __CFRunLoopServiceMachPort  (in CoreFoundation) + 212  [0x7fff90599eb4]
    +               2614 mach_msg  (in libsystem_kernel.dylib) + 55  [0x7fff8f5bd64f]
    +                 2614 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x7fff8f5be4de]
    2614 Thread_30448: com.apple.NSURLConnectionLoader
    + 2614 thread_start  (in libsystem_pthread.dylib) + 13  [0x7fff8f6623ed]
    +   2614 _pthread_start  (in libsystem_pthread.dylib) + 176  [0x7fff8f664fd7]
    +     2614 _pthread_body  (in libsystem_pthread.dylib) + 131  [0x7fff8f66505a]
    +       2614 __NSThread__main__  (in Foundation) + 1345  [0x7fff84e58e92]
    +         2614 +[NSURLConnection(Loader) _resourceLoadLoop:]  (in CFNetwork) + 434  [0x7fff88fd6420]
    +           2614 CFRunLoopRunSpecific  (in CoreFoundation) + 296  [0x7fff90598bd8]
    +             2614 __CFRunLoopRun  (in CoreFoundation) + 1371  [0x7fff9059937b]
    +               2614 __CFRunLoopServiceMachPort  (in CoreFoundation) + 212  [0x7fff90599eb4]
    +                 2614 mach_msg  (in libsystem_kernel.dylib) + 55  [0x7fff8f5bd64f]
    +                   2614 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x7fff8f5be4de]
    2614 Thread_30454: com.apple.CFSocket.private
    + 2614 thread_start  (in libsystem_pthread.dylib) + 13  [0x7fff8f6623ed]
    +   2614 _pthread_start  (in libsystem_pthread.dylib) + 176  [0x7fff8f664fd7]
    +     2614 _pthread_body  (in libsystem_pthread.dylib) + 131  [0x7fff8f66505a]
    +       2614 __select  (in libsystem_kernel.dylib) + 10  [0x7fff8f5c33fa]
    2614 Thread_42766   DispatchQueue_2594: NSOperationQueue 0x618000035100 :: NSOperation 0x6180000519a0 (QOS: USER_INITIATED)  (serial)
      2614 start_wqthread  (in libsystem_pthread.dylib) + 13  [0x7fff8f6623dd]
        2614 _pthread_wqthread  (in libsystem_pthread.dylib) + 729  [0x7fff8f664a9d]
          2614 _dispatch_worker_thread3  (in libdispatch.dylib) + 91  [0x7fff88a36a1c]
            2614 _dispatch_root_queue_drain  (in libdispatch.dylib) + 463  [0x7fff88a36bef]
              2614 _dispatch_queue_invoke  (in libdispatch.dylib) + 202  [0x7fff88a37030]
                2614 _dispatch_queue_drain  (in libdispatch.dylib) + 1100  [0x7fff88a375cd]
                  2614 _dispatch_client_callout  (in libdispatch.dylib) + 8  [0x7fff88a33e73]
                    2614 __NSOQSchedule_f  (in Foundation) + 184  [0x7fff84e73613]
                      2614 -[AlfredContactsQuerierOperation start]  (in Alfred Framework) + 1492  [0x10011ca9b]
                        2614 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:]  (in Foundation) + 131  [0x7fff84e49ab9]
                          2614 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:]  (in Foundation) + 823  [0x7fff84e49e6e]
                            2614 -[NSCondition wait]  (in Foundation) + 237  [0x7fff84e58fd8]
                              2614 __psynch_cvwait  (in libsystem_kernel.dylib) + 10  [0x7fff8f5c3136]

Total number in stack (recursive counted multiple, when >=5):

Sort by top of stack, same collapsed (when >= 5):
        mach_msg_trap  (in libsystem_kernel.dylib)        5228
        __open  (in libsystem_kernel.dylib)        2614
        __psynch_cvwait  (in libsystem_kernel.dylib)        2614
        __select  (in libsystem_kernel.dylib)        2614
        kevent64  (in libsystem_kernel.dylib)        2614

Link to comment
Share on other sites

By default, Alfred shouldn't need network access when you are using him. Looking at the search stack, this refers to a query to Apple's metadata server. Alfred runs these queries asynchronously, but there are some rare occurrences (corruption in the OS X metadata or metadata config is one) where this can have a roll on effect in Alfred

 

Firstly, could you check that you don't have a network drive in Alfred's Features > Default Results > Search Scope, then check that you don't have a bad network drive / node in OS X itself. Also, check /Volumes on your Mac for any unexpected mounts.

 

If that all checks out, I'd try doing a full reindex of your metadata using the button in Alfred's advanced prefs. Be sure to select deleting the v100 folder as this will rebuild from scratch.

 

Let me know how you get on :P

 

Cheers,

Andrew

Link to comment
Share on other sites

Thanks. You sent me in the right direction to find the problem. I didn't have a network drive in the list, but I did have a network drive mounted in my home dir. Thus, "include home" was including it. I moved the mount to /mnt and all is well again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...