Free Support Forum -

Aspose Slides crashed while converting pptx to pdf (C++ .NET)

I’m getting the following error when converting the file attached in this message using Aspose Slides example code:

terminate called after throwing an instance of ‘System::ExceptionWrapperSystem::Details_NullReferenceException’
what(): System::NullReferenceException

The error does not provide details about where it occurs. Can someone help take a look? I can send the pptx file through private message


I have observed the issue shared by you and request you to please try using latest Aspose.Slides for .NET 20.5. In case there is still an issue then please share the source code and used sample file reproducing the issue.


Thank you for your response, yes, this error still happens with 20.5:

sample$ ./
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tnhuynh/Downloads/aspose-slides-cpp-linux-20.5/sample/build
Scanning dependencies of target Aspose.Slides.Cpp.Examples
[ 14%] Building CXX object CMakeFiles/Aspose.Slides.Cpp.Examples.dir/sources/chart.cpp.o
[ 28%] Building CXX object CMakeFiles/Aspose.Slides.Cpp.Examples.dir/sources/main.cpp.o
[ 42%] Building CXX object CMakeFiles/Aspose.Slides.Cpp.Examples.dir/sources/smart_art.cpp.o
[ 57%] Building CXX object CMakeFiles/Aspose.Slides.Cpp.Examples.dir/sources/presentation_export.cpp.o
[ 71%] Building CXX object CMakeFiles/Aspose.Slides.Cpp.Examples.dir/sources/text.cpp.o
[ 85%] Building CXX object CMakeFiles/Aspose.Slides.Cpp.Examples.dir/sources/thumbnail.cpp.o
[100%] Linking CXX executable Aspose.Slides.Cpp.Examples
[100%] Built target Aspose.Slides.Cpp.Examples
\nRunning examples...\n
terminate called after throwing an instance of 'System::ExceptionWrapper<System::Details_NullReferenceException>'
  what():  System::NullReferenceException
./ line 13: 14562 Aborted                 (core dumped) ./build/Aspose.Slides.Cpp.Examples 

The only thing I change in the sample code is the file name param for PresentationExport::Export(). I’ve sent you the pptx file in the message as you have observed.


As requested earlier, please share the following information.

Hi @mudassir.fayyaz,

I’ve attached the main.cpp in this post. That’s the only change from the sample code for Aspose Slides C++ Linux v20.5. Please see the pptx file in the message I sent you separately (1007 Bytes)

Best Regards,


I have observed the code sample file shared by you and every thing seems to be commented in that.

Can you please following things to me so that I may investigate the issue:

1: Working sample code
2: Source presentation file
3: Generated PDF (if you have been successful in generating that)

Hi @mudassir.fayyaz,

The sample code attach should compile and produce the error when run. Most of the code is commented out to isolate the problem. The issue occurs in the uncommented part on line 19:


The source presentation file was emailed to you since the file should not be shared on public forum.

The crash happens consistently for this file, so it has not successfully generate a PDF.

Best Regards


I have observed your comments and like to share that following line of code is neither Aspose.Slides for C++ method nor its definition is given by you. I need Aspose.Slides API code that you have tested on your end and which is failing. Moreover, without source presentation that is crashing on your end, I may not be able to help you further.

We really wish to help you out but without provision of requested information, I may not proceed with my investigation.


Presentation::Export() is part of the sample code distributed with Aspose Slides CPP Linux 20.5. It’s part of sample/sources/presentation_export.cpp

Per your request, I’ve attached the sample code in Aspose Slides CPP Linux 20.5 here as well. To reproduce the problem, you can:

  1. download and decompress the Aspose Slides CPP Linux 20.5 from here:
  2. unzip the attached file below
  3. replace the “sample” directory in the Aspose Slides CPP Linux 20.5 decompressed directory with the “sample” directory in the unzipped attachment
  4. run the script in the sample directory (3.3 MB)


Thank you for sharing the information. A ticket with ID SLIDESCPP-2432 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.

1 Like


We have investigated the issue further in our end and are unable to reproduce the issue in our environment. Can you please share the environment details on your end including complete OS name (with version) name, the compiler and libstdc++ versions. If you he used Docker or other virtualization service is the required information about the environment.

Hi @mudassir.fayyaz,

The issue was encountered in the following env:

  • OS: CentOS Linux release 8.0.1905
  • Compiler: clang version 8.0.1 (Red Hat 8.0.1-1.module_el8.1.0+215+a01033fb)
  • libstdc++: 3.4


Thank you for sharing the information. We will update you as soon as issue will be fixed.

1 Like