I have an Office add-in that saves a Powerpoint file into third party storage. That add-in uses the Office Interop lib to save the file into that system.
When I have a Powerpoint slides which contains a broken image relationship, saving the file crashes Powerpoint. The crash happens from method called "raw_SaveAs" which is part of Microsoft library, and it's called as in example below:
Presentation->raw_SaveAs( bstrFileName, wdsf, Office::msoFalse );
This call does not work and Powerpoint crashes with following error:
0xC0000005: Access violation writing location
The slides contains a broken image relationship ("The image part with relationship ID rld6 was not found int the file") and if I remove that the method call succeeds. I'm willing to believe that this is a bug or not good behavior of the method "raw_SaveAs". I think it should be able to recover from the broken image relationship and save the file. I can randomly reproduce the issue also with the "corrupted" file also when just saving it into local hard-drive.
Any ideas how to workaround the issue? Or knowledge that this is actual bug in Office Interop library?