Mac OS X locks up when I plugin in headphones on MacBook Pro
Could you try creating a new user and see if it happens there? Create a new user. Restart your computer and log with the new user. Make sure you don’t have anything in the “Login Items” (nothing starts at login).

Also try starting your Mac in “Safe Mode” as described here and see how it goes. 

This could be related to a Kernel Extension (ktext) problem.