We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

CloneSlide index out of range exception

I am trying to update our Aspose.Slides from version 2.4.11 to the latest 2.5.15. My application has been working perfectly for the past year but now I get the following exception:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negativ
e and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Aspose.Slides.Slide…ctor(Presentation parent, ? slide)
at Aspose.Slides.Slide.?(Presentation ?)
at Aspose.Slides.Presentation.?(Slide ?, Presentation ?, SortedList ?, Slide
at Aspose.Slides.Presentation.CloneSlide(Slide srcSlide, Int32 position)

From some trial and error it looks like my application works fine with library versions up to 2.4.13 but fails starting with library version 2.4.14. I see that one of the “hot fixes” for version 2.4.14 was

Fixed: “Index out of bounds” exception on slide cloning.

Whatever this fix was seems to be causing the problem with my application. Can you give me more insight into what was “fixed” so that I can try to understand what my application may be doing to cause the index out of range exception?

Chris Tallent
Sr. Software Engineer
Fidelity Investments

“Index out of bounds” was a fix for fonts cloning but in your case we have another problem.
Could you provide example of presentation please.


I apologize, I found an application bug on my side that was being hidden by the earlier version of Slides library. As it turns out I removed a slide and was then attempting to clone that removed slide later through a reference that I'd held. Once I corrected my logic, I no longer have an issue.

Thank you for your quick response, as always