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].
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.
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.