PowerPoint Presentation Fails to Load in C# When a Slide Contains a Comment

Dear Aspose,

Please try to debug this app. When the code will hit line using var presentation = new Presentation(fileInputStream); an exception will be thrown.
The problem comes from the comment inside the slide. If we remove the comment, the code works fine.

Upgrading to latest Aspose.Slides.NET version (25.8.0) does not help.

Thanks for looking.

Best Regards
Dan
Bug-1386120-AsposeSlidesBug.zip (408.8 KB)

@ottap

Hi Dan,

It sounds like you’re encountering an issue with loading a presentation that contains comments. This can sometimes happen due to specific content or formatting within the comments that the library may not handle correctly.

Cause: The issue may stem from corruption in the presentation file or specific formatting within the comments that the library struggles to process.

Solution: Here are a few steps you can take to troubleshoot and potentially resolve the issue:

  1. Check for Corruption: Ensure that the presentation file is not corrupted. Open it in PowerPoint to verify that it behaves as expected.

  2. Load Options: When loading the presentation, use LoadOptions to manage how embedded binary objects are handled. Set DeleteEmbeddedBinaryObjects to true to see if that helps bypass the issue with comments.

    Here’s a sample code snippet to illustrate this:

    LoadOptions loadOptions = new LoadOptions
    {
        DeleteEmbeddedBinaryObjects = true
    };
    
    using (var presentation = new Presentation("yourPresentation.pptx", loadOptions))
    {
        // Your code to work with the presentation
    }
    
  3. Update Library: Ensure you are using the most recent version of the library, as updates may include bug fixes related to loading presentations.

  4. Isolate the Issue: Create a minimal version of the presentation that still reproduces the issue. This can help identify if a specific comment or formatting is causing the problem.

  5. Contact Support: If the issue persists, reach out to Aspose support with the minimal presentation file that reproduces the issue. They may provide more specific guidance or a fix.

Next Steps: Please try the above steps and let me know if they help resolve the issue. If you continue to experience problems, I can assist you further.

Best regards!

I tried with

LoadOptions loadOptions = new LoadOptions
{
    DeleteEmbeddedBinaryObjects = true
};

but the issue still happens.

@ottap,
Thank you for reporting the issue. I have reproduced a PptxReadException when loading the PowerPoint presentation with Aspose.Slides for .NET. We apologize for any inconvenience caused.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-45091

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you found earlier (filed as SLIDESNET-45091) have been resolved in Aspose.Slides for .NET 25.9 (ZIP, MSI, NuGet, Cross-platform).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.