We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

The process was terminated due to an unhandled exception. Syncfusion.Pdf.NETStandard IIS

Thread ID:

Created:

Updated:

Platform:

Replies:

141569 Dec 18,2018 02:42 PM UTC Jul 15,2019 10:03 AM UTC ASP.NET Core - EJ 2 5
loading
Tags: DocIO
LastCodeDE
Asked On December 18, 2018 02:42 PM UTC

Hello,

we are using Syncfusion.Pdf.NETStandard (16.3.0.30) in our project.

The frontend is angular the backend C#. The exception comes on backend.

We receive the fallowing exception in a published version on internet information server:
Event-Viewer
CoreCLR Version: 4.6.26725.6
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException: Value cannot be null.
   at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken)
   at SkiaSharp.SKObject.Dispose(Boolean disposing)
   at SkiaSharp.SKBitmap.Dispose(Boolean disposing)
   at SkiaSharp.SKNativeObject.Finalize()

This is our function to convert a word document to an pdf document.
        public byte[] WordToPDF(byte[] WordArray)
        {
            MemoryStream result = new MemoryStream();
            DocIORenderer render = new DocIORenderer();
            MemoryStream stream = new MemoryStream(WordArray, 0, WordArray.Length);
            PdfDocument pdfDocument = render.ConvertToPDF(stream);
            render.Dispose();
            pdfDocument.Save(result);
            pdfDocument.Close();
            pdfDocument.Dispose();
            return result.ToArray();
        }

In visual studio (IIS express) and on my iis I can't reproduce the exception with the same word document. The exception comes only on one server. Unfortunately the convert has to work on this server.

The server has no installed word application. I don't know if this is important.

Regards
LastCodeDE


Dilli Babu Nandha Gopal [Syncfusion]
Replied On December 19, 2018 12:34 PM UTC

Hi David, 

Greetings from Syncfusion. 

From the given details, we have found that the exception occurs only in server. So, could you please provide us the following details from your end: 
  1. Essential studio product version which currently installed on the production environment (server machine). 
  2. Visual Studio version. 
  3. Details about the Operation system in server. 
  4. Input Word document which used at your side. 
  5. Complete stack trace details of the reported exception. 
  6. Please confirm us whether you are using ASP.NET Core or any other application to publish in server. 

Based on the above details, we will setup a similar environment and will try to reproduce the exact problem at our side. 

Note: If the above details are confidential, then you can also mail the details to our Syncfusion support through support@syncfusion.com with this forum ID in subject line. 

Regards, 
Dilli babu 


LastCodeDE
Replied On December 19, 2018 01:32 PM UTC

Hello Dilli babu,

thank you for your answer. I hope I can help with some details:

1. This are our dependencies on server side.
(see attachment))

2. My installed visual studio version is 15.8.4 (2017) but I think this information is not important because on my computer with the same document the convert of doc to pdf works.

3. The server with the issue is an windows server 2012 R2.

4. Unfortunately I can not publish the document because It's not mine.

5. How can I complete the stack trace? The application crashed (published version no debugging possible). Try catch doesn't work. The exception is from the windows event viewer.

6. The proejct is a dot net core 2.1 project. The frontend is in angular 7 cli.

Regards
LastCodeDE

Attachment: sync_552f0159.zip

Dilli Babu Nandha Gopal [Syncfusion]
Replied On December 20, 2018 04:23 PM UTC

Hi David, 

From the given details and screenshot, we suspect the problem might be due to the NuGet packages conflicts (mismatch in versions of all NuGet packages) which referred in your application. Also, we have fixed similar kind of problem at our end and it is included in our latest 2018 Volume 4 main release (16.4.0.42).   
We suggest you to remove existing NuGet packages in your application and kindly install the same version (16.4.0.42) of NuGet packages in your application from nuget.org. Could you please confirm us whether the reported problem resolved in our latest version? 

Regards, 
Dilli babu. 


David Romero
Replied On July 15, 2019 06:55 AM UTC

I'm having the same issue, but only when running my APP on Windows Server 2012 R2. It works fine on Windows 10.

Vijayasurya Anandhan [Syncfusion]
Replied On July 15, 2019 10:03 AM UTC

1.   Hi David,

Thank for your update.

We suggest you to use below steps to overcome the reported issue:

1. Check whether production machine have proper .NET Core runtime installed.

2. Check Visual C++ Redistributable for Visual Studio 2015 installed in the production which is need to run SkiaSharp.

Download link:

https://www.microsoft.com/en-us/download/details.aspx?id=53587

3.
Download link for 2017 VC++:
https://visualstudio.microsoft.com/downloads/ 
Please let us know if you have any queries.

Regards,
Vijayasurya A


 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;