How to stop MacBook Pro (Retina) from freezing/locking at the login/authentication dialogue, after wake? Steps to reproduce:


Be doing anything
Close the lid of the computer
Wait around for a while
Open the lid of the computer
Login prompt for last logged in user appears, battery and time MAY update, but trackpad and keyboard are locked up and no response. Computer requires forced-restart.


EDIT: 5a. Possibly, everything is normal, and no lockup/freeze happens.

EDIT 2:

When the problem occurs, there is no spinning wait thingy or blinking cursor. On the contrary, a spinning wait cursor usually indicates that if I wait for it, the machine will wake up normally, blink the cursor, and let me log in.  

EDIT 2a: Software running may vary. No indication of wifi connectivity since the icon may or may not be on, but I may or may not have been connected to wifi at sleep, and may or may not have wifi access at wake--there's no way to tell if the image is actually reporting the state since the image may just be frozen.     

EDIT 2b: As best I can tell, the longer I wait to re-activate the machine, the more likely the lockup.

10.8 on Pro Retina (MacBookPro10,1 with NVIDIA GeForce GT 650M and Intel HD Graphics 4000).

Any ideas on how to diagnose or fix?
I'm going to take a wild stab in the dark guess and say that this is related to the highly documented "Mountain Lion wake bug" (at least that's what I've dubbed it.) 

It's been discussed in a variety of threads on apple support forums, but probably the most successful I found was this one. I had the problem too and I found that there was one simple fix on this thread. 

Basically, the theory (and I'm 99% certain it's correct) is that the bug relates to bonjour, and some apps that use bonjour in mountain lion are causing wifi processes to hang and thus crashing OSX. Anyway, the program that was doing it for me, and probably what I've seen to be the most common one, is Transmit, the awesome little FTP client by Panic. Unfortunately, Panics Menu Bar icon which can be quite useful appeared to be the worst culprit, but toggling off "Show Transmit Disk in menu bar" in transmit preferences  solved the problem.

If you're not using Transmit or if you're still having issue, run through that forum and hopefully you'll find one of the other fixes works for you.

PS. Apple knows about the problem and I think they're working on a fix.