Today I had a computer with a major problem. The machine would boot and then hang just before the login window normally appears, sitting with a near-full progress bar indefinitely. Fortunately, I was able to ssh in to the machine and check its system log, which told me that loginwindow.app was crashing.
Dec 14 16:05:45 ComputerOne crashdump: loginwindow crashedDec 14 16:05:45 ComputerOne crashdump: crash report written to: /Library/Logs/CrashReporter/loginwindow.crash.logDec 14 16:05:46 ComputerOne launchd: /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow port /dev/console exited abnormally: Trace/BPT trapDec 14 16:05:46 ComputerOne launchd: getty repeating too quickly on port /dev/console, sleeping
Reading this led me to check the crash log of loginwindow.app, which showed the below.
Library not loaded: /System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayServicesReferenced from: /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindowReason: no suitable image found. Did find:/System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayServices: unknown file type, first eight bytes: 0x64 0x73 0x74 0x37 0x00 0x00 0x00 0x01
"Hmmm..." methoughts, "Sounds like there's a corrupt file in the DisplayServices.framework."
So, using the magic of scp, I copied the DisplayServices.framework from another, working machine, and voilà! The machine was able to proceed to the login window without delay. It's working fine now.