IPresentation.Save throwing NullReferenceException

asdf.zip (717.4 KB)

Hi!

I’m using Aspose.Slides for .NET 17.6.0 in a .NET Framework 4.6.2 console application. When I try to remove the first of the two slides included in my presentation through the code, the Save method throws a NullReferenceException with zero useful information to pinpoint what the problem is.

The code is the following:

class Program
{
static void Main(string[] args)
{
using (IPresentation presentation = new Presentation(“C:/asdf.pptx”, new LoadOptions(LoadFormat.Pptx)))
{
presentation.Slides.Remove(presentation.Slides.First());
presentation.Save(“C:/SavedPresentation.pptx”, SaveFormat.Pptx);
}
}
}

You can find the presentation file attached to the topic.

Thanks in advance!

@robger,

I have worked with the presentation file shared by you and have been able to observe the issue. An issue with ID SLIDESNET-39420 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

@mudassir.fayyaz when can we expect the issue to be resolved?

@robger,

I have observed your comments. I like to share that this issue is going to be resolved tentatively in Aspose.Slides 17.11. We will share good news with you soon.

Thanks for the quick reply @Adnan.Ahmad. Is there any way we could get a more detailed estimate of when it will be released? We are about to release to production and we would like to be able to plan it.

@robger,

I have observed your comments. I like to inform that Aspose.Slides 17.11 will be released in end of December. I request for your patience and we will share good news with you soon.

Thanks for the clarification @Adnan.Ahmad. Is that release the only way to solve our issue? Would it matter if we paid for support?

@robger,

I have observed your comments. I like to inform that if you get our paid support than issue will be resolved as soon as possible on priority basis. For that please contact our sales team through Purchase forum.

@Adnan.Ahmad is it possible to get a deadline for when the issue would be solved with paid support? “ASAP” doesn’t tell us much, it could just as well also be in December. If we get a deadline, we’re happy with, we’ll add the paid support.

@robger,

Please accept my apologies for mistake. I like to inform that this issue is going to be resolved tentatively in Aspose.Slides 17.11 and this version will be released in end of November. Please ignore previous information about release date of Aspose.Slides 17.11.

@Adnan.Ahmad version 17.11 has now been released, we have upgraded, but we are still experiencing the exact same bug. Can we please get it fixed ASAP?

@robger,

I have worked with presentation file with sample code shared by you using Aspose.Slides for .NET 17.11 and unable to observe any issue. I have also shared my generated result with you for your kind reference. Can you please check attachment. Please share environment details with us if there is still an issue.SavedPresentation.zip (567.4 KB)

@Adnan.Ahmad I spoke too fast. We are still experiencing the same bug in our actual presentation generation, but it’s not reproducable with the example we previously provided as you mention. I’ll get back to you soon with another example to reproduce it.

@robger,

We are happy to help you out. Please share feedback us if you have any problem.

@Adnan.Ahmad ok we now have example code to reproduce it:
We get the same NullReferenceException when calling Save by removing slides with IDs 273 or 313 from this presentation. This is the chunk of code to reproduce it:
using (IPresentation presentation = new Presentation(“C:/pres.pptx”, new LoadOptions(LoadFormat.Pptx)))
{
presentation.Slides.Remove(presentation.Slides.First(x => x.SlideId == 273));
// presentation.Slides.Remove(presentation.Slides.First(x => x.SlideId == 313));

using (var ms = new MemoryStream())
{
presentation.Save(ms, SaveFormat.Pptx);
}
}

pres.pptx.zip (2.8 MB)

@robger,

I have worked with source presentation shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-39638 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

@mudassir.fayyaz ok, great, thanks. When can we have it resolved? And can we speed it up?

@robger,

The issue has just been logged in our issue tracking system and our product team shall be scheduling the issue on its due turn and we will share the good news with you as soon as possible.

@mudassir.fayyaz the sooner we get more information the better. And the sooner it’s fixed the better. Let me know if there’s anything I can do to speed it up.

@robger,

We will surely contact you if we need anything else that help us to resolve issue as soon as possible. We will share good news with you soon.