Dock throwing NSInvalidArgumentException trying to start Yesterday I noticed that I could no longer ⌘ + TAB, minimize/maximize windows and that the Dock was missing. I've tried numerous things to resolve it:


rebooting
reseting PRAM
killing Dock with killall -KILL Dock


That last one should restart the process, but it didn't appear to initially:

$ killall -KILL Dock
No matching processes belonging to you were found
$ ps -ef|grep -i Dock
  501  2145   826   0  7:50AM ttys000    0:00.00 grep -i Dock


I opened up the Activity Monitor and noticed that it was repeatedly trying to restart the process:



When I tried to restart it manually I noticed that a NSInvalidArgumentException was being thrown:

$ /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock
2015-01-27 07:30:34.441 Dock[1126:38505] -[__NSCFNumber stringByExpandingTildeInPath]: unrecognized selector sent to instance 0x537
2015-01-27 07:30:34.442 Dock[1126:38505] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber stringByExpandingTildeInPath]: unrecognized selector sent to instance 0x537'
*** First throw call stack:
(
  0   CoreFoundation                      0x00007fff8d6ec64c __exceptionPreprocess + 172
  1   libobjc.A.dylib                     0x00007fff819096de objc_exception_throw + 43
  2   CoreFoundation                      0x00007fff8d6ef6bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
  3   CoreFoundation                      0x00007fff8d636a84 ___forwarding___ + 1028
  4   CoreFoundation                      0x00007fff8d6365f8 _CF_forwarding_prep_0 + 120
  5   Dock                                0x000000010907feca Dock + 61130
  6   Dock                                0x000000010907fd75 Dock + 60789
  7   Dock                                0x000000010907f780 Dock + 59264
  8   Dock                                0x000000010907cc70 Dock + 48240
  9   Dock                                0x000000010907be54 Dock + 44628
  10  Dock                                0x000000010907696c Dock + 22892
  11  libdyld.dylib                       0x00007fff837e95c9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6


Can anyone offer any suggestions? I miss my dock and my keyboard shortcuts...
I got the same problem and fixed it by removing desktoppicture.db:

rm ~/Library/Application\ Support/Dock/desktoppicture.db


Then Dock started automatically.