Crash when saving XLSX to PDF with Version 26.02

Hi all,

I get a crash when saving to PDF multiple times. I think the issue is related with:

which was also posted by me.

So, please find a XLSX attached and see the following code:

for (int i = 0; i < 2; i++) {
	Aspose::Cells::Startup();
	Aspose::Cells::Workbook wb(CStringA(Input).GetString());
	wb.Save(CStringA(Output).GetString(), Aspose::Cells::SaveFormat::Pdf);
	Aspose::Cells::Cleanup();
}

The second time “wb.Save” leads to a crash.
19-031_WA Lainach_EP_OEN_09.zip (928,1 KB)

Regards
Markus

@ebrunner

I understand the crash occurs on the second wb.Save call.

You are encountering a known bug (CELLSCPP‑1207) in Aspose.Cells for C++ versions 26.01/25.12 [2]. The issue is scheduled to be fixed in the upcoming v26.2 release [2]. Upgrading to v26.2 (or any later version that includes the fix) should eliminate the crash [2].

The crash happens with the latest 26.02.

@ebrunner,

Thanks for the sample Excel file and details.

I reproduced the issue as you mentioned by using your template Excel file with your code snippet. I found Aspose.Cells for C++ 26.2 crashes when saving XLSX to PDF on the second attempt.

We require thorough evaluation of the issue. 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): CELLSCPP-1211

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.

@ebrunner
You only need to call Startup() and Cleanup() once. The below code works fine.

	Aspose::Cells::Startup();

	// License lic;
	// lic.SetLicense("Aspose.Cells.lic");

	for (int i = 0; i < 2; i++) {
		Aspose::Cells::Workbook wb("19-031_WA Lainach_EP_OEN_09.xlsx");
		wb.Save("output.pdf", Aspose::Cells::SaveFormat::Pdf);
	}

	Aspose::Cells::Cleanup();

Thanks, this works.

@ebrunner,

Thank you for your feedback. We are glad to hear that the suggestion worked well for you. Please don’t hesitate to reach out to us if you have any further questions or comments.