quicksilver/Quicksilver — pull request #1927 by tiennou (2014-09-19 17:00:59+00:00)
Title: Don't load the icon at creation time

This fixes one deadlock I've encountered twice. Main thread is holding the `iconLoadingSet` lock :
```
1033 Thread_5679373 DispatchQueue_6: com.apple.root.default-priority (concurrent)
+ 1033 ??? (in Quicksilver) load address 0x106f8e000 + 0x1ce4 [0x106f8fce4]
+ 1033 NSApplicationMain (in AppKit) + 940 [0x7fff879bb7a3]
+ 1033 -[NSApplication run] (in AppKit) + 646 [0x7fff879d0a19]
+ 1033 ??? (in Quicksilver) load address 0x106f8e000 + 0x318a [0x106f9118a]
+ 1033 -[NSApplication sendEvent:] (in AppKit) + 3395 [0x7fff87b80b32]
+ 1033 -[NSWindow sendEvent:] (in AppKit) + 1763 [0x7fff87bdf51b]
+ 1033 -[NSWindow _processKeyboardUIKey:] (in AppKit) + 353 [0x7fff87c80fe9]
+ 1033 -[QSSearchObjectView cancelOperation:] (in QSInterface) + 315 [0x107159586]
+ 1033 -[QSInterfaceController hideMainWindowFromCancel:] (in QSInterface) + 92 [0x107141673]
+ 1033 -[QSInterfaceController hideMainWindowWithEffect:] (in QSInterface) + 355 [0x10714155d]
+ 1033 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation) + 68 [0x7fff8b6b67ba]
+ 1033 _CFXNotificationPost (in CoreFoundation) + 2893 [0x7fff943728dd]
+ 1033 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ (in CoreFoundation) + 12 [0x7fff9447ee0c]
+ 1033 +[QSObject purgeImagesAndChildrenOlderThan:] (in QSCore) + 159 [0x10709abbb]
+ 1033 -[NSSet objectsWithOptions:passingTest:] (in CoreFoundation) + 167 [0x7fff94407c47]
+ 1033 __NSSetEnumerate (in CoreFoundation) + 393 [0x7fff94407e59]
+ 1033 dispatch_apply_f (in libdispatch.dylib) + 603 [0x7fff8b9d775b]
+ 1033 _dispatch_apply_invoke (in libdispatch.dylib) + 87 [0x7fff8b9d782a]
+ 1033 _dispatch_client_callout2 (in libdispatch.dylib) + 8 [0x7fff8b9d78d9]
+ 1033 ____NSSetEnumerate_block_invoke (in CoreFoundation) + 186 [0x7fff944b907a]
+ 1033 __40-[NSSet objectsWithOptions:passingTest:]_block_invoke (in CoreFoundation) + 33 [0x7fff94408021]
+ 1017 _OSSpinLockLockSlow (in libsystem_platform.dylib) + 63 [0x7fff92905df6]
+ ! 1017 syscall_thread_switch (in libsystem_kernel.dylib) + 10 [0x7fff94356b16]
+ 16 _OSSpinLockLockSlow (in libsystem_platform.dylib) + 81,77,... [0x7fff92905e08,0x7fff92905e04,...]
```
Background thread finds a QSCommand that contains a string as its indirect, triggers an icon load that get stuck against that same lock :
```
1033 Thread_8698584 DispatchQueue_6: com.apple.root.default-priority (concurrent)
+ 1033 start_wqthread (in libsystem_pthread.dylib) + 13 [0x7fff8ec35fb9]
+ 1033 _pthread_wqthread (in libsystem_pthread.dylib) + 314 [0x7fff8ec32ef8]
+ 1033 _dispatch_worker_thread2 (in libdispatch.dylib) + 40 [0x7fff8b9d3177]
+ 1033 _dispatch_root_queue_drain (in libdispatch.dylib) + 326 [0x7fff8b9d2082]
+ 1033 _dispatch_client_callout (in libdispatch.dylib) + 8 [0x7fff8b9d028d]
+ 1033 _dispatch_apply_invoke (in libdispatch.dylib) + 87 [0x7fff8b9d782a]
+ 1033 _dispatch_client_callout2 (in libdispatch.dylib) + 8 [0x7fff8b9d78d9]
+ 1033 ____NSSetEnumerate_block_invoke (in CoreFoundation) + 186 [0x7fff944b907a]
+ 1033 __40-[NSSet objectsWithOptions:passingTest:]_block_invoke (in CoreFoundation) + 53 [0x7fff94408035]
+ 1033 -[__NSSetM addObject:] (in CoreFoundation) + 408 [0x7fff943cf898]
+ 1033 -[QSCommand isEqual:] (in QSCore) + 262 [0x10708db25]
+ 1033 -[QSCommand iObject] (in QSCore) + 478 [0x10708d90d]
+ 1033 +[QSObject(StringHandling) objectWithString:] (in QSCore) + 68 [0x1070a9cf2]
+ 1033 -[QSObject(StringHandling) initWithString:] (in QSCore) + 178 [0x1070a9dc2]
+ 1033 -[QSObject(Icon) loadIcon] (in QSCore) + 102 [0x10709f0d1]
+ 1033 -[QSObject(Accessors) setIconLoaded:] (in QSCore) + 63 [0x10709e83c]
+ 1033 _pthread_mutex_lock (in libsystem_pthread.dylib) + 372 [0x7fff8ec34779]
+ 1033 __psynch_mutexwait (in libsystem_kernel.dylib) + 10 [0x7fff9435a746]
```