Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Lion login screen hangs

Hello, this is more of a FYI than a question.


Symptom: Upon entering your credentials in Mac OS X Lion Server, the login window will hang. However you can still move the mouse.


Since the Mac's background services were up and running at this point, I could SSH in and look around.


system.log revealed this:

Jan 19 18:55:01 Tesseract com.apple.authorizationhost.00000000-0000-0000-0000-0000000186AF[482]: buffer size: 1024 length: 592
Jan 19 18:55:01: --- last message repeated 1 time ---
Jan 19 18:55:01 Tesseract loginwindow[461]: Login Window - Returned from Security Agent
Jan 19 18:55:01 Tesseract loginwindow[461]: USER_PROCESS: 461 console
Jan 19 18:55:01 Tesseract applepushserviced[103]: Unable to bootstrap_lookup connection port for 'com.apple.iCalPush': unknown error code
Jan 19 18:55:01 Tesseract applepushserviced[103]: Unable to bootstrap_lookup connection port for 'com.apple.syncdefaultsd.push': unknown error code
Jan 19 18:55:01 Tesseract applepushserviced[103]: Unable to bootstrap_lookup connection port for 'com.apple.AddressBook.PushNotification': unknown error code
Jan 19 18:55:01 Tesseract applepushserviced[103]: Unable to bootstrap_lookup connection port for 'com.apple.safaridavclient.push': unknown error code
Jan 19 18:55:01 Tesseract airportd[499]: _doAutoJoin: Already associated to “Emerald”. Bailing on auto-join.
Jan 19 18:55:01 Tesseract com.apple.launchd.peruser.501[453] (com.apple.ReportCrash): Falling back to default Mach exception handler. Could not find: com.apple.ReportCrash.Self
Jan 19 18:55:01 Tesseract com.apple.launchctl.Aqua[502]: com.apple.RemoteDesktop.agent: Already loaded
Jan 19 18:55:01: --- last message repeated 1 time ---
Jan 19 18:55:01 Tesseract com.apple.launchctl.Aqua[502]: load: option requires an argument -- D
Jan 19 18:55:01 Tesseract com.apple.launchctl.Aqua[502]: usage: launchctl load [-wF] [-D <user|local|network|system|all>] paths...
Jan 19 18:55:01 Tesseract loginwindow[461]: -[__NSCFConstantString count]: unrecognized selector sent to instance 0x10eeda8e0
Jan 19 18:55:01: --- last message repeated 1 time ---
Jan 19 18:55:01 Tesseract loginwindow[461]: (
                              0   CoreFoundation                      0x000000010ed87286 __exceptionPreprocess + 198
                              1   libobjc.A.dylib                     0x000000010ebf1d5e objc_exception_throw + 43
                              2   CoreFoundation                      0x000000010ee134ce -[NSObject doesNotRecognizeSelector:] + 190
                              3   CoreFoundation                      0x000000010ed74133 ___forwarding___ + 371
                              4   CoreFoundation                      0x000000010ed73f48 _CF_forwarding_prep_0 + 232
                              5   loginwindow                         0x000000010c5bf2c9 loginwindow + 74441
                              6   loginwindow                         0x000000010c5bf293 loginwindow + 74387
                              7   loginwindow                         0x000000010c5bc646 loginwindow + 63046
                              8   CoreFoundation                      0x000000010ed76a1d -[NSObject performSelector:withObject:] + 61
                              9   Foundation                          0x000000010e0a5e44 __NSThreadPerformPerform + 214
                              10  CoreFoundation                      0x000000010ecf5b51 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
                              11  CoreFoundation                      0x000000010ecf53bd __CFRunLoopDoSources0 + 253
                              12  CoreFoundation                      0x000000010ed1c1a9 __CFRunLoopRun + 905
                              13  CoreFoundation                      0x000000010ed1bae6 CFRunLoopRunSpecific + 230
                              14  HIToolbox                           0x00000001133a93d3 RunCurrentEventLoopInMode + 277
                              15  HIToolbox                           0x00000001133b063d ReceiveNextEventCommon + 355
                              16  HIToolbox                           0x00000001133b04ca BlockUntilNextEventMatchingListInMode + 62
                              17  AppKit                              0x000000010cd233f1 _DPSNextEvent + 659
                              18  AppKit                              0x000000010cd22cf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
                              19  AppKit                              0x000000010cd1f62d -[NSApplication run] + 470
                              20  loginwindow                         0x000000010c5b2142 loginwindow + 20802
                              21  loginwindow                         0x000000010c5b1bf0 loginwindow + 19440
                              22  ???                                 0x0000000000000002 0x0 + 2
               )
Jan 19 18:55:01 Tesseract com.apple.launchd.peruser.501[453] (com.apple.launchctl.Aqua[502]): Exited with code: 1
Jan 19 18:55:01 Tesseract UserEventAgent[23]: CaptiveNetworkSupport:CNSServerRegisterUserAgent:187 new user agent port: 34987


Looks like the loginwindow was crashing out.


These are the steps I tried that didn't remedy the problem:

repair Permissions

repair Disk

booted to safe mode (this caused a instant reboot at the login point)

attempted to Log in as a different user

repaired the volume with DiskWarrior

reset pram/smc/smu

emptied user and Library cache folders

emptied /Library/Internet Plug-Ins

emptied /Library/PreferencesPanes

note: to make things worse the boot volume was protected by FileVault 2.


I finally made progress when I renamed/replaced /Library/Preferences and rebooted. I could login without issue at this point.


Turns out /Library/Preferences/loginwindow.plist had a bad value.


Here is the contents of the "corrupted" plist that caused loginwindow to crash out. I verified this file was the culprit by placing it back in the Preferences folder. The symptom returned. I removed it once again, and was able to login fine.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
               <key>AutoLaunchedApplicationDictionary</key>
               <string></string>
</dict>
</plist>


and for comparison the new loginwindow.plist generated by the system:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
               <key>AutoLaunchedApplicationDictionary</key>
               <array/>
</dict>
</plist>


As you can see, somehow a empty string was passed to AutoLaunchApplicationDictionary in stead of a closed array.


Hopefully this post will help someone who was having the same issue I was.


lastly, you can "kick" the login window by logging in via ssh and running:


launchctl unload /System/Library/LaunchDaemons/com.apple.loginwindow.plist

launchctl load /System/Library/LaunchDaemons/com.apple.loginwindow.plist

Posted on Jan 19, 2012 8:01 PM

Reply
3 replies

Jan 16, 2013 6:29 AM in response to Sonic84

I unfortunately can't add a solution along with my issue, but I'm hoping someone can comment.


When I replace the contents of com.apple.loginwindow.plist with the corrected version above, stop and restart the loginwindow process with launchctl, the loginwindow launches normally and seems ready to accept a login request.


After attempting to log in, however, the screen will flash white and return to the login window. The contents of com.apple.loginwindow.plist then reverts to:


bplist00?

_OptimizerLastRunForSystem\lastUserName_OptimizerLastRunForBuild_!AutoLaunchedAp plicationDictionaryXlastUser

Ulocalf?XloggedI/<W{?????

?


...which is odd, to say the least. The above behavior with the white flash then comes back and the admin user cannot log in.

Apr 22, 2013 11:06 AM in response to Ed Morris

The behavior of loginwindow.plist, which you have described is absolutely normal. Mac OS X stores many preference lists in binary format. Check out man page for plutil for details. The plist for loginwindow given by Sonic84 is apparently for an earlier version of Mac OS (10.6?), so it won't be valid for your OS version (10.8?). Since your problems comes back after the preference is cleared, apparently it is caused by something else.

Lion login screen hangs

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.