Today I had a strange error while trying to save an image in Photoshop 7.0. The image was opened as a JPG and I was trying to save it as a regular PSD file.

Could not complete your request because of a program error.

It turned out that the JPG image must have some corrupted metadata. The solution was to go to the File | File info... dialog and uncheck the field labeled: Preserve Additional Information prior to saving.