First, try this:
1. Shut down your MB
2. Have ONLY the battery in it.
3. Power your MB up & immediately take it into Safe Mode (after the startup chime, hold down one of the Shift keys until the login screens shows up. Let go of Shift. Log in. Let it finish booting. At the Desktop, do a few ordinary things on your MB (not all programs will function in SafeMode though).
4. Report back here whether your MB freezes on battery-only power while it's in Safe Mode.
Second, download & install the iStat Menu utility.
After installing it, make notes of the MB's internal temperatures, particularly the 3 battery sensor temperatures when A) It's powered by only the adapter and then after a cooling down period, B) It's powered by only the battery. The Battery Temperature reading in iStat should show right around 85-90 degrees.
Here's a screenshot of my own iStat, with the mouse arrow pointing at my MB's current battery temperature:
Also, need some answers to these Q's:
1. What model is your MB?
Apple.com: "How to identify MacBook models"
2. What version of OSX are you running in your MB?
3. Did the frequency of the battery-only freezup problem develp slowly over time, freezing only every once in a while until now your MB freezes quite often, or did the problem just show up overnite -- yesterday, fine; today, freezing with only the battery in it?
4. Did you do anything major as far as changes to your MB are concerned, or did anything happen to it? (dropped, keyboard spill, etc)
This is an important one:
5. If you were to start your Macbook up in the morning on battery only after it being shut down all night, and the MB is being used normally, how long in minutes does it take, on average, for the first freezeup to occur?
6. When it is powered by battery only, and absolutely nothing has been done on it for quite a while after it's been turned on, & it's just sitting there with the screen open & the screensaver is running or the display is in sleep, does it freeze up?
7. Compare the temperatures of the bottom of your MB between 15-20 minutes of Power Adapter only use, and 15-20 minutes of Battery only use, with a cooling down period in between the two tests. Is there a huge difference in the two temperatures, or not much difference?
We'll get it.......
But I & other helpers who read your post just need more info from you before anyone can go any further with this.
My 2008 black macbook has been doing the exact same thing except the battery actually says it needs to be serviced. Are freezing or shutting off suddenly typical signs that a battery needs replacement? I, too, wiped my hard disk and reinstalled Snow Leopard (after bad luck with Lion) but it is still happening occasionally. I can also maybe try answering all the above questions, but for now can anyone tell me if this sounds like a possible battery issue?