Issue with crashes when saving to pdf format

Hi,

I’m having issues with Aspose.Cells being unstable when saving Excel sheets
in PDF format. Even tiny things such as setting a font might cause the crash to
occur. I’ve experienced crashes when using figures, wordArt, and SmartArt.

I have produced a small example which is able to trigger the crash. The attached
example xlsx file doesn’t cover all objects that can cause the issue, since the issue
can be produced with such a large magnitude of objects.

All that is needed to reproduce the crash is to load a file which contains the offending
objects and/or fonts and save the file in PDF format.

I’m using Aspose.Cells 19.11 for C++. I am as of yet unable to upgrade to 20.7
due to license issues.

aspose_pdf_crash.zip (14.4KB)

@patjep,

Please notice, I am able to reproduce the issue as you mentioned by converting your template file to PDF file format. I tested using Aspose.Cells for C++ v20.7 and found application crashes when saving the Excel file (having word art, drawing shapes, etc.) to PDF format. I have logged a ticket with an id “CELLSCPP-270” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@Amjad_Sahi

Okay, thank you!

@patjep,

We are working over your issue and hopefully we can provide you the fixed version before the end of next week or so.

Keep in touch.

@patjep,

Please try our latest version/fix: Aspose.Cells for C++ v20.7.1.

Your issue (logged earlier as “CELLSCPP-270”) should be fixed in it.

Let us know your feedback.

Hi @Amjad_Sahi,

I tried your fix and it still crashes for me, both when saving to a memory stream and
to a file. The example file I gave you earlier can be used to reproduce the issue.

@patjep,

You are right, the issue is not resolved using the latest fix/version as I tested. I have reopened your issue again. We will look into it soon.

Once we have any new information, we will let you know.

@patjep,

Could you please open the demo project to test with latest fix.

Let us know if you still find the issue.

@Amjad_Sahi

Yes, the issue is still present, which isn’t surprising since it’s the same file you
sent me before. If it’s any help I’m using Visual Studio 2016 (16.7.7).

@patjep,

It works on some machines while on other machines it does not work (same as yours). Let us evaluate your issue further and we will get back to you soon.

@patjep,

Could you please test the demo in VS2017 or 2019 (version no. should be < 16.5.4) and let us know your results.

@Amjad_Sahi ,

This is unfortunately not possible. Our entire codebase, including all sub-modules,
are built using 16.7.7 and changing this would require a lot of work. I can’t help but
wondering what kind of change in the C++ libraries/runtime from 16.5.4 -> 16.7.7 do
you presume is affecting your code in such a way?

@patjep,
We have noted your comments and will share our feedback at the earliest.

@patjep,

We updated our VS2019 version to the latest version(16.8.2) which also works fine on our end. Could you upgrade to latest version and let us know your feedback.

@Amjad_Sahi

I just tried compiling the example code with 16.8.2 and it still crasches. From what I can
see there are no real runtime changes in Microsofts C++ compiler 16.7.7 -> 16.8.2 so the
result seems reasonable.

@patjep,
I have tested the scenario in Window 7 VM and Visual Studio 2019 Enterprise version 16.8.2. It is observed that the latest version 20.7.1 crashes. We have logged this information with the ticket and will share our feedback after detailed analysis.
20.7.0.png (327.1 KB)
20.7.1.png (310.6 KB)

@ahsaniqbalsidiqui

Have you tried using the Visual C++ 2019 compiler? From what I can see from your settings
you are using the compiler from Visual C++ 2017, which might affect the results.

@patjep,
Yes, same behavior is observed with Visual Studio 2019 compiler and logged with the ticket.
20.7.1 With VS 2019 v142.png (320.3 KB)

@ahsaniqbalsidiqui

Any news regarding this issue? Its a serious issue for us and we can’t release our software with this kind of instability issues.

@patjep,
We are gathering information about this issue and will share here at the earliest.