I had this problem after downloading icon packs and had like 1000 icon pics show up in my gallery. The next day evetytime i tried to open the gallery it would open for a second and then just close.
Anyway, i found a fix after doing some research on this and other forums. It worked for me like a charm.
You need to go into Settings/Applications/Manage Apps. From here click on the show all tab and clear the cache for all of the following:
Gallery
Media Storage
Media Container Service
It is not enough to clear just the Gallery cache. You have to clear all of them and then reboot your phone.
Now when i did this i noticed 2 important things. First, i lost my deisignated contact ringtones so i had to go back into my contacts that i had special ringtones for and reset them. Second, the gallery took around 7 minutes to reload because it had to build the thumbnails again. You might also notice that you have to reset some settings in your texting app, but all of this is much better than having to reformat your SD card...at least in my opinion.
Hope this helps. As i said it was posted elsewhere and it worked perfectly for me.
Sent from my DROIDX using Tapatalk