Free Support Forum - aspose.com

CloneSlide from same presentation twice causes "System.InvalidCastException: Specified cast is not valid"

When I run the attached project, I receive an error on the cloneslide method.

My algorith is as follows:

open a blank presentation

open a content presentation

clone the first slide to the blank presentation

close the content presentation

open the content presentation

clone the slide again to the formerly blank presentation

On the last step, I receive an error:

System.InvalidCastException: Specified cast is not valid.

at Aspose.PowerPoint.PictureBullets.Add(PictureBullet pictureBullet)

at Aspose.PowerPoint.Presentation.ਞ(Presentation ৢ, Slide ਍, Slide ਙ)

at Aspose.PowerPoint.Presentation.ਘ(Slide ਙ, Presentation ৢ, SortedList ঢ়)

at Aspose.PowerPoint.Presentation.CloneSlide(Slide srcSlide, Int32 position, Presentation pres, SortedList idList)

Any thoughts would be greatly appreciated.

Phil

Any information would be helpful.

Phil

Please update Aspose.PowerPoint. I can’t reproduce this problem with last hot fix.

Please see the attached project to reproduce. When I coded the sample, I coded it to write to the command line the exception, so it's easy to miss if you don't run it from the command line.

Please try the attached sample and let me know.

Phil

Thank you, now I got this exception.
Hot fix will be published today at night.