Have you looked into the miscellaneous option page under the settings tab.
I was having a similar issue with a clients blog and discovered that the default path of wp-content/upload was changed to something different.
You must have the upload path set to default parameters or the function breaks especially when you use a theme other than the default kubric theme.
Try it yourself and see if this helps. It did for me.
Rob
Bestwebpresence.com