How do I find out why my phone is locking up? My Samsung Captivate (Galaxy S series) locks up about once per day, where the screen is frozen and it doesn't respond to any type of input. There's no pattern concerning what app I'm running at the time.  How do I find out what is causing it?  

I'm running a 2.3.4-based custom ROM (Apex specifically).
Try removing (uninstalling) custom apps you installed in batches, and using the phone for a day or two.

Also try removing SD card if you have one. Sometimes SD card causes this, either because of faulty connection with the card or because it makes the connection to battery lose.

It is a slow method and requires patience, but is bound to work.