Segmentation Fault during Saving a PowerPoint Presentation in PPTX Format in C++

I am using aspose slides (C++) to export pptx. When I save my pptx file using the “Save” function of “Presentation” class, I got the segmentation fault. The gdb backtrace is listed below:

Thread 238 "dummy::AsposePPTE" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2aab18a03700 (LWP 26650)]
0x0000000006241e24 in FcPatternGetString ()
(gdb) bt
#0  0x0000000006241e24 in FcPatternGetString ()
#1  0x00002aab1f19892d in ?? ()
   from whatever_path/aspose-slides-cpp/22.12/default/lib/libcodeporting.translator.cs2cpp.framework_x86_64_libstdcpp_libc2.23.so
#2  0x00002aab1f08b9d7 in ?? ()
   from whatever_path/aspose-slides-cpp/22.12/default/lib/libcodeporting.translator.cs2cpp.framework_x86_64_libstdcpp_libc2.23.so
#3  0x00002aab1dfa6b24 in System::Drawing::FontFamily::Initialization(bool, System::Drawing::FontStyle) ()
   from whatever_path/aspose-slides-cpp/22.12/default/lib/libcodeporting.translator.cs2cpp.framework_x86_64_libstdcpp_libc2.23.so
#4  0x00002aab1dfa6a47 in System::Drawing::FontFamily::FontFamily(System::String const&) ()
   from whatever_path/aspose-slides-cpp/22.12/default/lib/libcodeporting.translator.cs2cpp.framework_x86_64_libstdcpp_libc2.23.so
#5  0x00002aab2d6917bb in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#6  0x00002aab2d6913cd in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#7  0x00002aab2d6c3710 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#8  0x00002aab290f7697 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#9  0x00002aab290f6146 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#10 0x00002aab290f51fc in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#11 0x00002aab290f4ff6 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#12 0x00002aab290d28d4 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#13 0x00002aab29161ef5 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#14 0x00002aab290d1f43 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#15 0x00002aab290c0208 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#16 0x00002aab26b61f22 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#17 0x00002aab277c4113 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#18 0x00002aab276d9abf in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#19 0x00002aab277638d1 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#20 0x00002aab2776210e in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#21 0x00002aab276c29b9 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#22 0x00002aab276c0313 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#23 0x00002aab276d17fc in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#24 0x00002aab276d4020 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#25 0x00002aab276d29c5 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#26 0x00002aab2916570e in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#27 0x00002aab27934400 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#28 0x00002aab291886d1 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#29 0x00002aab291b77e1 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#30 0x00002aab291b160a in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#31 0x00002aab291afa6f in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#32 0x00002aab291aeca9 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#33 0x00002aab270c64ec in Aspose::Slides::Slide::GetThumbnail(System::Drawing::Size) ()
   from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#34 0x00002aab270c65e0 in non-virtual thunk to Aspose::Slides::Slide::GetThumbnail(System::Drawing::Size) ()
   from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#35 0x00002aab28c2a83b in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#36 0x00002aab28c23786 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
--Type <RET> for more, q to quit, c to continue without paging--c
#37 0x00002aab26fef886 in ?? () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#38 0x00002aab26ff5b3d in Aspose::Slides::Presentation::Save(System::SmartPtr<System::IO::Stream>, Aspose::Slides::Export::SaveFormat, System::SmartPtr<Aspose::Slides::Export::ISaveOptions>) () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so
#39 0x00002aab26ff3f0f in Aspose::Slides::Presentation::Save(System::String, Aspose::Slides::Export::SaveFormat) () from whatever_path/aspose-slides-cpp/22.12/default/lib/libAspose.Slides_x86_64_libstdcpp_libc2.23.so

@Meerkatpapa,
Thank you for contacting support.

Please share the following files and information:

  • sample presentation file or other files if you used (you can zip the files and upload an archive here)
  • code example that reproduces the error
  • OS version on which the code was executed

Then we will check the problem soon.

@andrey.potapov Thank you for your quick reply.

I understand that the more information I give you, the quicker you will be able to resolve the issue. However, I am using aspose in some product so I am not allowed to leak any source code to anyone.

But, I am more than happy to explain the current situation: We use aspose to export some images along with their text explanations to a slide. When everything is compiled into a standalone executable and run on an online server, it works fine (meaning that aspose’s “Save” function works without any issue). However, when everything is compiled into dynamic libraries and linked by another binary, the aspose’s “Save” function produces segmentation fault when the binary launches. There is no guarantee that this binary is always run on the same machine as the standalone executable.

We suspect that the segmentation fault arises from font-related issues. I wonder, based on @andrey.potapov your experience and my explanation, if you can give me some hints or possible workarounds.

@Meerkatpapa,
Unfortunately, we need the files and information I mentioned earlier in order to reproduce the error on our end. Sorry, I don’t have enough information to help you.