Free Support Forum - aspose.com

Exception: Object reference not set to an instance of an Object on loading presentation (C# .NET)

An exception is being thrown every time I try to load one PPTX file. I seems to only happen with one document only. I have tested it with other documents and they all worked fine.

Aspose.slides.NET Version: 19.12.0
ProblemDocumentPPTX.PNG (102.9 KB)

Code:

        try
        {
            // Set licenses
            SetLicense.License(GlobalConfig.Document.Type.Slide);

            using (Presentation pptx = new Presentation(filePath)) 
            {
                 // It won't enter this code block
                  ...
                  ...
            }
        catch (Exception exceptionObject)
        {
           // Exception is thrown here

           Exception message: 
           "Object reference not set to an instance of an object."
           .....................................................................................................................
          Stack trace:
          "at Aspose.Slides.\u0002   .\u0002(Presentation \u0002, Stream \u0003, InterruptionToken 
           \u0005)\r\n   at Aspose.Slides.Presentation.\u0003(Stream \u0002, Boolean \u0003)\r\n   at 
           Aspose.Slides.Presentation.\u0002(Stream \u0002, Boolean \u0003)\r\n   at 
           Aspose.Slides.Presentation.\u0002(String \u0002, Boolean \u0003)\r\n   at 
           Aspose.Slides.Presentation..ctor(String file)\r\n   at 
          TCS.TCR.DocumentService.Util.PPTXConverter.getHtmlPPT(String filePath, String uniqueID, 
          String fileName) in C:\\path\\to\\solution\\Class\\PPTXConverter.cs:line 36"
        }

@uk_itprocurement_tcs_com

We are moving your inquiry in respective forum category where you will be assisted shortly.

@uk_itprocurement_tcs_com,

I have observed the issue shared and request you to please share source presentation reproducing the issue on your end.

Hi Mudassir,

Here is a google drive link with the document.

Thanks

@uk_itprocurement_tcs_com,

I have worked with the presentation file shared. An issue with ID SLIDESNET-41668 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 notified once the issue will be fixed.