Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Aspose.Pdf.SetLicense (8.7.0) crashes when calling library is obfuscated

$
0
0
I have encountered a problem with Aspose.Pdf 8.7.0. When I was packaging our software for release and tested it, everytime I was setting the license in Aspose.Pdf it brutally crashed the application. Not with an exception, just a "The application stopped working".

I have attached a sample application that can provoke the situation, and below follows a description of what I have done. I can provide a full build of my failing application at request, but will not publish that in public here at the support forum.

The sample application is pretty simple. 
- ClassLibrary 1 : A class library that sets the license from an const string variable supplied by a MemoryStream to Aspose.Pdf.License.SetLicense. 
- WindowsFormsApplication1 : A Windows Forms application with a single button which sets the license. 

- To get the sample application working the contents of a valid license file should be inserted in the ClassLibrary1.LicenseHandler class

In a normal build everything works fine, and clicking the button will display a "License is set" dialog. 

The problem arises when I obfuscate the calling libraries (not Aspose.Pdf). 

I have obfuscated the dll's using .Net Reactor 4.6.0 using these settings:
- Main assembly: WindowsFormsApplication1.exe 
- Additional assemblies : ClassLibrary1.dll
- Check in Embed Assemblies

Quick Settings: only NecroBit is enabled.

Clicking protect delivers a single executable with the ClassLibrary merged into it. 

Running this application, with Aspose.Pdf v. 8.7.0 next to it, causes the application to crash.

As I stated in the beginning, I can supply the obfuscated exe file if you want/need it for testing, just won't supply it in the forums since it contains our licensefile.

The sample application is compiled to .Net 4.5/Any cpu. The real product to be released is built against .Net 4.0/x86 - not that it seems to matter. The development workstation is a Windows 7 x64 machine.

I have found a workaround to the problem, which is to use Aspose.Pdf 8.6.0. It doesn't crash, but works just fine. 

I hope the above information is enough for you to be able to reproduce the issue, and fix it for future releases. If not, don't hesitate to ask for more information or assistance. 

Best regards
/Anders



Viewing all articles
Browse latest Browse all 3131