SetLicense() crashes Testhost

We use Aspose.PDF and Aspose.Words with an Aspose.Total License in a Visual Basic .NET project (.NET 4.7.2).

Since a few days ago, the call of the SetLicense() in Aspose.PDF method crashes the Testhost.
SetLicense in Aspose.Words works.

We checked the license and updated the nuget packages - still the same.

Could you check if you can reproduce the error?

This is our example code:

<TestMethod()>
Public Sub LicenseTestPdf_Fail()
Dim licence = New Aspose.Pdf.License()
'This call crashes Testhost
licence.SetLicense(“Aspose.Total.NET.lic”)
End Sub

This test succeeds:
<TestMethod()>
Public Sub LicenseTestWord_Success()
Dim licence = New Aspose.Words.License()
licence.SetLicense(“Aspose.Total.NET.lic”)
End Sub

@hsdataport

Do you also notice some exception or error message? If so, can you please share it? Also, please share which API version are you using?

The Testhost crashes with “An unhandled exception of type ‘System.ExecutionEngineException’ occurred in Unknown Module.”

We updated to Aspose.PDF 23.10.0 yesterday and we still experience the same issue.

We could find out some more facts about the problem:

  • Unfortunately, we can reproduce the problem in our web application (but only when it runs on our developer machines)
  • In a new Console Application, the SetLicense() call works
  • In a new Unit Test Project on Windows 11, it works
  • In a new Unit Test Project on Windows 10 22H2, it crashes

@hsdataport

We will log an investigation ticket in order to further analyze this issue. Can you please share the complete error message and the stack trace information with us?

This is the complete output of my Unit Test Project:

When our web application crashes at SetLicense(), there is a different output (perhaps out of IISExpress - sorry for the German):

@hsdataport

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): PDFNET-55739

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.

Sorry, do you have any updates on the issue already?

Another department of our company uses Aspose.PDF in RPA processing on Windows 10 computers, their program crashes also with SetLicense() - which means it is a production problem for us now.

@hsdataport

We are afraid that the earlier logged ticket has not been yet resolved. We will surely inform you as soon as we make some progress about its resolution. We highly appreciate your patience in this regard. Please spare us some time.

We are sorry for the inconvenience.

The call to SetLicense() works again!

Yesterday, this update was installed on my machine, perhaps that’s the reason:
https://support.microsoft.com/en-us/topic/october-26-2023-kb5031445-os-build-19045-3636-preview-03f350cb-57f9-45e6-bfd7-438895d3c7fa

@hsdataport

Thanks for the update. The provided information is also logged under the ticket and it would definitely be helpful for us to investigate and come up with some technical explanation. We will let you know as soon as we figure out the error cause. We apologize for the trouble caused due to this issue.