IndexOutOfRangeException on Presentation.Save


#1

Hi Aspose team,

I’ve encountered similar issue to one you’ve fixed two years ago (PPT - Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index).

Please find example app attached:
ExceptionOnSavePresentation.zip (6.1 MB)

Could you please investigate what is causing this?

Thanks,
Mateusz


#2

@acturisaspose,

I have worked with the sample project shared by you and have been able to observe the issue. An issue with ID SLIDESNET-41131 has been created in our issue tracking system to further investigate and resolve the issue. We will share good news with you soon.


#3

Thanks you for logging this up.

Could you share the details what is causing this issue? I suppose that this is just some edge-case content of presentation that is troublesome, so I could ask my testers to avoid it for now.

Thanks,
Mateusz


#4

@acturisaspose,

I regret to share that at present we may not share any internal details about cause of issue. This issue has just recently been added in our issue tracking system and is pending for investigation. We request for your patience till the time the issue gets resolved.


#5

@acturisaspose,

Can you please try to use following sample code on your end and if there is still an issue than please share feedback with us.

var presentation = new Presentation(path + "Document System Overview.pps");
Presentation destinationPresentation = new Presentation();
foreach (Slide presentationSlide in presentation.Slides)
{
     destinationPresentation.Slides.InsertClone(destinationPresentation.Slides.Count, presentationSlide);
}
destinationPresentation.Slides.RemoveAt(0); //removes empty first slide
using (MemoryStream stream = new MemoryStream())
{
     destinationPresentation.Save(stream, Aspose.Slides.Export.SaveFormat.Pdf);
}

#6

Hi Adnan,

I’ve tested this for attached example and it seems to be fine. I’ll now pass it through our QA team and will let you know if there will be any issues wit that.

Could you please confirm that the defect will still be worked on so at some point we should be able to remove this workaround?

Thanks,
Mateusz


#7

@acturisaspose,

Actually, previously you have been using old API which is no longer supported. Therefore, we suggested you sample code based on latest available Aspose.Slides for .NET 19.7. If you encounter any issue, please feel free to share with us and we will be glad to resolve. Please note that this is not a workaround.