Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Try booting into Safe Boot. That should allow the computer to rebuild any files that might be corrupted. If that doesn't work, then you might be looking at a reinstall of some sort.
 
My guess is that something being started by your launchd is causing it.

Try Safe Boot:
1. Power down the Mac
2. Hold the shift key
3. Turn the Mac on
4. Continue holding Shift until the Apple appears

This will start Safe Boot, Safe Mode and eventually Safe Login

If it works fine, then it is likely LaunchAgent or StartupItem. I would take this time to disable Automatic Login for now to make troubleshooting easier.

Using Console:

Take a look in Console (/Applications/Utilities/Console.app) and see if you can find out what it causing it. It is best to know approximately what time this was happening.

If you find something, disable that item. It could be something defined in Login Items via Account Preferences or it could be an item in /Library/LaunchAgent or ~/Library/LaunchAgents

New User Account
If you are unable to find anything, disable automatic login (as mentioned above) and create a new user account. Start the computer up normally and login with the new user account. If it works fine, the problem is specific to your account, so focus on Login Items and ~/Library/LaunchAgents.

It may not be LaunchAgents or LoginItems
It is possible for something else to be causing the problem. DirectoryServices could be crashing for some reason. But let's cross that bridge when we come to it.

If Safe Boot does not work
If Safe Boot does not correct the problem, then you need to try some other things such as:

Repairing Permissions
Disk Repair

This can be done via the OS X Installation DVD or Single User Mode.

This should get you started.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.