Why does my computer freeze when I unplug my headphones? Whenever I plug in or unplug my headphones into my computer, it freezes for about 10 seconds before it is able to do anything which is rather annoying.  This didn't use to happen though, would anyone know the cause of this or how to fix it?
I faced a similar problem. I had a bluetooth headset and a wired one. Whenever I disconnected my wired one, sometimes the mac tried to connect to the bluetooth headset, and when it was switched off/out of range, the system would hang for sometime.

could be something similar. Can you give the list of speakers/headphones configured on your mac and their order (a screenshot would be convinient)